Commit 0be6cd4
authored
Fix non-canonical hash after null moves (#1095)
increment_stack toggles the castling key out on every ply, which is the
remove-old-rights half of the pair that make_move completes when it
updates castling rights. make_null_move goes through increment_stack but
never toggles it back, so the hash after a null move is left off by the
castling term: a position reached via a null move hashes differently
from the same position parsed from FEN.
Move the castling toggle out of the shared increment_stack into
make_move, which owns both halves. Null moves now leave castling
untouched, matching the standard convention (Stockfish, Viridithas).
STC
Elo | 3.45 +- 2.88 (95%)
SPRT | 8.0+0.08s Threads=1 Hash=16MB
LLR | 2.92 (-2.25, 2.89) [-2.75, 0.25]
Games | N: 14716 W: 3733 L: 3587 D: 7396
Penta | [43, 1679, 3779, 1803, 54]
https://recklesschess.space/test/15402/
LTC
Elo | 2.57 +- 2.47 (95%)
SPRT | 40.0+0.40s Threads=1 Hash=64MB
LLR | 2.91 (-2.25, 2.89) [-2.75, 0.25]
Games | N: 17832 W: 4442 L: 4310 D: 9080
Penta | [7, 2002, 4764, 2138, 5]
https://recklesschess.space/test/15403/
Bench: 29317071 parent 22d7558 commit 0be6cd4
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments