X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimeman.cpp;h=3236b6e9bbb46ec15ad353607cba1a1a4dc8835c;hb=a0e2debe3f1d14f84984a9a2c1482dc41f695548;hp=f742d1e44221cd831022774a1163211812a81c56;hpb=7ffae17f85709e49672a0e98e136b66aea067b2c;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; }