X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimeman.cpp;h=45e9db5863ef4ce74bb415573942568bb39182d3;hb=dd1adce7488b20b4125946077bcbbf665b9797f7;hp=f794ab133326e8a31ed8a50044a7d62c92726cdc;hpb=c6ce612f0ada9b5f0d9530128545d1ee7d58b3e5;p=stockfish diff --git a/src/timeman.cpp b/src/timeman.cpp index f794ab13..45e9db58 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -64,9 +64,6 @@ void TimeManagement::init(Search::LimitsType& limits, Color us, int ply) { //Maximum move horizon of 50 moves int mtg = limits.movestogo ? std::min(limits.movestogo, 50) : 50; - // Adjust moveOverhead if there are tiny increments - moveOverhead = std::max(10, std::min(limits.inc[us] / 2, moveOverhead)); - // Make sure timeLeft is > 0 since we may use it as a divisor TimePoint timeLeft = std::max(TimePoint(1), limits.time[us] + limits.inc[us] * (mtg - 1) - moveOverhead * (2 + mtg)); @@ -80,9 +77,9 @@ void TimeManagement::init(Search::LimitsType& limits, Color us, int ply) { // game time for the current move, so also cap to 20% of available game time. if (limits.movestogo == 0) { - opt_scale = std::min(0.007 + std::pow(ply + 3.0, 0.5) / 250.0, + opt_scale = std::min(0.008 + std::pow(ply + 3.0, 0.5) / 250.0, 0.2 * limits.time[us] / double(timeLeft)); - max_scale = 4 + std::pow(ply + 3, 0.3); + max_scale = 4 + std::min(36, ply) / 12.0; } // x moves in y seconds (+ z increment)