diff --git a/src/search.cpp b/src/search.cpp index e1508a7f06d..2da8599e28a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -53,6 +53,8 @@ using namespace Search; namespace { +static constexpr double evalLevel[10] = {1.043, 1.017, 0.952, 1.009, 0.971, 1.002, 0.992, 0.947, 1.046, 1.001}; + // Futility margin Value futility_margin(Depth d, bool noTtCutNode, bool improving, bool oppWorsening) { Value futilityMult = 118 - 44 * noTtCutNode; @@ -438,9 +440,10 @@ void Search::Worker::iterative_deepening() { timeReduction = lastBestMoveDepth + 8 < completedDepth ? 1.495 : 0.687; double reduction = (1.48 + mainThread->previousTimeReduction) / (2.17 * timeReduction); double bestMoveInstability = 1 + 1.88 * totBestMoveChanges / threads.size(); + int el = std::clamp((bestValue + 750) / 150, 0, 9); double totalTime = - mainThread->tm.optimum() * fallingEval * reduction * bestMoveInstability; + mainThread->tm.optimum() * fallingEval * reduction * bestMoveInstability * evalLevel[el]; // Cap used time in case of a single legal move for a better viewer experience if (rootMoves.size() == 1)