]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Small cleanups 13
[stockfish] / src / search.cpp
index 56b56733fb2771aa998030887370622a408ff786..78a1f7b6eb9e038a5c24f415dd127a2ddb67c13b 100644 (file)
@@ -1058,7 +1058,7 @@ moves_loop: // When in check, search starts from here
                   && captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] < 0)
                   continue;
 
-              // See based pruning
+              // SEE based pruning
               if (!pos.see_ge(move, Value(-221) * depth)) // (~25 Elo)
                   continue;
           }
@@ -1161,7 +1161,7 @@ moves_loop: // When in check, search starts from here
           if (thisThread->ttHitAverage > 509 * TtHitAverageResolution * TtHitAverageWindow / 1024)
               r--;
 
-          // Reduction if other threads are searching this position
+          // Increase reduction if other threads are searching this position
           if (th.marked())
               r++;
 
@@ -1169,7 +1169,8 @@ moves_loop: // When in check, search starts from here
           if (ss->ttPv)
               r -= 2;
 
-          if (!PvNode && depth > 10 && thisThread->bestMoveChanges <= 2)
+          // Increase reduction at root and non-PV nodes when the best move does not change frequently
+          if ((rootNode || !PvNode) && depth > 10 && thisThread->bestMoveChanges <= 2)
               r++;
 
           if (moveCountPruning && !formerPv)