]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Decrease LMR at PV nodes with low depth.
[stockfish] / src / search.cpp
index 2d24c31372b816004180042fd40b0db4eb0f9c4a..49d7c5c9b9db9b628f548d7539748919c626dea5 100644 (file)
@@ -560,6 +560,7 @@ namespace {
 
     // Step 1. Initialize node
     Thread* thisThread = pos.this_thread();
+    thisThread->depth  = depth;
     ss->inCheck        = pos.checkers();
     priorCapture       = pos.captured_piece();
     Color us           = pos.side_to_move();
@@ -1172,6 +1173,10 @@ moves_loop: // When in check, search starts here
           if (PvNode && !ss->inCheck && abs(ss->staticEval - bestValue) > 250)
               r--;
 
+          // Increase depth based reduction if PvNode
+          if (PvNode)
+              r -= 15 / ( 3 + depth );
+
           ss->statScore =  thisThread->mainHistory[us][from_to(move)]
                          + (*contHist[0])[movedPiece][to_sq(move)]
                          + (*contHist[1])[movedPiece][to_sq(move)]