From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gHCLH9EkSWRohQAASxT56A (envelope-from ) for ; Wed, 26 Apr 2023 15:19:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0Id+H9EkSWTrQwEA9RJhRA (envelope-from ) for ; Wed, 26 Apr 2023 15:19:13 +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 12C985F98 for ; Wed, 26 Apr 2023 15:19:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prf33-0006Au-61; Wed, 26 Apr 2023 09:19:05 -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 1prf30-00069r-SG for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prf30-0002OS-L4 for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prf30-0002q2-HE for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH 3/3] gnu: Add Lc0. * gnu/packages/games.scm (lc0): New variable. Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Apr 2023 13:19: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 Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.168251509110835 (code B ref 63088); Wed, 26 Apr 2023 13:19:02 +0000 Received: (at 63088) by debbugs.gnu.org; 26 Apr 2023 13:18:11 +0000 Received: from localhost ([127.0.0.1]:54595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prf2A-0002oe-PF for submit@debbugs.gnu.org; Wed, 26 Apr 2023 09:18:11 -0400 Received: from mta-10-3.privateemail.com ([198.54.127.62]:1461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prf28-0002oA-VQ for 63088@debbugs.gnu.org; Wed, 26 Apr 2023 09:18:10 -0400 Received: from mta-10.privateemail.com (localhost [127.0.0.1]) by mta-10.privateemail.com (Postfix) with ESMTP id 9A51318000A1; Wed, 26 Apr 2023 09:18:03 -0400 (EDT) Received: from localhost.localdomain (unknown [187.66.116.196]) by mta-10.privateemail.com (Postfix) with ESMTPA id B041B18000A2; Wed, 26 Apr 2023 09:18:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1682515083; bh=h5Ap6x5OpTBowSXCH/omu1SJSlH1dXmaaSv6PgG+bkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U/Eko//b5olgMQgAUT6aDwi1H9kSgVWuQcWr6Wv3IJPPNuOXt3XJzXoxrjsM5thO4 cIikXSP9EgvP/KqWW4aoM1MA5UvSg5DXIHyLQ2+4DlyPX77XRGik2bOBE6XRL8/onl gESg6ms6R4b1rDWfxejBRf8+WQMMFp89NRAyVJKypp1CMyBS1HnDYDJToSSp9CtJbf QSRjZqJwe+3YeG4CdldIosU7mHh/BV15jGQ3zGhJ2liWJWMEWldZNBh/0a+alYbEap b8Wgst3sDU9WH0SONv0Mo9++Jr9MRUpPavE0RNGu/9SXNA5bmxJzEMEEN2S7tSfYD5 KTSy86kmjjnqA== From: zamfofex Date: Wed, 26 Apr 2023 10:17:39 -0300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682515153; a=rsa-sha256; cv=none; b=lQdVo92+vv/CN5zJu/p+tDnNwE6vzomHMz++M4snVHEwZyo7JYsLzYafqEqYlUYJxrb23V yuCnMQTNttXk5ApLLhDt34tkFVp7xxbCnkviJN3wvpvGIJsQlbL6Zfcj63yUQPCgd1sszj qx09TxsXXEjDJ8k+tr0fCuS+eUQni+/8Ok/vQxMhFh6cJ7vYT9KgcNHgja1F55OrrxVHEg wpNdVtKE4yPhtQIxeYrco/S3X/oBzqRXNSQvxwTf7fxklaDge0tKwm0K1lLwcu7gK3ER8J P1auH0mM9Qo2iTdpP1ZAfaxSLRBct8iDsnE8KqgyU6v54NgTUGDnqNCfuoMyEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b="U/Eko//b"; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682515153; h=from:from:sender:sender: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=X10oAP8zB11CgtJHOTx8T/bnWXjhMAbVVJuEteTWJnE=; b=Y7WRTWvxNvvwRTkYdxlPojNVGIqxioGDKa6zWzFDIcYy4lep/nOcssV7yF7l12zydPLNYz 3GguVN0IZXfTf70491aQYTINGp+jE3C7Xp76wbkr2It+Mn215zeZqUhig8GRS6SHfjuMnP ap6mNto9yiGUUyLoymgr0be/5S8G4ZT89jdEmRYngoTcfvrDvfkaQ1LYGBRwVXHLsyV9+a sX1lrnfaZTghd5FY1fqYreCzI2bSY75KlHnUoNIVguPoQiTOFhDrqn4FmMv9JjscN32SxV dx8W4niXB+QZN2nQbQ4TDxbxrJIeVE31lHd91mOuBzKa4YfMEk0EN3HVBqcpcA== X-Migadu-Spam-Score: 0.09 X-Spam-Score: 0.09 X-Migadu-Queue-Id: 12C985F98 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b="U/Eko//b"; dmarc=none; 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" X-TUID: +SdcPW4ZyW8y --- gnu/packages/games.scm | 60 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 23b6c39c46..9350c9224c 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -70,7 +70,7 @@ ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022, 2023 Yovan Naumovski ;;; Copyright © 2022 Roman Riabenko -;;; Copyright © 2022 zamfofex +;;; Copyright © 2022, 2023 zamfofex ;;; Copyright © 2022 Gabriel Arazas ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Hendursaga @@ -114,6 +114,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) @@ -166,6 +167,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) @@ -10395,6 +10397,62 @@ (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.29.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 "1yn91738wd8zlbvrcw0dszy7hqjpkml0wi5xhh36j4zgid6x8i2m")))) + (build-system meson-build-system) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files (list "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 "Neural network based chess engine") + (description "Lc0 is a chess engine based on neural networks") + (home-page "https://lczero.org") + (license license:gpl3+))) + (define-public barrage (package (name "barrage") -- 2.39.2