X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=1e133447d381b547f97d9ea93ab7aa7321d862f7;hp=3b3c0f2aeb0deb9f84b19782468669054c943970;hb=16566a8fcf76b9b72b6e746f318f77045df90017;hpb=383b12e1a5cc03a122e9a071eebde87eac85b116 diff --git a/src/search.cpp b/src/search.cpp index 3b3c0f2a..1e133447 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -630,7 +630,8 @@ namespace { Depth extension, newDepth; Value bestValue, value, ttValue, eval, maxValue; bool ttHit, ttPv, formerPv, givesCheck, improving, didLMR, priorCapture; - bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture, singularLMR; + bool captureOrPromotion, doFullDepthSearch, moveCountPruning, + ttCapture, singularQuietLMR; Piece movedPiece; int moveCount, captureCount, quietCount; @@ -971,7 +972,7 @@ moves_loop: // When in check, search starts from here depth > 12 ? ss->ply : MAX_PLY); value = bestValue; - singularLMR = moveCountPruning = false; + singularQuietLMR = moveCountPruning = false; ttCapture = ttMove && pos.capture_or_promotion(ttMove); // Mark this node as being searched @@ -1055,6 +1056,7 @@ moves_loop: // When in check, search starts from here // Futility pruning for captures if ( !givesCheck && lmrDepth < 6 + && !(PvNode && abs(bestValue) < 2) && !ss->inCheck && ss->staticEval + 270 + 384 * lmrDepth + PieceValue[MG][type_of(pos.piece_on(to_sq(move)))] <= alpha) continue; @@ -1091,7 +1093,7 @@ moves_loop: // When in check, search starts from here if (value < singularBeta) { extension = 1; - singularLMR = true; + singularQuietLMR = !ttCapture; } // Multi-cut pruning @@ -1197,7 +1199,7 @@ moves_loop: // When in check, search starts from here r--; // Decrease reduction if ttMove has been singularly extended (~3 Elo) - if (singularLMR) + if (singularQuietLMR) r -= 1 + formerPv; if (!captureOrPromotion)