diff --git a/src/search.cpp b/src/search.cpp index f045bc47962..dfb27285104 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -995,12 +995,17 @@ Value Search::Worker::search( lmrDepth += history / 5637; + Value futilityValue = + ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58) + 125 * lmrDepth; + // Futility pruning: parent node (~13 Elo) - if (!ss->inCheck && lmrDepth < 15 - && ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58) - + 125 * lmrDepth - <= alpha) + if (!ss->inCheck && lmrDepth < 15 && futilityValue <= alpha) + { + if (bestValue <= futilityValue && abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY + && futilityValue < VALUE_TB_WIN_IN_MAX_PLY) + bestValue = (bestValue + futilityValue * 3) / 4; continue; + } lmrDepth = std::max(lmrDepth, 0);