]> git.sesse.net Git - stockfish/commitdiff
Tweak history initialization
authorStefan Geschwentner <stgeschwentner@gmail.com>
Sun, 5 Dec 2021 15:29:51 +0000 (16:29 +0100)
committerStéphane Nicolet <cassio@free.fr>
Sun, 5 Dec 2021 17:13:49 +0000 (18:13 +0100)
Initialize continuation history with a slighlty negative value -71 instead of zero.

The idea is, because the most history entries will be later negative anyway, to shift
the starting values a little bit in the "correct" direction. Of course the effect of
initialization dimishes with greater depth so I had the apprehension that the LTC test
would be difficult to pass, but it passed.

STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 34520 W: 9076 L: 8803 D: 16641
Ptnml(0-2): 136, 3837, 9047, 4098, 142
https://tests.stockfishchess.org/tests/view/61aa52e39e8855bba1a3776b

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 75568 W: 19620 L: 19254 D: 36694
Ptnml(0-2): 44, 7773, 21796, 8115, 56
https://tests.stockfishchess.org/tests/view/61aa87d39e8855bba1a383a5

closes https://github.com/official-stockfish/Stockfish/pull/3834

Bench: 4674029

src/thread.cpp

index c03079d18e3da13522531962e3b87969fd4ddb83..ed3accc5f0bc72e6f3f2feb85c7aa42b5d233240 100644 (file)
@@ -67,7 +67,7 @@ void Thread::clear() {
       {
           for (auto& to : continuationHistory[inCheck][c])
                 for (auto& h : to)
-                      h->fill(0);
+                      h->fill(-71);
           continuationHistory[inCheck][c][NO_PIECE][0]->fill(Search::CounterMovePruneThreshold - 1);
       }
 }