Temperature

Playing the hottest

Given several independent fights, play in the one with most at stake. The rule is simple, it is what strong Go players do without being told, it is provably close to optimal — and it is provably not optimal, which is the interesting part.

A board has broken into six independent fights. Each has a temperature — how much the next move there gains. Where to play?

Play in the hottest. It is the rule every strong Go player follows, it can be justified by a short argument, and it is not exactly right.

Move where it is hottestFour 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.{6 | 0}t = 3a big fight{2 | 0}t = 1a smaller one{1 | 0}t = 1/2small change{0 | 1}no temperaturesettled — a numbercomponenthow much is at stakethe whole position is worth {{{19/2 | 17/2} | {15/2 | 13/2}} | {{7/2 | 5/2} | {3/2 | 1/2}}}and the first move goes in the hottest part, which is a theorem up to a small error rather than a rule of thumb
Fig. 1 Several components with their temperatures, ordered. The rule is to take the top of the list, and the ordering is the play order for the rest of the game.

The exchange argument

Suppose two components are available, at temperatures t1>t2t_1 > t_2, and a player takes the cooler one.

The opponent then takes the hotter, gaining about t1t_1. Later the player takes what remains of the hotter component, gaining less. Compare with the alternative: take the hotter first, gaining t1t_1; the opponent takes the cooler, gaining t2t_2.

The difference between the two lines is about t1t2t_1 - t_2, in the first player’s favour if they take the hotter one. So taking the cooler component gives away roughly the gap between the temperatures.

Iterating over the whole sequence of moves gives the rule: the components should be taken in decreasing order of temperature, alternately, and the total is the alternating sum of the temperatures plus the sum of the means.

That is the standard heuristic, and it is what “big moves first” means.

Why it is not exact

The argument above treats each move as gaining exactly the temperature and then removing the component. Neither is true.

A move does not remove a component. It leaves a follow-up, often hot. A component at temperature three may leave a follow-up at temperature two, which then re-enters the ordering. The list is not consumed from the top; it is consumed and replenished.

Temperatures do not add. The temperature of the whole board is not any simple function of the components’ temperatures, so “how much the next move gains” is not exactly the component’s own temperature — it is that temperature measured against the board’s ambient temperature, which itself changes as moves are made.

Sente changes the accounting. A move whose follow-up is hotter than everything else on the board is nearly free: the opponent must answer, and the initiative returns. That move should be played before its own temperature suggests, because it does not cost the turn.

So the rule is a good approximation to something that has no exact simple form.

What a deeper position does to the shapeTwo thermographs. The first is a simple switch and its walls are straight; the second has an option that is itself a fight, and the wall bends where that inner fight cools out. Every bend in a thermograph is a decision changing hands.24012345{4 | 0}temperature 2 · mean 224012345{4 | {2|0}}temperature 3/2 · mean 5/2
Fig. 2 Two components whose thermographs bend. Where a wall has a vertex, the best move there depends on the board’s ambient temperature, so the ordering of components can change as the game cools.

The bounded error

What can be proved is that hottest-first is not far wrong.

The result, in the form usually quoted, is that greedy play by temperature loses at most the temperature of the hottest component compared with optimal play. So the error is bounded by a quantity that shrinks as the game cools, and by the end of the game it is negligible.

That is a strong enough guarantee to be practically decisive. On a board with a dozen fights, an error bounded by the single hottest temperature is small against a total that is the sum of a dozen means, and the rule gets the result right whenever the margin exceeds that bound.

It also explains why the rule is reliable in practice and unreliable in close games. When the outcome hinges on less than the hottest temperature, the bound guarantees nothing, and exact analysis is required. Which is another way of saying that close games are decided by things temperature does not see — including the infinitesimals, which are all at temperature zero and therefore invisible to the ordering.

Where it fails

Constructed counterexamples exist and are worth looking at, because the failures are of a kind.

Follow-up traps. A component at temperature three whose follow-up is at temperature four. Playing it hands the opponent a hotter move than the one just taken, and the exchange has lost ground. Correct play takes the temperature-two component first and leaves the trap alone.

Sente inversions. A component that is sente for one player and gote for the other. Its effective urgency differs by side, and a rule that assigns one number per component cannot express that.

Parity effects. With an odd number of equal-temperature components, who gets the last one matters, and the alternating-sum accounting is exactly what parity breaks.

None of these is exotic. All three occur in real Go endgames, and the traditional vocabulary has names for all three, which is a sign that players found them before the theory did.

An endgame, ordered

A worked board makes the accounting concrete.

Four independent components: A={62}A = \{6 \mid 2\}, B={51}B = \{5 \mid 1\}, C={31}C = \{3 \mid 1\}, D={20}D = \{2 \mid 0\}.

Means: 4,3,2,14, 3, 2, 1. Temperatures: 2,2,1,12, 2, 1, 1. Total mean 1010.

Left to move, playing hottest-first. AA and BB are tied at temperature two; take AA, reaching 66. Right takes BB, reaching 11. Left takes CC, reaching 33. Right takes DD, reaching 00.

Total: 6+1+3+0=106 + 1 + 3 + 0 = 10. Which is exactly the sum of the means, because the four components paired off evenly — two hot ones shared, two cool ones shared.

Now suppose Left blunders and takes DD first, reaching 00. Right takes AA, reaching 22. Left takes BB, reaching 55. Right takes CC, reaching 11. Total 0+2+5+1=80 + 2 + 5 + 1 = 8.

Two points lost, which is 2×(tAtD)=2×(21)2 \times (t_A - t_D) = 2 \times (2 - 1) — the exchange argument’s prediction exactly. Taking a component one unit cooler than the best available costs twice the gap, because the opponent takes the hot one and the swap happens in both directions.

That factor of two is the practical form of the rule, and it is why endgame errors are more expensive than they look.

The thermograph of {6 | 2}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.123456701234valuetemperaturetemperature 2mean 4Left's wallRight's wall{6 | 2} — mean 4, temperature 2
Fig. 3 The hottest component of the four. Its wedge is the tallest, so it is played first, and the height of the meeting point is what the exchange argument is comparing.

The last move

Parity deserves its own paragraph, because it is the part of the accounting that has nothing to do with temperature.

With an even number of components of equal temperature, they pair off and the means add cleanly. With an odd number, somebody takes the extra one, and the extra is worth its full swing rather than its mean.

So a board with three components at temperature two is not a board with a tidy answer. Whoever takes the first, third and — after the opponent takes the second — has gained a full temperature more than the alternating accounting suggests.

This is why Go players count the number of remaining gote moves and not merely their sizes, and why a single tempo move early can flip the parity of the whole endgame. It is also the clearest case of the ordering rule being insufficient on its own: two boards with identical component temperatures and different parities have different answers, and no rule that looks only at the sorted list of temperatures can tell them apart.

Against a fallible opponent

A last practical note, because the theory is about perfect play and games are not played that way.

Hottest-first is unusually robust. It does not depend on predicting the opponent, it degrades gracefully — taking the second-hottest costs the gap, not the game — and it never requires calculating a long line.

Exact play is the opposite. The optimal line in a position where hottest-first fails is typically narrow, depends on the opponent responding correctly, and collapses into something worse than greedy if they do not.

So the heuristic has a virtue the exact theory lacks: it is a rule a person can follow reliably. Against an imperfect opponent, reliably good is frequently better than occasionally optimal, and that is a consideration no value on this site records.

Small Domineering boards and what they are worthEvery value here was computed from the moves rather than looked up. Even on boards this small the values are switches and infinitesimals rather than numbers, which is the ordinary situation for a partizan game and the reason the theory needs more than arithmetic.2×21 | -1N2×32 | −1/2N3×31 | -1NLeft plays vertically, Right horizontally
Fig. 4 Real components with real values. Ordering these by temperature is a rule a player can apply at the board; evaluating their sum exactly is not.

What the solver computed

The temperatures in these figures come from thermograph in lib/cgt.js, which builds exact piecewise-linear walls and solves for their intersection. No temperature on this site was estimated from a picture.

The ordering claim was checked directly on the positions drawn. For each set of components, the code plays the game out under two policies — hottest-first, and every other order — and compares the results by the exact game recursion. Where hottest-first is optimal, the figure says so. Where it is not, the figure says that instead.

The follow-up trap shown was found by search rather than constructed by hand: an enumeration over small positions with hot options, looking for cases where the greedy order loses against a position the exact recursion wins. Those cases are rare among small positions and they exist, which is the honest statement — the rule is very good and it is not a theorem.

Cross-checking matters here more than usual, because a heuristic is exactly the kind of claim that is easy to state too strongly. The figures quote the bound, not optimality.

Ambient temperature

The refinement that makes the rule usable on a real board is to compare a component’s temperature against the board’s.

The ambient temperature is roughly the temperature of the hottest available move, and it is the tax rate a component is effectively being cooled at. A component whose thermograph has a vertex below the ambient temperature behaves one way; the same component behaves differently once the board has cooled past the vertex.

This is what makes thermographs worth drawing rather than reducing to two numbers. The bends say when a component’s best play changes, and the ambient temperature says which side of the bend the board is currently on.

In practice the ambient temperature is estimated — usually as the temperature of the hottest component — rather than derived, because there is no formula for the temperature of a sum. That estimate is where the judgement lives in applied endgame analysis, and it is the main thing separating a mechanical application of the theory from a good one.

A position is the sum of its partsFour separate Hackenbush sprigs. A move is a move in one of them, so the position is their disjunctive sum, and its value is the sum of their values. Which part to play in is the entire decision, and the values are what makes it decidable.2+-1+1/4=5/4outcome Leach sprig is a separate game; a move is a move in one of themthe total was computed by adding the games, not the labels
Fig. 5 Components summing to a total. The means add exactly and give the outcome; the temperatures do not add, which is why the play order is a heuristic and the score is not.

Why no exact rule exists

The obvious wish is for an operation on thermographs that yields the thermograph of a sum. It does not exist, and the reason is structural rather than a gap in the literature.

A thermograph summarises a position by what each player can guarantee at each tax rate. In a sum, a player’s guarantee depends on how the moves are distributed across components, which depends on the other components’ shapes — not merely on their walls. Two positions with identical thermographs can behave differently in the same sum, because their option structures differ below the level the thermograph records.

So the thermograph is a lossy summary, and the loss is exactly the information addition needs. That is not a defect of the diagram; it is the price of compressing a game into a picture, and it is why only the exact values add.

The consequence is that temperature theory is an approximation layer over an exact theory: the exact theory composes and is unaffordable, the approximation is affordable and does not compose. Applications live in the gap.

Go, and the direction of influence

The rule came from Go, and the traffic has gone both ways.

Go players have ordered endgame moves by size for centuries, with a developed vocabulary for sente, gote, follow-ups and the parity of the last move. The theory formalised it, which is the usual direction.

The unusual direction is what came back. Berlekamp and Wolfe’s Mathematical Go analysed positions that professionals had assessed by judgement, and in several cases found the professional assessment wrong — including a constructed endgame position, published in 1994, in which the theory’s line beat a professional player who had the position in advance.

That is a rare thing for combinatorial game theory to be able to claim, and it is worth being precise about the scope: it applies to late endgames that have decomposed, not to Go generally, where the theory has essentially nothing to say.

What a strong player is doing

The rule’s real interest is that it describes something people already do, which is unusual for a piece of this subject.

A strong Go player in the endgame is not computing thermographs. They are estimating the size of each available move, noticing which ones the opponent must answer, and taking the biggest of what is left — with adjustments for parity and for follow-ups. That is hottest-first with the standard corrections, arrived at by practice rather than derivation.

What the theory adds is not a better rule but an account of why the rule works and where it stops. The exchange argument says the cost of a mistake is twice the temperature gap. The bound says greedy play cannot lose by more than the hottest temperature. The counterexamples say which shapes to watch for. None of that is available from experience alone, and all of it is checkable.

It also sets a limit that experience tends to overstate. The rule handles the endgame and says nothing about the middlegame, because the middlegame has not decomposed into independent components and there is nothing to order. A player who believes the size-ordering intuition generalises upward is believing something the theory does not support.

Move where it is hottestFour 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.{6 | 0}t = 3a big fight{2 | 0}t = 1a smaller one{1 | 0}t = 1/2small change{0 | 1}no temperaturesettled — a numbercomponenthow much is at stakethe whole position is worth {{{19/2 | 17/2} | {15/2 | 13/2}} | {{7/2 | 5/2} | {3/2 | 1/2}}}and the first move goes in the hottest part, which is a theorem up to a small error rather than a rule of thumb
Fig. 6 The ordering that both the theory and the practice arrive at. What the theory contributes is the size of the error when the ordering is broken, and the shapes for which it is the wrong ordering.

What the rule is not

Two overreadings worth blocking.

It is not a scoring rule. Ordering by temperature says where to play, not what the position is worth; the worth is the sum of the means, and means and temperatures answer different questions.

And it is not a general principle of games. “Play the biggest move” is good advice in an endgame that has decomposed and is worthless in a middlegame, where the components are not independent and there is nothing to be biggest among. The rule’s scope is exactly the scope of the disjunctive sum, and outside it there is no theory here at all.

The bound has a matching caution. “Greedy play loses at most the hottest temperature” is a guarantee about the total, not about any single exchange, and it says nothing at all once the position is close enough that the margin is smaller than that temperature. In a game decided by infinitesimals, every component has temperature zero, the bound is vacuous, and the rule has no opinion.

Where the model stops

The rule is a heuristic with a bound, not a theorem of optimality. Constructed positions defeat it.

Ambient temperature is estimated. Its exact value has no formula.

It requires decomposition. A board that has not broken into independent regions has no components to order, so this is endgame machinery only.

It is blind below temperature zero. Every infinitesimal is at temperature zero, so the rule cannot distinguish positions that differ only by values that decide close games.

Normal play, as everywhere here.

The ladder from here

Nearby: the bound proved rather than quoted; sente and gote given exact definitions in terms of follow-up temperature; parity and the last-move effect; and orthodox accounting, which is the Go-specific bookkeeping built on the ordering.

Further out: the constructed counterexamples catalogued; the interaction between temperature and atomic weight as a game passes from hot to cold; and the general question of how much an approximation layer can be trusted when the exact theory below it is intractable.