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.

Assumes: What is at stake · Reading a thermograph

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 hottest. six 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 here every one of them is still a fight.
Fig. 1 The six fights, 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. Two pairs come out tied, which is where parity starts to matter.

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.

All three failures have the same source: a component is not a fixed quantity that is consumed when it is taken. {4{20}}\{4 \mid \{2 \mid 0\}\} and {40}\{4 \mid 0\} look interchangeable in a list of temperatures and are not — the first leaves a fight behind when Right moves in it and the second leaves a number — and the diagram that records the difference does it by bending, at the height where the inner fight freezes out. A list of temperatures has no room for a bend.

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.

Quoting it is not the same as running it, and the rule is cheap enough to run. Every board of three components from a fixed pool, played out twice — once by a side that always moves in a hottest component, once by a side that evaluates the whole sum exactly — is a few hundred games, and the two scores can simply be subtracted.

What the rule costs. Every sum of three components from a fixed pool, played out twice: once with one side following the rule "move where the stake is largest" and once with both sides evaluating exactly. The rule is not optimal, the gap is bounded, and the bound is the largest temperature on the board.
Fig. 2 The rule against exact play over 220 sums of three components. It scores exactly what optimal play scores on 196 of them and costs something on 24, so it is genuinely not optimal; the most it ever costs is a single point; and the guarantee holds on all 220. The worst case is {20}+{20}+{10{91}}\{2 \mid 0\} + \{2 \mid 0\} + \{10 \mid \{9 \mid 1\}\}, which settles at eleven: exact play scores twelve and the rule scores eleven, giving up one point on a board whose largest stake is three.

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.

The first of them can be built on purpose, and building it is the honest way to test a rule: a pool of components each offering a large immediate gain and handing over a larger follow-up, so that greed is punished by construction. Four rules are run over the same boards — the two with a theorem behind them, a rule that plays the coldest live component, and a rule that simply grabs the biggest immediate gain — because a bound nothing has ever broken is a bound nobody has tested.

Five rules over 120 sums built to punish greed. Each rule plays every sum against an opponent evaluating exactly, on a pool whose components are traps: a large immediate gain that hands the opponent a larger follow-up. The pool was built to punish the greedy rule and does not — that rule scores a move by the stop it leaves, and a stop already contains the follow-up. What the traps catch is the rule below it, which scores a move by the territory it takes and loses up to 16.
Fig. 3 Five rules over 120 sums built to punish greed. Hottest-first stays inside the promise on all 120 and scores exactly on 92; the coldest rule breaks the promise 39 times and loses as much as 26; and taking the biggest territory available breaks it 11 times. The finding the traps did not produce is the interesting one: the greedy rule, which has no promise at all, scores exactly on 87 and never loses more than six, because it sizes a move by the position it leaves and that already contains the follow-up the trap was built from.

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.

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 here every one of them is still a fight.
Fig. 4 The four components of that board, ranked by what is at stake rather than by what they are worth. AA and BB come out tied at temperature two and CC and DD tied at one, which is where the parity of the last move starts to matter; the figure computes the total the accounting predicted, ten, from the four means alone. Nothing here says which of the two tied components to take, and the accounting above shows that on this board it does not matter.

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.

The asymmetry between the two is the practical case for the rule. Ordering a handful of components by temperature is arithmetic a person can do at a board; evaluating their sum exactly means a recursion whose cost grows with the whole position and is not something anybody does in their head. That the cheap procedure comes within a bounded distance of the expensive one is the entire practical content of this field.

What the solver computed

The temperatures in these figures come from thermograph, 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.

The obvious thing to try is to read the guarantee off the second temperature rather than the first, since the hottest component is the one being played and the loss is presumably about the reply. That works, and it is worth knowing how far the trick goes before it stops working.

How far down the stack the guarantee reaches. The temperatures of a sum's components, sorted largest first, with each position asked whether playing in the hottest component can lose more than the temperature sitting there. The first two never fail; the third fails on 681 sums.
Fig. 5 The same 1,734 sums with the guarantee read at four heights of the sorted temperature list. Read off the largest temperature it averages 3.89 and fails on none; read off the second largest it averages 2.07, is exactly attained on 233 sums and still fails on none; read off the third it averages 0.73 and is breached on 120. So the promise survives exactly one step down the stack and no further — which is the shape of the argument behind it, since a guarantee about the reply needs one component other than the one just played in and does not need a third.

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.

The division of labour is worth stating plainly, because it is not the one people expect from a theory. The rule was already known and is not the contribution. What the measurements above supply is the size of the mistake when the ordering is broken — twice the gap between the two temperatures — the size of the worst case over every board in a pool, and the classes of shape on which the ordering is the wrong one. A player who has been ordering endgame moves by size for thirty years gains nothing from being told to order them by size, and gains a great deal from being told what it costs when they cannot tell which of two moves is bigger.

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.

What the guarantee is denominated in

The rule comes with a bound and the bound is a bound on a score, which is worth stating plainly because it is not what a player most wants and the two are easy to run together.

A bound on the score says: play this way and the total at the end is within tt of what perfect play achieves. It is a statement in points, it is exact, and on a board where the margin is large it settles the game.

A bound on the outcome would say: play this way and win whenever perfect play wins. No rule of this kind can promise that, and the reason is structural rather than a matter of sharpening. Normal play is decided by the sign of the total, and the totals that decide close games are routinely infinitesimal — smaller than every positive number. A rule that can lose a fraction of a point on some board says nothing at all about a board whose whole margin is an up.

So the guarantee is a Go player’s guarantee, and that is where the apparatus was developed and where it is directly actionable: in a scoring game the score is the answer, so a bound on the score is a bound on the answer.

There is a second confusion the same bound invites, and it is about which quantity is being bounded. “Within one temperature of optimal” is a statement about the loss; it is routinely repeated as though it were a statement about the score, meaning that the rule might end a whole temperature below the board’s mean. Those are different claims and only one of them is true.

How much room is under the promise. Every sum of two or three components from a pool of twenty, including the traps built to punish greed — 1734 boards, each played out with one side following the hottest rule and the other evaluating exactly. The rule never ends below the board's mean, so the guarantee's whole temperature of margin goes unspent; read instead as the bound on the loss it is, the promise is attained 61 times.
Fig. 6 The promise read both ways over 1,734 sums. Read as a bound on the score it is enormously slack: the rule ends below the board’s mean on none of them and exactly on the mean on 217, so the whole temperature the guarantee allows is a temperature the rule never spends. Read as a bound on the loss it is exactly the right size and is attained 61 times — {{46}4}+{6{116}}+{55}\{\{4 \mid -6\} \mid -4\} + \{6 \mid \{1 \mid -16\}\} + \{5 \mid -5\} gives up five against a largest stake of five, with nothing to spare.

In the games this site mostly draws, the score is bookkeeping and the answer is a sign. The rule is still the right rule and the bound still says how much is being given away — but how much and who wins are different questions, and only the first has a promise attached. The second belongs to the atomic weight, which is the instrument for exactly the positions where this one has stopped measuring.

The rule players actually use

Nothing in this essay is how a Go player is taught to choose a move. The number in an endgame book is the swing — how much changes hands — which for a plain switch is exactly twice the temperature and for a move with a follow-up is not.

How much changes hands, against how much is at stake. Two ways of choosing where to move, run against optimal play over every board from a pool of three components. Biggest-first takes the component where the most changes hands, which is the count in every endgame book; hottest-first takes the one with the highest temperature. They disagree on most of these boards, the count costs points more often, and — the difference that matters — the count sometimes loses more than the largest temperature on the board, which is the bound the theory's rule is guaranteed to keep.
Fig. 7 The two rules run as players over every board from a pool built to separate them. They choose differently on 104 lines of 240, the count is strictly worse on 45 — and on six it loses more than the largest temperature, which is the bound this essay’s rule never breaks. Big is not the same as hot is the measurement.

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.

Part 3 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 44.

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.

Ambient temperatureEndgameExchange argumentGreedy playInfinitesimalSenteTemperatureThermographUp (↑)