diff --git a/src/search.cpp b/src/search.cpp index 9b747e78..7c0601e6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -558,7 +558,7 @@ namespace { Move ttMove, move, excludedMove, bestMove; Depth extension, newDepth; Value bestValue, value, ttValue, eval, maxValue, probCutBeta; - bool givesCheck, improving, didLMR, priorCapture; + bool givesCheck, improving, didLMR, priorCapture, singularQuietLMR; bool capture, doFullDepthSearch, moveCountPruning, ttCapture; Piece movedPiece; int moveCount, captureCount, quietCount, improvement, complexity; @@ -945,7 +945,7 @@ moves_loop: // When in check, search starts here ss->killers); value = bestValue; - moveCountPruning = false; + moveCountPruning = singularQuietLMR = false; // Indicate PvNodes that will probably fail low if the node was searched // at a depth equal or greater than the current depth, and the result of this search was a fail low. @@ -1075,6 +1075,7 @@ moves_loop: // When in check, search starts here if (value < singularBeta) { extension = 1; + singularQuietLMR = !ttCapture; // Avoid search explosion by limiting the number of double extensions if ( !PvNode @@ -1167,6 +1168,10 @@ moves_loop: // When in check, search starts here if (PvNode) r -= 1 + 15 / (3 + depth); + // Decrease reduction if ttMove has been singularly extended (~1 Elo) + if (singularQuietLMR) + r--; + // Increase reduction if next ply has a lot of fail high else reset count to 0 if ((ss+1)->cutoffCnt > 3 && !PvNode) r++;