Skip to content

Commit

Permalink
16 King Buckets (#410)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jhonnold committed Dec 18, 2022
1 parent 63baa6c commit 5ddc45c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
Expand Down
4 changes: 2 additions & 2 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/networks
4 changes: 2 additions & 2 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5ddc45c

Please sign in to comment.