]> git.sesse.net Git - stockfish/commitdiff
Do more reductions at Pv nodes with low delta
authorMichael Chaly <Vizvezdenec@gmail.com>
Thu, 4 Nov 2021 15:35:01 +0000 (18:35 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 5 Nov 2021 21:18:59 +0000 (22:18 +0100)
This patch increases reduction for PvNodes that have their delta (difference between beta and alpha) significantly reduced compared to what it was at root.

passed STC
https://tests.stockfishchess.org/tests/view/617f9063af49befdeee40226
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 220840 W: 55752 L: 55150 D: 109938
Ptnml(0-2): 583, 24982, 58712, 25536, 607

passed LTC
https://tests.stockfishchess.org/tests/view/61815de959e71df00dcc42ed
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 79000 W: 19937 L: 19562 D: 39501
Ptnml(0-2): 36, 8190, 22674, 8563, 37

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

bench: 6717808

src/search.cpp
src/thread.h

index a712ce87bb77feca94399d739367e7049e98f3b1..46c95ef0979d89e8d856e5c79e9d902b224d19dd 100644 (file)
@@ -625,6 +625,8 @@ namespace {
         if (alpha >= beta)
             return alpha;
     }
+    else
+        thisThread->rootDelta = beta - alpha;
 
     assert(0 <= ss->ply && ss->ply < MAX_PLY);
 
@@ -1167,6 +1169,10 @@ moves_loop: // When in check, search starts here
               && bestMoveCount <= 3)
               r--;
 
+          // Increases reduction for PvNodes that have small window
+          if (PvNode && beta - alpha < thisThread->rootDelta / 4)
+              r++;
+
           // Decrease reduction if position is or has been on the PV
           // and node is not likely to fail low. (~3 Elo)
           if (   ss->ttPv
index e04d303a271996ee39f2335997e58e6fd4c3bcf7..fae866c4f30d21657f1ae396f5277a0b83cf50ee 100644 (file)
@@ -72,6 +72,7 @@ public:
   StateInfo rootState;
   Search::RootMoves rootMoves;
   Depth rootDepth, completedDepth;
+  Value rootDelta;
   CounterMoveHistory counterMoves;
   ButterflyHistory mainHistory;
   LowPlyHistory lowPlyHistory;