an introduction to
TIME MANAGEMENT
Sections
The problem of time management can be reduced, more or less, to a single question: given the current state of the game*
*At the very least, the amount of time remaining on one’s clock, but also possibly the increment, the number of moves already played, the current state of the board, and the amount of time remaining on the opponent’s clock.
and the state of the ongoing search, decide how much time to spend searching.
* At the very least, the amount of time remaining on one’s clock, but also possibly the increment, the number of moves already played, the current state of the board, and the amount of time remaining on the opponent’s clock.
We might divide an answer to this question into two components: a
base value
and an
adjustment.
In a sophisticated engine, the engine’s confidence might inform its allotment of time:
is one move obviously better than the others, so the engine can quit early and reserve its time? is the current position precarious, with a few moves that seem plausible, so more time is needed to decide which is actually correct? are there multiple moves that are good, so it doesn’t matter which the engine plays, and therefore the engine needn’t spend time determining which is marginally better?
and so on.
However, the engine’s sentiments can only be used to decide whether to spend
relatively
more time or less (an adjustment). It cannot be used to decide how much time should be spent
absolutely, or on average (the base value). Since every engine needs to calculate a base value, we’ll start with that.
§ Base Value
Geometric
Perhaps the simplest way to guarantee that an engine will not flag is to used a fixed fraction,
1 / α, of the remaining time. If
is the number of seconds remaining on the clock after
n moves have been played, the next move will be allotted
seconds. Then
and so
If we’d like the engine to end a game
ply long (that is, after
p
moves per side) with
seconds remaining, we can work out what value we ought to pick for
α :
For example, if we’d like the engine to use
9/10
of its time over 40 moves, then
.
Equidivided
to-do
based on the expected number of moves remaining
this is a value the engine has to estimate, and there is an endless number of ways to do so, which is its
own section
Shaped
to-do
§ Moves Remaining
Log-Normal
In his answer to the Stack Exchange question
What is the average length of a game of chess?, Thomas Ahle observed that the lengths of chess games are distributed log-normally.*
*More correctly, he noted that a particular data set of 731 000 games – played online by players with a rating above 2000 and which excluded blitz time formats – could be closely approximated by a log-normal distribution. However, we take it as a matter of faith that game lengths are distributed log-normally in general.
* More correctly, he noted that a particular data set of 731 000 games – played online by players with a rating above 2000 and which excluded blitz time formats – could be closely approximated by a log-normal distribution. However, we take it as a matter of faith that game lengths are distributed log-normally in general.
Log-normal distributions are uniquely determined by two parameters,
μ
and
σ. The mean of a log-normal distribution is
, its mode is
, and its median is
, and its probability density function is
For the games on which Ahle based his analysis, the median of duration was 70 ply and the mode was 51 ply, and so we can calculate
and
. (The mean was 79 ply.)
For comparison, the median length of a game when
performing sprt for Viridithas, an immensely stronger player than any player in the dataset used by Ahle, appears to be around 110 ply and the mean length is around 120 ply. (These games use the
uho
Lichess 4852 opening book, are usually played with time controls from
8+8/100
to
60+6/10
seconds, and are adjudicated. The length of a game does
not
include the book moves.)
The median length of a
tcec
game is around 130 ply and the mean length is around 140 ply. (These games are usually played with time controls from 1800+3 to 7200+30 seconds and are adjudicated. The length of a game does include the book moves.)
The probability that the duration
X
of a game is between
a
and
b
ply is
The partial expectation with respect to
k
is the expected value of
X
given that
X
>
k, scaled by the probability that
X
>
k:
The conditional expectation of
X
with respect to
k
is the expected value of
X
given that
X
>
k:
The expected number of plies remaining after
k
ply is then
⌜the
expected length of the game given that the game has lasted
k
ply⌝
minus
⌜the
number of half-moves made thus
far⌝ :
Ahle provides an approximation of
rem(k) for the game data he used in his analysis,
which does
not
match
rem(k) especially well for a log-normal distribution with
and
but does has a similar shape.
Linear
to-do
Neural
to-do
§ Increment
to-do
§ Targets & Limits
to-do
§ Adjustment
to-do