Policy network v1 trained on Lc0 visit distributions #19
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
# Rigby - MCTS chess engine
|
# Rigby - MCTS chess engine
|
||||||
# OpenBench calls: make EXE=<name> [EVALFILE=<net>] [CXX=<compiler>]
|
# OpenBench calls: make EXE=<name> [EVALFILE=<net>] [CXX=<compiler>]
|
||||||
# A policy network is built in with POLICYFILE=<net> (default: none).
|
# POLICYFILE=<net> picks the built-in policy network; POLICYFILE= builds none
|
||||||
|
# (move heuristics).
|
||||||
|
|
||||||
SRC_DIR := src
|
SRC_DIR := src
|
||||||
OBJ_DIR := obj
|
OBJ_DIR := obj
|
||||||
@@ -8,8 +9,8 @@ OBJ_DIR := obj
|
|||||||
EXE ?= Rigby
|
EXE ?= Rigby
|
||||||
# The value network embedded into the binary
|
# The value network embedded into the binary
|
||||||
EVALFILE ?= networks/rigby-value-v1.bin
|
EVALFILE ?= networks/rigby-value-v1.bin
|
||||||
# The policy network embedded into the binary; none means move heuristics
|
# The policy network embedded into the binary; empty means move heuristics
|
||||||
POLICYFILE ?=
|
POLICYFILE ?= networks/rigby-policy-v1.bin
|
||||||
CXX ?= clang++
|
CXX ?= clang++
|
||||||
ifeq ($(origin CXX),default)
|
ifeq ($(origin CXX),default)
|
||||||
CXX := clang++
|
CXX := clang++
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ Every change is validated with SPRT on OpenBench.
|
|||||||
- Value: a `(768 -> 128)x2 -> 1` network trained with bullet on Lc0 data
|
- Value: a `(768 -> 128)x2 -> 1` network trained with bullet on Lc0 data
|
||||||
(`networks/rigby-value-v1.bin`, embedded at build time; see `train/README.md`),
|
(`networks/rigby-value-v1.bin`, embedded at build time; see `train/README.md`),
|
||||||
behind a capture-only quiescence search.
|
behind a capture-only quiescence search.
|
||||||
- Policy: a network trained on Lc0 visit distributions (`train/policy`), loaded
|
- Policy: a `3072 -> 1024 -> 3920` network trained on Lc0 visit distributions
|
||||||
with `PolicyFile` or built in with `POLICYFILE`; without one, move heuristics
|
(`networks/rigby-policy-v1.bin`, embedded at build time; see `train/README.md`).
|
||||||
(captures, promotions, checks, pawn threats).
|
Built without one (`POLICYFILE=`), move heuristics (captures, promotions,
|
||||||
|
checks, pawn threats).
|
||||||
- Tree reuse between moves: the subtree of the new position is packed to the
|
- Tree reuse between moves: the subtree of the new position is packed to the
|
||||||
front of the node arena in place, so it costs no extra memory.
|
front of the node arena in place, so it costs no extra memory.
|
||||||
- When the arena is full, the least visited parts of the tree are cut back to
|
- When the arena is full, the least visited parts of the tree are cut back to
|
||||||
@@ -40,8 +41,8 @@ make EXE=Rigby-dev
|
|||||||
make EVALFILE=path/to/quantised.bin
|
make EVALFILE=path/to/quantised.bin
|
||||||
```
|
```
|
||||||
|
|
||||||
`EVALFILE` defaults to `networks/rigby-value-v1.bin`. `POLICYFILE=<net>` builds a
|
`EVALFILE` defaults to `networks/rigby-value-v1.bin`. `POLICYFILE` defaults to
|
||||||
policy network in; by default there is none and the move heuristics are used.
|
`networks/rigby-policy-v1.bin`; `POLICYFILE=` builds the move heuristics instead.
|
||||||
|
|
||||||
Compiling with `-DRIGBY_VERIFY_TREE` checks the whole tree before and after every
|
Compiling with `-DRIGBY_VERIFY_TREE` checks the whole tree before and after every
|
||||||
reuse and after every collection (legal moves, visit counts) and aborts on the first
|
reuse and after every collection (legal moves, visit counts) and aborts on the first
|
||||||
@@ -91,7 +92,7 @@ terminal).
|
|||||||
| FPUReduction | 30 | First-play urgency reduction x100. |
|
| FPUReduction | 30 | First-play urgency reduction x100. |
|
||||||
| PolicyTemp | 100 | Policy softmax temperature x100. |
|
| PolicyTemp | 100 | Policy softmax temperature x100. |
|
||||||
| UCI_Chess960 | false | Write and read castling as the king taking its rook (`e1h1`). |
|
| UCI_Chess960 | false | Write and read castling as the king taking its rook (`e1h1`). |
|
||||||
| PolicyFile | `<empty>` | Policy network file to use instead of the built-in one or the heuristics. |
|
| PolicyFile | `<empty>` | Policy network file to use instead of the built-in one. |
|
||||||
|
|
||||||
## Bench
|
## Bench
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+8
-1
@@ -166,7 +166,14 @@ frame. Hidden: `clamp(acc[i], 0, 1) * clamp(acc[i + H/2], 0, 1)`.
|
|||||||
|
|
||||||
`train.ps1 --check checkpoints\<id>-<superbatch> --hidden <H>` prints the trainer's
|
`train.ps1 --check checkpoints\<id>-<superbatch> --hidden <H>` prints the trainer's
|
||||||
(float) policy of fixed positions; the engine's `policyfens` command prints the
|
(float) policy of fixed positions; the engine's `policyfens` command prints the
|
||||||
same with the quantised network. They agree to a few tenths of a percent.
|
same with the quantised network. They agree to a few tenths of a percent, a few
|
||||||
|
percent on very sharp distributions (rigby-policy-v1, 1.e4 e5: 80.2% vs 75.3%).
|
||||||
|
|
||||||
|
### Networks
|
||||||
|
|
||||||
|
| File | Data | Hidden | Superbatches | Final loss |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| `networks/rigby-policy-v1.bin` | test91 2026-10-25 .. 11-15 (171M positions) | 1024 | 10 (10 min) | 2.296 |
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user