1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Simplify time management a bit

The new form is likely to trigger a bit more at LTC. Given that LTC
appears to be an improvement, I think that is fine.

The change is not very invasive: it does the same as before, use
potentially less time for moves that are very stable. Most of the
time, the full bonus was given if the bonus was given, so the gradual
part {3, 4, 5} didn't matter much. Whereas previously 'stable' was
expressed as the last 80% of iterations are the same, now I use a
fixed depth (10 iterations). For TCEC style TC, it will presumably
imply some more moves that are played quicker (and thus more time
on the clock when it potentially matters). Note that 10 iterations
of stability means we've been proposing that move for 99.9% of search
time.

passed STC
http://tests.stockfishchess.org/tests/view/5c30d2290ebc596a450c055b
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 70921 W: 15403 L: 15378 D: 40140

passed LTC
http://tests.stockfishchess.org/tests/view/5c31ae240ebc596a450c1881
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17422 W: 2968 L: 2842 D: 11612

No functional change.
This commit is contained in:
Joost VandeVondele 2019-01-02 11:09:50 +01:00 committed by Stéphane Nicolet
parent 5446e6f408
commit 230fb6e9ad

View file

@ -503,10 +503,7 @@ void Thread::search() {
fallingEval = std::max(0.5, std::min(1.5, fallingEval)); fallingEval = std::max(0.5, std::min(1.5, fallingEval));
// If the bestMove is stable over several iterations, reduce time accordingly // If the bestMove is stable over several iterations, reduce time accordingly
timeReduction = 1.0; timeReduction = lastBestMoveDepth + 10 * ONE_PLY < completedDepth ? 1.95 : 1.0;
for (int i : {3, 4, 5})
if (lastBestMoveDepth * i < completedDepth)
timeReduction *= 1.25;
// Use part of the gained time from a previous stable move for the current move // Use part of the gained time from a previous stable move for the current move
double bestMoveInstability = 1.0 + mainThread->bestMoveChanges; double bestMoveInstability = 1.0 + mainThread->bestMoveChanges;