diff options
| author | tslil <tslil@posteo.de> | 2026-09-03 20:17:22 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-09-04 21:03:59 +0100 |
| commit | 1ca3309dad9d412870b2b793f33af7a7ccabd514 (patch) | |
| tree | 15ce96557f04a7eded89193f12065dcd64c33ec8 /include/weights_6.h | |
| parent | f11793dc0fddfcaad04b89827634cbb40fa98e59 (diff) | |
TD-leaf and another negamax bug
TD-lambda and TD-leaf are separated by the observation that minimax with a parameterised leaf heuristic is differentiable* in the parameters. "All" that had to be done was to extract the "principal variation": which one position survived all of the pruning to become the reported value.
This was a bit fiddly and uncovered a subtle bug (again) in negamax.c: we were not being complete in our overriding of the TT entry and by omitting key it was possible that later searches would find incorrect values.
The more interesting question to me was: how do we introduce enough variety while not corrupting the PV chain? I settled on having selfplay have one of the players be epsilon-random but the other greedy (minimax) and simply report only the greedy portion PV chain. This appears to work well enough in practice and doesn't introduce nonsense training data for the net (we don't force its actions to be nonsensical). I also deciced, perhaps in a departure from tradition, that we had good supervised labels for PVs that happened to be winning states, so the training overrides the targets in that case. Finally rolled back some of the ambition in nn_train.py default arguments.
*almost always
Diffstat (limited to 'include/weights_6.h')
| -rw-r--r-- | include/weights_6.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/weights_6.h b/include/weights_6.h index b572ffa..d1a7c99 100644 --- a/include/weights_6.h +++ b/include/weights_6.h @@ -21,9 +21,9 @@ #define SIX_INP_NUM (3 + 6 * 6) #define SIX_DENSE_NUM 64 -/* See weights_5.h for the alignment rationale. */ #define NN_ALIGNED __attribute__((aligned(16))) +extern const float six_embedding[7]; extern const float six_dense_weights[SIX_DENSE_NUM][SIX_INP_NUM] NN_ALIGNED; extern const float six_dense_biases[SIX_DENSE_NUM]; extern const float six_logit_weights[SIX_DENSE_NUM] NN_ALIGNED; |
