]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do more reductions at Pv nodes with low delta
[stockfish] / src / search.cpp
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