]> git.sesse.net Git - stockfish/commitdiff
Tweak history initialization
authorStefan Geschwentner <stgeschwentner@gmail.com>
Tue, 4 Oct 2022 16:16:20 +0000 (18:16 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 8 Oct 2022 16:09:02 +0000 (18:09 +0200)
Simplify initialization of continuation history by using everywhere the same starting value.

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 90952 W: 24312 L: 24153 D: 42487
Ptnml(0-2): 356, 10168, 24290, 10285, 377
https://tests.stockfishchess.org/tests/view/633948f235f43d649ff61fd0

LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 162416 W: 43540 L: 43466 D: 75410
Ptnml(0-2): 77, 16289, 48417, 16333, 92
https://tests.stockfishchess.org/tests/view/6339ee8a35f43d649ff63986

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

Bench: 4156027

src/search.cpp
src/search.h
src/thread.cpp

index 7019635dd34b6f4015822541621174fe5b90cb11..3c2ae3e52df8b0c43f8cc05a132c2adb801bef81 100644 (file)
@@ -1549,8 +1549,8 @@ moves_loop: // When in check, search starts here
       // Continuation history based pruning (~2 Elo)
       if (   !capture
           && bestValue > VALUE_TB_LOSS_IN_MAX_PLY
-          && (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold
-          && (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold)
+          && (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < 0
+          && (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < 0)
           continue;
 
       // movecount pruning for quiet check evasions
index 4ad5784f8db15d7ddf7e6b2fdfdef8a9d3033b7b..f264bcae84027972c52511f6e02fe5c67eb0c889 100644 (file)
@@ -31,9 +31,6 @@ class Position;
 
 namespace Search {
 
-/// Threshold used for countermoves based pruning
-constexpr int CounterMovePruneThreshold = 0;
-
 
 /// Stack struct keeps track of the information we need to remember from nodes
 /// shallower and deeper in the tree during the search. Each search thread has
index 288588b0ee84cd805f0bc4e52868c91e21a81731..9ce408e059e02ac119d567a1eda7377f96110f7c 100644 (file)
@@ -64,12 +64,9 @@ void Thread::clear() {
 
   for (bool inCheck : { false, true })
       for (StatsType c : { NoCaptures, Captures })
-      {
           for (auto& to : continuationHistory[inCheck][c])
-                for (auto& h : to)
-                      h->fill(-71);
-          continuationHistory[inCheck][c][NO_PIECE][0]->fill(Search::CounterMovePruneThreshold - 1);
-      }
+              for (auto& h : to)
+                  h->fill(-71);
 }