Skip to content

Commit

Permalink
Simplify time management a bit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vondele authored and snicolet committed Jan 14, 2019
1 parent 5446e6f commit 230fb6e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/search.cpp
Expand Up @@ -503,10 +503,7 @@ void Thread::search() {
fallingEval = std::max(0.5, std::min(1.5, fallingEval));

// If the bestMove is stable over several iterations, reduce time accordingly
timeReduction = 1.0;
for (int i : {3, 4, 5})
if (lastBestMoveDepth * i < completedDepth)
timeReduction *= 1.25;
timeReduction = lastBestMoveDepth + 10 * ONE_PLY < completedDepth ? 1.95 : 1.0;

// Use part of the gained time from a previous stable move for the current move
double bestMoveInstability = 1.0 + mainThread->bestMoveChanges;
Expand Down

0 comments on commit 230fb6e

Please sign in to comment.