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 t n is the number of seconds remaining on the clock after n moves have been played, the next move will be allotted

t n t n + 1 = t n / α

seconds. Then t n + 1 = t n × ( 1 1 / α ) and so

t n = t 0 × ( 1 1 / α ) n .

If we’d like the engine to end a game 2 p ply long (that is, after p moves per side) with t 0 / u seconds remaining, we can work out what value we ought to pick for α :

t 0 / u = t 0 × ( 1 1 / α ) p 1 / u p = 1 1 / α α = 1 / ( 1 1 / u p )

For example, if we’d like the engine to use 9/10 of its time over 40 moves, then α 18 .

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 approx­i­mated 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 exp ( μ + σ 2 / 2 ) , its mode is exp ( μ σ 2 ) , and its median is e μ , and its probability density function is

pdf ( x ) = 1 x σ τ exp ( ( log x μ ) 2 2 σ 2 ) .

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 μ 4.2485 and σ 0.5627 . (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

P [ a < X < b ] = a b pdf ( x ) d x .

The partial expectation with respect to k is the expected value of X given that X > k, scaled by the probability that X > k:

part ( k ) = E [ X | X > k ] × P [ X > k ] = k x pdf ( x ) d x .

The conditional expectation of X with respect to k is the expected value of X given that X > k:

cond ( k ) = E [ X | X > k ] = part ( k ) / P [ X > k ] = ( k x pdf ( x ) d x ) / ( k pdf ( x ) d x ) .

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 :

rem ( k ) = E [ X | X > k ] k = cond ( k ) k .

Ahle provides an approximation of rem(k) for the game data he used in his analysis,

59.3 + 72 830 2330 k k 2 + 10 k + 2644 ,

which does not match rem(k) especially well for a log-normal distribution with μ 4.2485 and σ 0.5627 but does has a similar shape.

Linear

to-do

Neural

to-do

Increment

to-do

Targets & Limits

to-do

Adjustment

to-do