X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimeman.cpp;h=3236b6e9bbb46ec15ad353607cba1a1a4dc8835c;hb=6ad4f485d37556f5e09baae5a939f44ac5b51c84;hp=f742d1e44221cd831022774a1163211812a81c56;hpb=84b42b3ab328e3f1b9829d8f5d967e4d45a45a39;p=stockfish diff --git a/src/timeman.cpp b/src/timeman.cpp index f742d1e4..3236b6e9 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -94,6 +94,14 @@ void TimeManagement::init(Search::LimitsType& limits, Color us, int ply) { optimumTime = TimePoint(optScale * timeLeft); maximumTime = TimePoint(std::min(0.8 * limits.time[us] - moveOverhead, maxScale * optimumTime)); + if (Stockfish::Search::Limits.use_time_management()) + { + int strength = std::log( std::max(1, int(optimumTime * Threads.size() / 10))) * 60; + tempoNNUE = std::clamp( (strength + 264) / 24, 18, 30); + } + else + tempoNNUE = 28; // default for no time given + if (Options["Ponder"]) optimumTime += optimumTime / 4; }