From 5ddc45c790b4ae13bb3bea89c3e6a40f18a38ab1 Mon Sep 17 00:00:00 2001 From: Jay Honnold Date: Sun, 25 Sep 2022 16:11:13 -0700 Subject: [PATCH] 16 King Buckets (#410) Bench: 4668255 Increase the number of input features to utilize 16 buckets (up from 8). STC ELO | 5.25 +- 4.27 (95%) CONF | 10.0+0.10s Threads=1 Hash=8MB GAMES | N: 12304 W: 3082 L: 2896 D: 6326 LTC ELO | 5.73 +- 3.98 (95%) SPRT | 60.0+0.60s Threads=1 Hash=64MB LLR | 2.95 (-2.94, 2.94) [0.00, 4.00] GAMES | N: 13344 W: 3162 L: 2942 D: 7240 --- src/board.c | 16 ++++++++-------- src/makefile | 4 ++-- src/networks | 2 +- src/types.h | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/board.c b/src/board.c index 30ae3c6e..f67fde14 100644 --- a/src/board.c +++ b/src/board.c @@ -32,14 +32,14 @@ #include "uci.h" #include "zobrist.h" -const uint16_t KING_BUCKETS[64] = {7, 7, 7, 7, 7, 7, 7, 7, // - 7, 7, 7, 7, 7, 7, 7, 7, // - 6, 6, 6, 6, 6, 6, 6, 6, // - 6, 6, 6, 6, 6, 6, 6, 6, // - 5, 5, 4, 4, 4, 4, 5, 5, // - 5, 5, 4, 4, 4, 4, 5, 5, // - 3, 2, 1, 0, 0, 1, 2, 3, // - 3, 2, 1, 0, 0, 1, 2, 3}; +const uint16_t KING_BUCKETS[64] = {15, 15, 14, 14, 14, 14, 15, 15, // + 15, 15, 14, 14, 14, 14, 15, 15, // + 13, 13, 12, 12, 12, 12, 13, 13, // + 13, 13, 12, 12, 12, 12, 13, 13, // + 11, 10, 9, 8, 8, 9, 10, 11, // + 11, 10, 9, 8, 8, 9, 10, 11, // + 7, 6, 5, 4, 4, 5, 6, 7, // + 3, 2, 1, 0, 0, 1, 2, 3}; // piece count key bit mask idx const uint64_t PIECE_COUNT_IDX[] = diff --git a/src/makefile b/src/makefile index 21b61641..2f0a93ad 100644 --- a/src/makefile +++ b/src/makefile @@ -4,8 +4,8 @@ EXE = berserk SRC = *.c pyrrhic/tbprobe.c CC = gcc -VERSION = 20220925 -MAIN_NETWORK = networks/berserk-d981c77e4fa7.nn +VERSION = 202209251606 +MAIN_NETWORK = networks/berserk-c982d9682d4e.nn EVALFILE = $(MAIN_NETWORK) DEFS = -DVERSION=\"$(VERSION)\" -DEVALFILE=\"$(EVALFILE)\" -DNDEBUG diff --git a/src/networks b/src/networks index 353e81dc..b2322fe1 160000 --- a/src/networks +++ b/src/networks @@ -1 +1 @@ -Subproject commit 353e81dcd1d1bf06a96cc8da9d307805a21f2fbd +Subproject commit b2322fe1e927c1699efaa75f1f280d7db6f7573f diff --git a/src/types.h b/src/types.h index 8ad92917..2ce7527e 100644 --- a/src/types.h +++ b/src/types.h @@ -24,9 +24,9 @@ #define MAX_SEARCH_PLY (INT8_MAX + 1) #define MAX_MOVES 128 -#define N_KING_BUCKETS 8 +#define N_KING_BUCKETS 16 -#define N_FEATURES (8 * 12 * 64) +#define N_FEATURES (N_KING_BUCKETS * 12 * 64) #define N_HIDDEN 512 #define N_OUTPUT 1