diff --git a/src/search.cpp b/src/search.cpp index 9ee9fb791c1..f20e4f023e2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1070,11 +1070,16 @@ Value Search::Worker::search( if (value < singularBeta) { - int doubleMargin = 259 * PvNode - 194 * !ttCapture; - int tripleMargin = 90 + 266 * PvNode - 272 * !ttCapture + 107 * ss->ttPv; + int corrValAdj = std::abs(correctionValue) / 262144; + int doubleMargin = 249 * PvNode - 194 * !ttCapture - corrValAdj; + int tripleMargin = + 94 + 287 * PvNode - 249 * !ttCapture + 99 * ss->ttPv - corrValAdj; + int quadMargin = + 394 + 287 * PvNode - 249 * !ttCapture + 99 * ss->ttPv - corrValAdj; extension = 1 + (value < singularBeta - doubleMargin) - + (value < singularBeta - tripleMargin); + + (value < singularBeta - tripleMargin) + + (value < singularBeta - quadMargin); depth += ((!PvNode) && (depth < 15)); }