From: Dubslow Date: Fri, 1 Jul 2022 16:53:16 +0000 (-0500) Subject: Time mgmt fix division. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=aa18b68033403ee2d8d49df783cab32e6bccf59c;p=stockfish Time mgmt fix division. oversight changed the corresponding float division to integer division in a previous tune https://github.com/official-stockfish/Stockfish/commit/442c40b43de8ede1e424efa674c8d45322e3b43c it is stronger to keep the original float division. green LTC: https://tests.stockfishchess.org/tests/view/62bf34bc0340fb1e0cc934e7 LLR: 2.94 (-2.94,2.94) <0.50,3.00> Total: 38952 W: 10738 L: 10467 D: 17747 Ptnml(0-2): 46, 3576, 11968, 3833, 53 yellow STC: https://tests.stockfishchess.org/tests/view/62bff6506178ffe6394ba1d1 LLR: -2.95 (-2.94,2.94) <0.00,2.50> Total: 226960 W: 61265 L: 61062 D: 104633 Ptnml(0-2): 938, 24398, 62582, 24647, 915 further slightly tweaked tests confirm this Elo gain. closes https://github.com/official-stockfish/Stockfish/pull/4097 No functional change --- diff --git a/src/search.cpp b/src/search.cpp index f11d76be..07f18a34 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -472,7 +472,7 @@ void Thread::search() { double reduction = (1.56 + mainThread->previousTimeReduction) / (2.20 * timeReduction); double bestMoveInstability = 1 + 1.7 * totBestMoveChanges / Threads.size(); int complexity = mainThread->complexityAverage.value(); - double complexPosition = std::clamp(1.0 + (complexity - 277) / 1819, 0.5, 1.5); + double complexPosition = std::clamp(1.0 + (complexity - 277) / 1819.1, 0.5, 1.5); double totalTime = Time.optimum() * fallingEval * reduction * bestMoveInstability * complexPosition;