From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gHlLH92k+WQ+LgAAauVa8A:P1 (envelope-from ) for ; Thu, 07 Sep 2023 12:24:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gHlLH92k+WQ+LgAAauVa8A (envelope-from ) for ; Thu, 07 Sep 2023 12:24:29 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 456EC3E8F3 for ; Thu, 7 Sep 2023 12:24:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=envs.net header.s=modoboa header.b="qokGHs/S"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694082269; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=EnyiY1KcTNMn4QvvZGxTs6yr8QaFJlaQK1CyzJrDp9Y=; b=m2lXXaw1fB4wAVxIoxEiV+Ouv8lxd60VH0hRuBotoAYuHoDnHfcybauVr54wd48gqKyXcf s4dK74Fh0of0rCOj77BHMOH7FCtMQRm8EWffX0zotwIZtk4vmhPAd3QI0DsF2nMoZePWI1 6NRyelY4fse4e0Gus3PxfJIsQLPn2bTp7eWuSFKvlojuBD4SgUyFInCE0qNZGk7euyelsB R2nlidbyOQe5vT6aqRfnL+6L7TtqSNcp+tWXo/tN3tbNf50ccXMNXiaXad/7vI/qUia1gZ HCLRnUOpfas3bk0XiIPvqrxiiCa5fRBUYj1tNirFAoLNOHyVAuPNeS2MJQXu5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=envs.net header.s=modoboa header.b="qokGHs/S"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694082269; a=rsa-sha256; cv=none; b=iln0MMjFAvxzsmjKCaYAkA3HwUth5v4wgcxjKZTzIzh89jxD8m/Tlma6K3wuA42b9Mp1a+ mGb06m40bbrzKUg7I7cQfDZOeuRkIO7gks8Jl+wquMfIQXmS6lmH256nQJRs2Mi6+sjhK9 vWfVyH1M8RxFMn+OktbYxdl6D527tb5iBaJaUV2wgqCPwVp45viaau2fxoJBhicWiFVa6z K3wegna2wxdrB9TW+1GeL+JWkl80WfAmqN4FXDUp2lHS0sqh/Hp+cTlMVVKqDWoR5lh6j5 TJ5ps0BQp7SK0HYb7wU9sqGiUlgOWVSsgSssepn1LcGBtIf4KmgSwwyAO/kgpg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCBF-0002GH-0K; Thu, 07 Sep 2023 06:24:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeCBD-0002G2-6y for guix-patches@gnu.org; Thu, 07 Sep 2023 06:24:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCB6-0000Jo-KZ for guix-patches@gnu.org; Thu, 07 Sep 2023 06:24:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeCB8-0005My-2i; Thu, 07 Sep 2023 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH v2] gnu: Add Lc0. References: In-Reply-To: Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Thu, 07 Sep 2023 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63088 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63088@debbugs.gnu.org Cc: zamfofex , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= X-Debbugs-Original-Xcc: Liliana Marie Prikler , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.169408219120570 (code B ref 63088); Thu, 07 Sep 2023 10:24:02 +0000 Received: (at 63088) by debbugs.gnu.org; 7 Sep 2023 10:23:11 +0000 Received: from localhost ([127.0.0.1]:38686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeCAJ-0005Lh-3T for submit@debbugs.gnu.org; Thu, 07 Sep 2023 06:23:11 -0400 Received: from mail.envs.net ([5.199.136.28]:51242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeCAD-0005LN-Vk for 63088@debbugs.gnu.org; Thu, 07 Sep 2023 06:23:09 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 387C438A0132; Thu, 7 Sep 2023 10:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1694082182; bh=EnyiY1KcTNMn4QvvZGxTs6yr8QaFJlaQK1CyzJrDp9Y=; h=From:To:Cc:Subject:Date:From; b=qokGHs/Sl+jzqi44lvMaA2tsGMn3Abw4pJRUjgWfZ0JeJJ/tLDe5OUffXYT6TeAa8 Y56VFiHfKH//Czp1ZaC9Nut64xN1wvxlxz20FN+srUbJYQ1ORV0RXeGF7LBwAsegkb eKoDfkBcI8GRm2c2h4NPor55zzfrYegylEWyQn+fnOs/TSSk7i7d5SRR9XvSoe0y6G auQrku8LcqRhNB1ZhWo+IO1Eo69nir4wvNCThK4JSjf0cyah7U2fjTzw4CvyQPgYLf VPxMRZodw4O9nNptkBa+VUnwkKeHDg6J02nsDV9MQdhm5vk7acnixdfH+pGxmV/IHq 77rGN2FsLJJn+VY0N+Gy8iHbXz1Jr9lS95NSiJabN14MBUO45SLH9wFeXkVYM9bbHj 5p2KQMjXm3k60qqXvLjwGAdaoFfOk+OAkNOmucEjqxkfIVYt9k2GqB0gQJACPRsMlb gqUxIr03pMeih1geUs0uE+HKR4v6i5Ey3xIfF8fXJkMSMUHQVEI+kIfN74fRnGK3dm 25YNnr+rtYvYJHFOvDryr9PqZUHRoC+pzADwq+71oRWDQKTIUTky9yj4XF/yeiuZ0F YHIp6LELxl9JGTRmltChihDfDt5vhB3Wnc+A3w1lznVvpgfi47GFaN1d5NPIph7kLj T6f4tGYbWe4qvP/Ia75ALkpY= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XSbubCuumQXB; Thu, 7 Sep 2023 10:22:56 +0000 (UTC) Received: from localhost (unknown [117.174.235.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Thu, 7 Sep 2023 10:22:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id be9dfa1f; Thu, 7 Sep 2023 10:23:13 +0000 (UTC) Date: Thu, 7 Sep 2023 18:23:11 +0800 Message-ID: <3cc41c81a301fb53c564508d3cbcf92270695d1b.1694082083.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches From: iyzsong--- via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 456EC3E8F3 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -5.23 X-Spam-Score: -5.23 X-TUID: jNPadRLHXzE5 From: zamfofex * gnu/packages/games.scm (lc0): New variable. Signed-off-by: 宋文武 --- gnu/packages/games.scm | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 760234b031..f82f1dcc52 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -118,6 +118,7 @@ (define-module (gnu packages games) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -171,6 +172,7 @@ (define-module (gnu packages games) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages lua) + #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages messaging) @@ -10409,6 +10411,63 @@ (define-public stockfish (home-page "https://stockfishchess.org/") (license license:gpl3+)))) +(define lc0-neural-network + (let ((hash + "f404e156ceb2882470fd8c032b8754af0fa0b71168328912eaef14671a256e34")) + (origin + (method url-fetch) + (uri (string-append "https://storage.lczero.org/files/networks/" + hash)) + (sha256 + (base32 + "03b9xl9vkiihdilz5dzcpg6g4inb6n4k5gs911i3gbd8h9sh9ixi")) + (file-name "lc0-neural-network")))) + +(define-public lc0 + (package + (name "lc0") + (version "0.30.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LeelaChessZero/lc0") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m7k8m8iz4pxv3h9g2j1dkgryi4k9c1bcg3fx5j7ii4ysif63kj3")))) + (build-system meson-build-system) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))))) + (inputs + `(("neural-network" ,lc0-neural-network) + ("eigen" ,eigen) + ("oneapi-dnnl" ,oneapi-dnnl) + ("zlib" ,zlib))) + (native-inputs + (list googletest ispc pkg-config python)) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'install 'copy-net + (lambda* (#:key outputs inputs #:allow-other-keys) + (mkdir-p (string-append (assoc-ref outputs "out") + "/share/lc0")) + (copy-file (assoc-ref inputs "neural-network") + (string-append (assoc-ref outputs "out") + "/share/lc0/neural-network"))))) + #:configure-flags (list "-Ddnnl=true" + (string-append + "-Ddnnl_dir=" + (assoc-ref %build-inputs "oneapi-dnnl"))))) + (synopsis "Chess engine using neural networks") + (description "Lc0 is a UCI-compliant chess engine designed to play chess +via neural network, specifically those of the LeelaChessZero project.") + (home-page "https://lczero.org") + (license license:gpl3+))) + (define-public barrage (package (name "barrage") base-commit: 5ef28595e9dff8b88ec3fcb4d887fbc380c9a8b8 prerequisite-patch-id: 8cee4be3d25dba0dde5c2d0e317f31741c010f50 -- 2.41.0