From patchwork Tue Sep 12 11:58:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zamfofex X-Patchwork-Id: 53763 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 96D4827BBE9; Tue, 12 Sep 2023 12:59:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 30E8F27BBE2 for ; Tue, 12 Sep 2023 12:59:32 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg22q-0003s0-MG; Tue, 12 Sep 2023 07:59:04 -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 1qg22k-0003qP-3n for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:59 -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 1qg22j-0006Sa-Sa for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg22n-0002K4-Tn for guix-patches@gnu.org; Tue, 12 Sep 2023 07:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH 1/3] gnu: Add lc0. References: In-Reply-To: Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Sep 2023 11:59:01 +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 , iyzsong@member.fsf.org, liliana.prikler@gmail.com, iyzsong@envs.net Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.16945199308885 (code B ref 63088); Tue, 12 Sep 2023 11:59:01 +0000 Received: (at 63088) by debbugs.gnu.org; 12 Sep 2023 11:58:50 +0000 Received: from localhost ([127.0.0.1]:56344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22b-0002JF-DS for submit@debbugs.gnu.org; Tue, 12 Sep 2023 07:58:50 -0400 Received: from mta-09-4.privateemail.com ([198.54.127.118]:22629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22X-0002Ix-3V for 63088@debbugs.gnu.org; Tue, 12 Sep 2023 07:58:48 -0400 Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id A605118000B7; Tue, 12 Sep 2023 07:58:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1694519913; bh=MImJ0wqvCaZgM6ZPx4jUd6fYMOFz/rzC5IkCM7MMNtU=; h=From:To:Cc:Subject:Date:From; b=Lfg7bj2KJOGSX05bZm1Cl4HehAdIKcvbthSYaHx4iL8KsHyaE2x8hL6T352M27s/E bRm4a+HmpBmK9GQdmXtqCOU8BcdzEvDeuWl0DPqFjc3bg6n2EnrD3I8OXMh0D/YzN4 VIV/JJUf2AUarOAw6mM9NsE52G5BUNoig7xEEx1JPxyoDxFZKASumW+m3KTRYnl75H gAosorQ76ensNsYNv9KpR7wzg+SW8EZAWzt7gO4p+mMAtmDvgXc+3zRm0WGU+r5SPv FgVmAEAsqfwsE4PhjeIVgHgg5MNCNMKw/Yh+ZszY0/T83JsNpfhfP2m60F6Ts9h7mA 9wvhjqe3X1uiA== Received: from localhost.localdomain (unknown [189.35.108.242]) by mta-09.privateemail.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 07:58:27 -0400 (EDT) From: zamfofex Date: Tue, 12 Sep 2023 08:58:11 -0300 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lc0.scm: New file. * gnu/packages/local.mk: Register file. --- gnu/local.mk | 2 ++ gnu/packages/lc0.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 gnu/packages/lc0.scm base-commit: daeeaa221605726d8853b00261619ba039bd6db7 diff --git a/gnu/local.mk b/gnu/local.mk index 4f8637418a..f46a2973ae 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -59,6 +59,7 @@ # Copyright © 2023 Zheng Junjie <873216071@qq.com> # Copyright © 2023 Ivana Drazovic # Copyright © 2023 Andy Tai +# Copyright © 2023 zamfofex # # This file is part of GNU Guix. # @@ -375,6 +376,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/kerberos.scm \ %D%/packages/kodi.scm \ %D%/packages/language.scm \ + %D%/packages/lc0.scm \ %D%/packages/lean.scm \ %D%/packages/lego.scm \ %D%/packages/less.scm \ diff --git a/gnu/packages/lc0.scm b/gnu/packages/lc0.scm new file mode 100644 index 0000000000..e19436c381 --- /dev/null +++ b/gnu/packages/lc0.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 zamfofex +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages lc0) + #:use-module (guix build-system meson) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages algebra) + #:use-module (gnu packages c) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages machine-learning) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python)) + +(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)) + ;; Only a few source files are in one Git submodules (rather than + ;; there being bundled projects). These files are in a different + ;; repository just because they are used across multiple + ;; repositories of the Leela Chess Zero project. + (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 (list eigen oneapi-dnnl zlib)) + (native-inputs (list googletest ispc pkg-config python)) + (arguments + '(#:configure-flags (list "-Ddnnl=true" + (string-append "-Ddnnl_dir=" + (assoc-ref %build-inputs + "oneapi-dnnl"))))) + (synopsis "Chess engine based on neural networks") + (description + "Leela Chess Zero is a UCI-compliant chess engine designed to play chess +using neural networks. This package does not provide a neural network, which +is necessary to use Leela Chess Zero and should be installed separately.") + (home-page "https://lczero.org") + (license license:gpl3+))) From patchwork Tue Sep 12 11:58:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zamfofex X-Patchwork-Id: 53762 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7047927BBE2; Tue, 12 Sep 2023 12:59:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 02E3B27BBE9 for ; Tue, 12 Sep 2023 12:59:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg22o-0003rT-FU; Tue, 12 Sep 2023 07:59:02 -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 1qg22k-0003qO-1j for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:59 -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 1qg22j-0006Sd-Q0 for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg22o-0002KB-AX for guix-patches@gnu.org; Tue, 12 Sep 2023 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH 2/3] gnu: Add neural networks for Leela Chess Zero. Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Sep 2023 11:59: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 , iyzsong@member.fsf.org, liliana.prikler@gmail.com, iyzsong@envs.net Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.16945199338902 (code B ref 63088); Tue, 12 Sep 2023 11:59:02 +0000 Received: (at 63088) by debbugs.gnu.org; 12 Sep 2023 11:58:53 +0000 Received: from localhost ([127.0.0.1]:56347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22f-0002JU-2T for submit@debbugs.gnu.org; Tue, 12 Sep 2023 07:58:53 -0400 Received: from mta-09-4.privateemail.com ([198.54.127.118]:5490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22d-0002J5-J4 for 63088@debbugs.gnu.org; Tue, 12 Sep 2023 07:58:52 -0400 Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id 0413218000B4; Tue, 12 Sep 2023 07:58:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1694519921; bh=gMWD7E3gu836LizomZXLsxzckB+k89h+OyvX/JzrBB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jiEQ630ljpVdrWEUJ2XnIRtoGU5AvEOFvGSbLRRzZa25zEqGxjZdeg1GktGsXC/xB WuKi1z3FzdcjsrPybiAQKUkhKUjzHeVTdjVPl7fr8I+Tpkez7NovCQ5UnP2odAUHJ6 GjK0GszGEzOLrT7yopZdas9jrL+QgzdDjyEVz8MhiLTJ7d8zEkS7sTJKcjST4mPu8T LzV1P+fQ99XO9XWFJ4948YGpQ1uJfEtPG7rKJJImmjD/U5gMm0HrPd/LE5N99bOEU5 QDa7DQldAhkkiJI1Krq8z4kEsd93B0mtnQg72glPvNbnJXulqDdveeTML6DIjxCncH ZLo5tDY1pklPg== Received: from localhost.localdomain (unknown [189.35.108.242]) by mta-09.privateemail.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 07:58:34 -0400 (EDT) From: zamfofex Date: Tue, 12 Sep 2023 08:58:12 -0300 Message-ID: <845cc1e6b38e26aba3c99c4934c4d2f9c6e2b6e2.1694519893.git.zamfofex@twdb.moe> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lc0.scm (make-lc0-nn): New procedure. * gnu/packages/lc0.scm (lc0-t2, lc0-t1, lc0-t1-512, lc0-t1-256) (lc0-611246, lc0-791556, lc0-815383): New variables. --- gnu/packages/lc0.scm | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/gnu/packages/lc0.scm b/gnu/packages/lc0.scm index e19436c381..1cda2efd1c 100644 --- a/gnu/packages/lc0.scm +++ b/gnu/packages/lc0.scm @@ -17,7 +17,10 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages lc0) + #:use-module (guix build utils) #:use-module (guix build-system meson) + #:use-module (guix build-system trivial) + #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) @@ -69,3 +72,76 @@ (define-public lc0 is necessary to use Leela Chess Zero and should be installed separately.") (home-page "https://lczero.org") (license license:gpl3+))) + +(define (make-lc0-nn name file-name url hash description) + (package + (name (string-append "lc0-" name)) + (version "0") + (source (origin + (method url-fetch) + (uri url) + (file-name (string-append "lc0-" file-name)) + (sha256 + (base32 + hash)))) + (build-system trivial-build-system) + (arguments + (list #:builder (with-imported-modules '((guix build utils)) + #~(let ((share (string-append (assoc-ref + %outputs + "out") + "/share/lc0/"))) + (use-modules (guix build utils)) + (mkdir-p share) + (copy-file (assoc-ref + %build-inputs + "source") + (string-append + share + #$file-name)))))) + (synopsis "Pretrained neural network for Leela Chess Zero") + (description description) + (home-page "https://lczero.org") + (license license:gpl3+))) + +(define-public lc0-t2 + (make-lc0-nn "t2" "t2-768.pb.gz" + "https://storage.lczero.org/files/networks-contrib/t2-768x15x24h-swa-5230000.pb.gz" + "126305hby24k5agxiixadp1lcgmv8drm1dkpb4jf5jzq7k4m855w" + "T2 is currently one of the best neural network for Leela Chess Zero, superceeding the neural network T1.")) + +(define-public lc0-t1 + (make-lc0-nn "t1" "t1-768.pb.gz" + "https://storage.lczero.org/files/networks-contrib/t1-768x15x24h-swa-4000000.pb.gz" + "0zm9v91gfnm69n4x2fckair24fypjrwiip3j86ylsqncsi1sh5nq" + "T1 is currently one of the best neural network for Leela Chess Zero, however it was superceeded by the neural network T2.")) + +(define-public lc0-t1-512 + (make-lc0-nn "t1-512" "t1-512.pb.gz" + "https://storage.lczero.org/files/networks-contrib/t1-512x15x8h-distilled-swa-3395000.pb.gz" + "1s4pq06qkdpaq0a4z6j5qqnf6h7njpmwh7i0v7qh6bmhwlcibnqz" + "This is a smaller version of the T1 neural network, which is currently one of the best neural network for Leela Chess Zero.")) + +(define-public lc0-t1-256 + (make-lc0-nn "t1-256" "t1-256.pb.gz" + "https://storage.lczero.org/files/networks-contrib/t1-256x10-distilled-swa-2432500.pb.gz" + "01ilar7y2nf3kfkq3x77n4jxlvqdpgddjsham2wz4dmdx35ac9xw" + "This is a smaller version of the T1 neural network, which is currently one of the best neural network for Leela Chess Zero.")) + +(define-public lc0-611246 + (make-lc0-nn "611246" "611246.pb.gz" + "https://storage.lczero.org/files/networks/7ca2381cfeac5c280f304e7027ffbea1b7d87474672e5d6fb16d5cd881640e04" + "0rapfvjqqrhydhp8a6r3skmjci2dc2yxz912bglv9yd9k00l9rww" + "This is an official neural network of a “main run” of the Leela Chess Zero project that was finished being trained in January of 2022.")) + +(define-public lc0-791556 + (make-lc0-nn "791556" "791556.pb.gz" + "https://storage.lczero.org/files/networks/f404e156ceb2882470fd8c032b8754af0fa0b71168328912eaef14671a256e34" + "03b9xl9vkiihdilz5dzcpg6g4inb6n4k5gs911i3gbd8h9sh9ixi" + "This is an official neural network of the Leela Chess Zero project that was finished being trained in April of 2022.")) + +(define-public lc0-815383 + (make-lc0-nn "815383" "815383.pb.gz" + "https://storage.lczero.org/files/networks/8af6098d6fb76e2bef6ef9ee87e61fadcb99f0b789013a72953a95ad10a9e933" + "09gm8lgaick60rn4x9h9w5sxdqivr4ign73viviadw1gj7wsbnsg" + "This is an official neural network of a “main run” of the Leela Chess Zero project. The network was finished being trained in September of 2023.")) From patchwork Tue Sep 12 11:58:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zamfofex X-Patchwork-Id: 53761 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B203827BBEA; Tue, 12 Sep 2023 12:59:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 78A7227BBE2 for ; Tue, 12 Sep 2023 12:59:08 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg22p-0003rh-Et; Tue, 12 Sep 2023 07:59:03 -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 1qg22k-0003qQ-DV for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:59 -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 1qg22k-0006Sm-5t for guix-patches@gnu.org; Tue, 12 Sep 2023 07:58:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg22o-0002KJ-O2 for guix-patches@gnu.org; Tue, 12 Sep 2023 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH 3/3] gnu: Add neural networks from the Maia Chess project. Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Sep 2023 11:59: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 , iyzsong@member.fsf.org, liliana.prikler@gmail.com, iyzsong@envs.net Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.16945199418920 (code B ref 63088); Tue, 12 Sep 2023 11:59:02 +0000 Received: (at 63088) by debbugs.gnu.org; 12 Sep 2023 11:59:01 +0000 Received: from localhost ([127.0.0.1]:56350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22m-0002Jo-NW for submit@debbugs.gnu.org; Tue, 12 Sep 2023 07:59:01 -0400 Received: from mta-09-4.privateemail.com ([198.54.127.118]:22476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg22k-0002JV-F4 for 63088@debbugs.gnu.org; Tue, 12 Sep 2023 07:58:59 -0400 Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id 547F7180004A; Tue, 12 Sep 2023 07:58:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1694519928; bh=rU36iJIIxpSviV+BAjj7nXM6mkP2pe/GbN+062yvu3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TCHZ/W+4dHhh/dAs3N1nBgAoJTNDhGBdwSh7l4CUorvLDF9ny46hDk4FcFN3g9jzC nkYDUcPxh+ICSUGEUlLiBFPj2IeelhDn4R8IyqTDMKwzdnie/qojsSlZ+a6hOmT77C gEj8ouOtPW7hjBRSHw4EzNxxqLNNEtvfhf8wtxSLaM2eh7Iz2dG/IZB0CD1oMCk36I 3T3MgxSmqIF/65pSNnSlxow/7NLEJ4aCETaCurfn8nB/bP30iwTJyuRsmXJ0Gb4277 egDx8SPWsOV57WTLynz2SFSaJzizGytzHW0NXKLrQ77l5ix1S8OU66K1w66GZIBUXn /BUBfKwzPohkQ== Received: from localhost.localdomain (unknown [189.35.108.242]) by mta-09.privateemail.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 07:58:41 -0400 (EDT) From: zamfofex Date: Tue, 12 Sep 2023 08:58:13 -0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lc0.scm (make-lc0-maia): New procedure. * gnu/packages/lc0.scm (lc0-maia-1100, lc0-maia-1200, lc0-maia-1300) (lc0-maia-1400, lc0-maia-1500, lc0-maia-1600, lc0-maia-1700) (lc0-maia-1800, lc0-maia-1900): New variables. --- gnu/packages/lc0.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/lc0.scm b/gnu/packages/lc0.scm index 1cda2efd1c..495d93b110 100644 --- a/gnu/packages/lc0.scm +++ b/gnu/packages/lc0.scm @@ -18,6 +18,7 @@ (define-module (gnu packages lc0) #:use-module (guix build utils) + #:use-module (guix build-system copy) #:use-module (guix build-system meson) #:use-module (guix build-system trivial) #:use-module (guix download) @@ -145,3 +146,57 @@ (define-public lc0-815383 "https://storage.lczero.org/files/networks/8af6098d6fb76e2bef6ef9ee87e61fadcb99f0b789013a72953a95ad10a9e933" "09gm8lgaick60rn4x9h9w5sxdqivr4ign73viviadw1gj7wsbnsg" "This is an official neural network of a “main run” of the Leela Chess Zero project. The network was finished being trained in September of 2023.")) + +(define (make-lc0-maia rating) + (package + (name (string-append "lc0-maia-" rating)) + (version "1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CSSLab/maia-chess") + (commit (string-append "v" version)))) + (file-name (git-file-name "maia" version)) + (sha256 + (base32 + "0qjkp56pb5vvkr3j1vdsdzligvy7faza917z7vdfmf168pkvrxsr")))) + (build-system copy-build-system) + (arguments + `(#:install-plan '((,(string-append "model_files/" rating "/final_" + rating "-40.pb.gz") ,(string-append + "share/lc0/maia-" + rating ".pb.gz"))))) + (synopsis "Human-like neural network for Leela Chess Zero") + (description + "Maia’s goal is to play the human move — not necessarily the best move. +As a result, Maia has a more human-like style than previous engines, matching +moves played by human players in online games over 50% of the time.") + (home-page "https://maiachess.com") + (license license:gpl3))) + +(define-public lc0-maia-1100 + (make-lc0-maia "1100")) + +(define-public lc0-maia-1200 + (make-lc0-maia "1200")) + +(define-public lc0-maia-1300 + (make-lc0-maia "1300")) + +(define-public lc0-maia-1400 + (make-lc0-maia "1400")) + +(define-public lc0-maia-1500 + (make-lc0-maia "1500")) + +(define-public lc0-maia-1600 + (make-lc0-maia "1600")) + +(define-public lc0-maia-1700 + (make-lc0-maia "1700")) + +(define-public lc0-maia-1800 + (make-lc0-maia "1800")) + +(define-public lc0-maia-1900 + (make-lc0-maia "1900"))