Temperature

What is at stake

Some positions both players are desperate to move in, and some neither player wants to touch. The difference is a number — how much the move is worth — and it turns out to be the most useful single quantity for deciding where to play.
19 min read 6 figures Who moves lastHow much is at stake

Assumes: The simplicity rule · Who moves last

Two positions sit on a board. In the first, whoever moves gains a great deal and whoever waits loses it. In the second, moving gains nothing and there is no hurry at all.

The difference is not about who wins either position. It is about how much is at stake, and it has a number.

The thermograph of {5 | 1}. Temperature runs up the page and value across it. Each wall is where a player is willing to move once a tax of that much is charged per move; above the temperature at which they meet, neither wants to move and the position is worth its mean value. The height of the meeting point is what is at stake.
Fig. 1 A position where Left can reach five and Right can reach one. Its mean is three and its temperature is two, and both are read off the walls of this diagram rather than estimated.

Switches

The simplest hot position is {51}\{5 \mid 1\}: Left moves to a position worth five, Right to one worth one.

Both options are numbers, so the simplicity rule is the obvious tool — and it does not apply, because it requires Left’s option to be below Right’s, and here it is above. That failure is the definition of a hot position.

What happens instead is that both players want to move. Left moving gains: the position becomes five rather than whatever it would have been. Right moving gains equally in the other direction. So the position is worth fighting over, and its worth splits into two parts:

The mean, 5+12=3\tfrac{5+1}{2} = 3, which is roughly what the position is worth if the move is shared fairly.

The temperature, 512=2\tfrac{5-1}{2} = 2, which is how much moving there gains.

Written together, {51}=3±2\{5 \mid 1\} = 3 \pm 2: a value of three, plus or minus two depending on who moves. Such positions are called switches, and they are the basic hot object.

Cold positions

A number is the opposite. 34\tfrac34 is a position where Left’s options are all below 34\tfrac34 and Right’s all above it, so moving in it loses ground for whoever moves.

That is the number-avoidance theorem in its practical form: moving in a number is never necessary and usually a mistake. In a sum containing a number and something else, there is always a move at least as good outside the number.

So numbers are cold — settled, worth what they are worth, not worth touching. Their temperature is negative, and by convention the temperature of a number xx is 1-1 or lower depending on the convention chosen; what matters is that it is below zero and below every hot position.

The vocabulary is from Go, where “big” and “urgent” moves are distinguished and where the settled parts of the board are exactly the cold ones.

A cold position goes on the same axes as a hot one, and putting it there is the quickest way to see what the diagram is measuring. The switch above opens into a wedge because the two players disagree about the position’s worth and the disagreement shrinks as the tax rises. A number produces no wedge at all: the two players agree at every tax rate, so there is nothing to close and the walls coincide in a single vertical line.

The thermograph of {1/2 | 1}. Temperature runs up the page and value across it. Each wall is where a player is willing to move once a tax of that much is charged per move; above the temperature at which they meet, neither wants to move and the position is worth its mean value. The height of the meeting point is what is at stake. The two marks on the base line are the stops — what each player gets by moving first and playing the fight out with no tax charged at all.
Fig. 2 The number 34\tfrac34, drawn on the axes the switch was drawn on. Its canonical form is {1/2 | 1} — Left’s option below Right’s, which is the arrangement the simplicity rule needs and the switch above lacks — and the two stops fall at the same place, 3/4, so the figure prints one label where the hot diagram prints two. The temperature comes back as −1 rather than as a small positive number: the recursion is reporting a settled position, and the negative sign is the convention that sorts numbers last when components are ranked by what is at stake.

The definition of temperature

The informal version above works for switches. The general definition is a cooling operation.

Cooling a game GG by tt, written GtG_t, is the game in which every move costs a tax of tt:

Gt={GtLtGtR+t}G_t = \{\, G^L_t - t \mid G^R_t + t \,\}

with the proviso that once the result is a number, further cooling leaves it alone.

As tt increases, the tax makes moving less attractive, and eventually it makes moving pointless — the cooled game becomes a number and stays one. The temperature of GG is the smallest tt at which that happens, and the number it becomes is the mean value.

For {51}\{5 \mid 1\}: cooling by tt gives {5t1+t}\{5 - t \mid 1 + t\}, which is still hot while 5t>1+t5 - t > 1 + t, that is while t<2t < 2. At t=2t = 2 both options equal three and the simplicity rule applies, giving the number three. So temperature two, mean three, matching the informal computation.

The general definition is worth having because most positions are not switches. It applies to any finite game and always terminates.

Why one number is enough to choose a move

The practical claim is this: on a board of several independent components, play in the hottest one.

The reasoning is an exchange argument. Each move in a hot component gains roughly its temperature. If a player takes a cooler component while a hotter one is available, the opponent takes the hotter one, and the difference between the two temperatures is lost. Repeating the comparison across the whole sequence of moves shows that playing hottest-first is optimal up to a bounded error.

That is not a theorem in the strong sense — the rule is not exactly optimal — but the error is small and bounded, and the rule is dramatically better than anything else available for large boards. It is the reason temperature theory is used in practice where exact evaluation is out of reach.

Move where it is hottest. four independent components of one position, ordered by temperature. The temperature is how much a player loses by moving somewhere else instead, so the hottest component is the one to take — and a component that is already a number has no temperature at all, because nobody gains by moving in it.
Fig. 3 Several components with their temperatures. The rule is to play in the hottest, and the ordering of temperatures is the ordering of urgency on the board.

The two questions temperature separates

The reason this quantity is useful is that it disentangles two things that are otherwise confused.

How much is this component worth? The mean value. It is a number, it adds like a number, and it says what the component contributes if the moves in it are shared.

How urgent is it? The temperature. It says how much the next move there gains, which is what decides where to play now.

A component can have a large mean and low temperature — a big settled advantage that nobody needs to touch. Or a small mean and high temperature — a nearly balanced fight where the next move swings a lot. The first can be ignored; the second cannot, and no single number that mixed the two would say so.

Go players have names for both and have had them for centuries: the size of a move and its urgency. Temperature theory is the formalisation, and the correspondence is exact enough that the theory made contributions back to Go endgame practice.

Sente and gote

Two Go terms deserve importing, because temperature explains them and they explain temperature.

A move is sente when the opponent must answer it — playing elsewhere would cost more than answering. A move is gote when the opponent is free to ignore it and play elsewhere.

In temperature terms: a sente move is one whose follow-up is hotter than anything else on the board, so leaving it unanswered concedes a large gain. A gote move is one whose follow-up is not.

The consequence is that sente moves are close to free — they are made, answered, and the initiative returns — while gote moves cost the turn. So a player wants to play sente moves first and save gote moves, which is exactly the ordering the play-the-hottest rule produces when the follow-up temperatures are accounted for.

What temperature adds to the traditional vocabulary is that sente and gote are not properties of a move in isolation. They depend on what else is on the board: a move is sente when its follow-up beats the current board temperature, so the same local position can be sente early and gote late. Go players know this and describe it as a move “becoming gote”; the theory says precisely when.

One position makes the definition concrete, and it is worth drawing because its numbers are not the ones a reader guesses. Take {5{40}}\{5 \mid \{4 \mid 0\}\}: Left moves to five, Right moves not to a number but to the fight {40}\{4 \mid 0\}. What Left gets by moving first is five and what Right gets by moving first is four, so the two stops are one apart — and yet the position’s temperature is not a half. It is one, because the wall is held up by an option that is itself contested and has its own temperature of two.

That gap between the stops and the temperature is exactly what sente is. The follow-up here is hotter than the position that leads to it, so a player who moves in it has made a threat the opponent has to answer, and the swing the two stops record is a swing nobody will be allowed to keep.

The thermograph of {5 | {4 | 0}}. Temperature runs up the page and value across it. Each wall is where a player is willing to move once a tax of that much is charged per move; above the temperature at which they meet, neither wants to move and the position is worth its mean value. The height of the meeting point is what is at stake. The two marks on the base line are the stops — what each player gets by moving first and playing the fight out with no tax charged at all.
Fig. 4 A sente shape, and the two readings of it that come apart. The stops are marked at the feet of the walls — five for Left and four for Right, one point between them — while the walls meet at a height of one, so the temperature is twice what the stops suggest. The reason is Right’s option: {40}\{4 \mid 0\} is a fight of temperature two, hotter than the position it is an option of, and a fight that hot has to be answered.

Reading a switch

The switch notation compresses a common shape and is worth unpacking once.

G=m±tG = m \pm t

means G={m+tmt}G = \{m + t \mid m - t\}: Left moves to m+tm+t, Right to mtm-t, the mean is mm and the temperature is tt.

{51}=3±2\{5 \mid 1\} = 3 \pm 2. {10}=12±12\{1 \mid 0\} = \tfrac12 \pm \tfrac12. {00}\{0 \mid 0\} would be 0±00 \pm 0, except that the position is \ast and its temperature is zero — a position where the move is worth having and gains nothing, which is the boundary case between hot and cold.

Switches add in a limited way. (m1±t1)+(m2±t2)(\,m_1 \pm t_1\,) + (\,m_2 \pm t_2\,) has mean m1+m2m_1 + m_2 — the means add exactly — and its temperature is not t1+t2t_1 + t_2, nor max(t1,t2)\max(t_1, t_2), nor anything so tidy. The sum is generally not a switch at all: it is a position with four options and a thermograph with more vertices than either part had.

That is the concrete form of the asymmetry below, and the reason switches are a starting point rather than a normal form.

Not every hot position is a switch

The switches are the easy case and they are not typical.

A switch has exactly one option each way, both numbers. A general hot position has options that are themselves hot, so moving in it leads to another fight rather than to a settled number. Those follow-ups are what make Go endgames intricate and what makes the thermograph a diagram rather than two numbers.

{{42}0}\{\{4 \mid 2\} \mid 0\} is such a position. Left’s move leads to a switch, not a number, so evaluating it means evaluating that switch first and then asking what the outer position is worth given the inner one. The thermograph handles this automatically — the walls of the outer position are built from the walls of the inner — and it is where the diagram earns its complexity.

The thermograph of {{4 | 2} | 0}. Temperature runs up the page and value across it. Each wall is where a player is willing to move once a tax of that much is charged per move; above the temperature at which they meet, neither wants to move and the position is worth its mean value. The height of the meeting point is what is at stake. The marks partway up the walls are the bends: the height at which the option holding a wall up stops holding it up. Each stands at the temperature of a follow-up. Every one of them is below the temperature of the position itself, which is where the two walls meet.
Fig. 5 The position named above, with the change of slope marked. Its mean is 32\tfrac32 and its temperature is 32\tfrac32, and the left wall has one bend in it, at a height of one — which is the temperature of {42}\{4 \mid 2\}, the inner fight. Below that height Left’s guarantee is held up by the inner fight; above it the inner fight has frozen and the wall runs straight. A switch has no such vertex anywhere, which is the visible difference between the two kinds of position.

What the solver computed

thermograph is the routine behind every diagram here. It builds the left and right walls by evaluating the cooled game at a series of temperatures and recording where each player’s best option lies.

The walls are exact piecewise-linear functions rather than sampled curves. Each is computed from the cooled options recursively, so a vertex in the wall is a point where the best option changes, and the site’s rule is that the temperature is read off as the height at which the two walls meet — a computed intersection, not a place where two drawn curves appear to cross.

For {51}\{5 \mid 1\} the code returns mean three and temperature two. That was checked by hand against the switch formula before any figure was drawn, and assertValue re-checks it before the figure is drawn. For {20}\{2 \mid 0\} it returns mean one, temperature one. For {10}\{1 \mid 0\}, which is not hot — Left’s option exceeds Right’s, so it is a switch — mean 12\tfrac12, temperature 12\tfrac12.

The case that matters for the code’s correctness is a cold one. For the number 12\tfrac12 the two walls coincide from the bottom of the diagram upwards, and the temperature comes back negative — the code reporting a settled position, rather than failing to find a crossing and returning something arbitrary.

The temperature of the small values

The values that decide close games sit at the bottom of the temperature scale, and their temperatures are worth knowing.

\ast has temperature zero. Moving in it gains nothing — both options lead to zero — but the move is worth having, since whoever moves wins it alone. Temperature zero is exactly this boundary: nothing at stake, and the tempo still matters.

The thermograph of {0 | 0}. Temperature runs up the page and value across it. Each wall is where a player is willing to move once a tax of that much is charged per move; above the temperature at which they meet, neither wants to move and the position is worth its mean value. The height of the meeting point is what is at stake. The two marks on the base line are the stops — what each player gets by moving first and playing the fight out with no tax charged at all.
Fig. 6 The boundary case, drawn. Both stops are nought and the walls meet at nought, so the temperature is exactly zero — the mast rises straight out of the ground. Compare it with the number above, whose temperature came back negative, and with the switch at the top, whose walls take two units of tax to close: this is the one height on the scale at which there is nothing at stake and the move is still worth having.

\uparrow has temperature zero as well, and so does every infinitesimal. They are not hot; there is nothing to fight over in them.

Every number has negative temperature, and by the number-avoidance theorem nobody wants to move there.

So the scale is: hot positions above zero, ordered by how much is at stake; the infinitesimals and nimbers exactly at zero; numbers below. And a game passes down that scale as it ends — the hot fights get resolved first, then the temperature-zero residue decides the outcome.

That is the sense in which infinitesimals decide close games. They are what is left when the temperature reaches zero, and if the numbers have cancelled by then they are all that is left.

Where mean values do and do not add

A caution that catches people, and that is the main limitation of the whole approach.

Mean values do add: the mean of a sum is the sum of the means. That is what makes them worth computing.

Temperatures do not. The temperature of a sum is not the sum, maximum or any other simple function of the component temperatures. A sum of two components at temperature two is not at temperature four, and usually not at temperature two either.

That asymmetry is why the play-the-hottest rule is a heuristic rather than a theorem. The means compose exactly and give the right answer about who is ahead; the temperatures do not compose and give an ordering of moves that is approximately right. Everything useful and everything approximate about temperature theory descends from that one fact.

The failure is not a small one, either, and it is worth stating in the form that surprises people most. Two copies of {20}\{2 \mid 0\}, each with a temperature of one, add to the number two — a position with no temperature at all, which neither player has any reason to touch. The heat has not been halved or averaged; it has gone. Nothing in the two diagrams, read side by side, predicts that, because what decides it is how the moves in one component answer the moves in the other, and a diagram of one component has no way to record that.

So the diagrams here are read one at a time and never combined, and the essays that combine them do it by computing the sum’s own diagram from scratch. There is no operation on two thermographs that yields the thermograph of their sum, and the reason is not that nobody has found it.

Where it came from

Temperature theory came out of Go, and specifically out of the observation that skilled players evaluate endgame moves by size and play them in order.

The mathematical development is Conway’s — cooling and heating appear in On Numbers and Games — and the applied development is Elwyn Berlekamp’s, from the 1980s onwards. Berlekamp and David Wolfe’s Mathematical Go (1994) analyses real Go endgames by these methods and produced positions in which the theory outplayed professional players, which is a rare and rather satisfying outcome for a piece of combinatorial theory.

The “thermograph” name and the diagram are Conway’s, and the vertical axis being temperature with the walls converging upward is his convention, which every subsequent treatment has kept.

Two numbers, two uses

The summary worth carrying away is that temperature theory replaces one hard object with two easy ones, and they are used for different things.

The mean is for adding up. It composes exactly, and the sum of the means over a decomposed board says who is ahead.

The temperature is for choosing. It does not compose, and its only use is comparative: this component is hotter than that one, so play here first.

Confusing the two produces the standard error of quoting a mean as though it were a position’s worth to a player about to move. A position with mean three and temperature two is worth five to whoever moves and one to whoever does not, and the mean is neither of those numbers — it is what the position contributes when the moves in it are shared, which is a statement about sums and not about play.

The compression is worth what it costs. An exact value is a tree and is unusable at the board; two numbers per component can be held in mind across a dozen components, which is the scale a real endgame has. That trade — exactness for usability, with the error stated — is the same one atomic weight makes at the cold end of the scale, and the two together cover most of what a player needs.

Where the model stops

Temperatures do not add. As above, and this is the central limitation.

The rule is approximate. Playing the hottest component is not always optimal. The error is bounded but real, and constructed counterexamples exist.

It requires decomposition. Temperature is a property of a component, and a board that has not broken into independent regions has no components to compare. This is why the theory is an endgame theory.

Cooling is a computation, and an expensive one. Building a thermograph means evaluating cooled games at many temperatures, and exact evaluation has a low ceiling. The thermographs on this site are of positions small enough to compute exactly.

Normal play. As everywhere here.

The ladder from here

temperature opens here with the pair of numbers: what a position settles at, and how much is at stake in moving there first.

Cooling and heating is the operator behind the pair, and playing the hottest is what the pair is for — a move rule with a proved bound on what it costs, which is the closest this subject comes to advice.

Many copies of one game is where the mean is given the definition it actually has: the number a pile of nn copies stays within a bounded distance of. And the first time it told somebody something is the apparatus meeting a real board, in the Go endgame work that is this theory’s one undisputed practical success.

The last two rungs take the pair apart. Big is not the same as hot separates the mean from the temperature at the point where a reader most reliably confuses them — a large fight and an urgent one are different things, and a position can be either without being the other. And what is left when the copies pair off computes the residue a pile leaves after its mean is subtracted, and finds it is a game rather than a small correction: bounded in size, unbounded in complexity, and hot every time.

Read in order they say that the two numbers are a genuine measurement, that they support a usable rule with a bound, and that what they throw away is not small — which is the whole of what a summary of a position can and cannot be.

Part 1 of 8

One argument about Temperature. The parts either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 61.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.

Cold gameCoolingEndgameHot gameHot positionMean valueSenteSwitchTemperatureThermograph