aboutsummaryrefslogtreecommitdiff
path: root/include/xorshift64.h
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-09-05 09:54:11 +0100
committertslil <tslil@posteo.de>2026-09-05 16:02:41 +0100
commitf6ea541ce762b190c7d68f221a24b555ebf0c80b (patch)
treee45e3d1fe740ed2c893cb7ee374ea99bd90f9d40 /include/xorshift64.h
parent1ca3309dad9d412870b2b793f33af7a7ccabd514 (diff)
training rework, best weights so far*
After quite a bit of experimentation it would appear that a far better way to train on self-play data in this setup is to randomise not the moves but the opening. The new selfplay and match binaries have lost the epsilon parameter and now play a random opening of some length before switching to pure, deterministic engine inference. This also resulted in a cleanup of nn_train.py. As an added bonus, in this configuration it makes sense to harvest training data from both sides in self-play and consequently the two sides are given distinct game ids (this was almost surely an oversight in the original version of TD(lambda) that i had). I also noticed that rand32 was not using the top 32bits of xorshitf*. *Under default settings nn_train.py produces a 5x5 weight set that doesn't lose a single game to any other cttei that i cared to look at, when measured using `racetrack` (which has a diverse balanced opening book).
Diffstat (limited to 'include/xorshift64.h')
-rw-r--r--include/xorshift64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/xorshift64.h b/include/xorshift64.h
index 2b13f60..120e337 100644
--- a/include/xorshift64.h
+++ b/include/xorshift64.h
@@ -30,7 +30,7 @@ extern uint64_t xors;
}
#define RANDOM64 (xors * 0x2545F4914F6CDD1D)
-#define RANDOM32 ((uint32_t)RANDOM64)
+#define RANDOM32 ((uint32_t)(RANDOM64>>32))
static inline uint64_t rand64(void) {
XORSHIFT64;