]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Tweak Late Move Reduction at root
[stockfish] / src / search.cpp
index f0fa6f05132522d5ca043e3a56e51841ab2c16a2..28cbffd6d4caa67d66d0210acdcfe7ce7dd5a978 100644 (file)
@@ -472,7 +472,10 @@ void Thread::search() {
                   ++failedHighCnt;
               }
               else
+              {
+                  ++rootMoves[pvIdx].bestMoveCount;
                   break;
+              }
 
               delta += delta / 4 + 5;
 
@@ -1072,7 +1075,8 @@ moves_loop: // When in check, search starts from here
       // Step 16. Reduced depth search (LMR). If the move fails high it will be
       // re-searched at full depth.
       if (    depth >= 3 * ONE_PLY
-          &&  moveCount > 1 + 3 * rootNode
+          &&  moveCount > 1 + 2 * rootNode
+          && (!rootNode || thisThread->best_move_count(move) == 0)
           && (  !captureOrPromotion
               || moveCountPruning
               || ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha