From 385deefd807b512a1c404f5cc4c2045f265a800d Mon Sep 17 00:00:00 2001 From: mstembera Date: Fri, 22 Oct 2021 20:01:05 -0700 Subject: [PATCH] Fix sometimes incorrect key for prefetches STC https://tests.stockfishchess.org/tests/view/61737b4f6ce927be32558401 LLR: 2.95 (-2.94,2.94) <-2.50,0.50> Total: 138712 W: 34914 L: 34942 D: 68856 Ptnml(0-2): 421, 14817, 38894, 14817, 407 Very minor tweak since Position::key() depends on the 50 move rule counter. Comments: https://github.com/mstembera/Stockfish/commit/cddde31eed505cdf0c4fc8ff96b89f6e39c797e1 closes https://github.com/official-stockfish/Stockfish/pull/3759 No functional change --- src/position.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/position.cpp b/src/position.cpp index 0686d245..ae1da017 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1013,9 +1013,9 @@ void Position::do_null_move(StateInfo& newSt) { } st->key ^= Zobrist::side; + ++st->rule50; prefetch(TT.first_entry(key())); - ++st->rule50; st->pliesFromNull = 0; sideToMove = ~sideToMove; -- 2.39.2