Temperature

Cooling

Charge a tax on every move and a fight becomes a number. The height of tax at which that happens is the temperature — so cooling is not a technique for finding the temperature, it is what the temperature is.

Assumes: What is at stake · Reading a thermograph

A switch is a position both players want to move in, and the amount they want it is the temperature. That is a definition by description, and descriptions are unsatisfying: it says what the number means without saying how to get it.

Here is an operation that produces it. Charge both players a tax for the privilege of moving — the same amount, every move, throughout the position — and watch what the tax does.

Cooling {5 | 1}, one degree at a time. The same position under a rising tax on moving. Each bar is what Left gets moving first and what Right gets moving first, once every move costs the tax. The bars close as the tax rises, and at the temperature they meet — and from there on the position is worth its mean value and neither player wants to touch it.
Fig. 1 The same position under a rising tax. Each bar spans what Left gets moving first and what Right gets moving first, once every move costs the amount on the left. As the tax rises the two close on each other, and above a certain height they have met and the position has stopped being a fight.

What a tax does

Take {51}\{5 \mid 1\}, worth 33 on average with 22 at stake.

With no tax, Left moving first gets 55 and Right moving first holds it to 11. The two scores are four apart, and that gap is what makes it worth fighting over.

Charge a tax of 11 per move. Left still moves to the option worth 55 but pays a unit for the move, so Left’s score is 44; Right’s is 22. The gap has closed to two.

Charge a tax of 22. Left’s score is 33 and Right’s is 33. The gap has closed entirely, and neither player gains anything by moving — moving costs exactly what it wins.

Charge a tax of 33 and the gap does not go negative. Once the tax exceeds what is at stake, nobody moves voluntarily, and the position sits at its mean value permanently — which is to say it has become a number, and nobody moves in numbers.

tax 0:[1,5]tax 1:[2,4]tax 2:[3,3]tax 3:[3,3].\text{tax } 0: [1,5] \qquad \text{tax } 1: [2,4] \qquad \text{tax } 2: [3,3] \qquad \text{tax } 3: [3,3].

The tax at which the two scores meet is 22, which is the temperature, and the value they meet at is 33, which is the mean. Both numbers came out of the operation rather than being put into it.

Cooling is the thermograph, read across

The two scores at each tax level are the two walls of the thermograph, and this is not a coincidence — it is what a thermograph is.

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. 2 The same information as a diagram. Temperature runs up the page, value across it, and each wall traces one player’s score as the tax rises. The point where they meet is the temperature and the mean, and every horizontal slice of this diagram is one row of the strip above.

A thermograph is usually introduced as a picture of a position and cooling as an operation on positions, with the connection stated afterwards. That order gets the logic backwards. Cooling by tt is reading the thermograph at height tt, and the diagram is a plot of the cooling operation against its own parameter.

The consequence worth carrying is that cooling needs no machinery of its own. The recursion that computes a thermograph — take each option’s thermograph, shift it inward by the tax, take the extreme — is the same recursion that computes cooling, run once and read many times.

Heating, and the round trip

The operation has an inverse, and it is worth having because it is the direction in which a check can be made.

Heating a game by tt pays a bonus of tt for moving instead of charging a tax. Applied to a number xx — a position where nobody wants to move at all — it manufactures a fight:

x heated by t  =  {x+txt}.x \text{ heated by } t \;=\; \{\, x+t \mid x-t \,\}.

Left may take x+tx+t, Right may hold it to xtx-t, both want to, and the resulting switch has mean xx and temperature tt by construction.

Cool that switch by tt and xx comes back. That round trip is the check the site’s gate runs before anything is published: heat a number by an amount, cool the result by the same amount, and require both scores to equal the original number exactly and the temperature to equal the original tax exactly.

The two directions have nothing in common computationally. Heating builds a position from two arithmetic expressions; cooling runs a recursion over piecewise-linear walls and solves for an intersection. Getting the original number back is a coincidence only if something is wrong.

The round trip is worth watching on the strip rather than reading off an equation, and the clearest case is the number nought heated by four. That produces {44}\{4 \mid -4\}: a fight over eight points in which neither player has any advantage at all, since the mean is nought and every point Left can win is a point Right can win back. Cooling it is the return journey, and the strip is that journey with the odometer showing.

Cooling {4 | −4}, one degree at a time. The same position under a rising tax on moving. Each bar is what Left gets moving first and what Right gets moving first, once every move costs the tax. The bars close as the tax rises, and at the temperature they meet — and from there on the position is worth its mean value and neither player wants to touch it.
Fig. 3 Nought, heated by four, cooled back. The gap opens at eight and closes by two for every unit of tax — eight, six, four, two — and at a tax of four the bar has become the point it started from. The mean is nought at every row, which is the half of the round trip that is easy to miss: heating never moved the value, it only opened a fight around it, and cooling shuts the fight without moving the value either.

Where cooling stops being reversible

Heating then cooling gets the number back. Cooling then heating does not always get the position back, and the failure is instructive.

Cooling a position by its full temperature collapses it to its mean, which is a number. Heating that number by the same amount produces a simple switch — two straight walls, symmetric about the mean. If the original position had a thermograph with a bend in it, the bend is gone and cannot be recovered.

What a deeper position does to the shape. Thermographs side by side, two of them, with temperature running up each panel and value across it: {4 | 0}, straight-walled; {4 | {2 | 0}}, with a bend where an option's own fight cools out. A wall that runs straight has nothing changing hands below the meeting point; a bend is an option's own fight cooling out at a lower temperature than this position's, and it is where a decision passes from one player to the other. The mark where the walls meet is the mean, at a height of the temperature.
Fig. 4 Two positions with the same kind of summary and different shapes. The left-hand one is a simple switch and its walls are straight. The right-hand one has an option that is itself a fight, and its wall bends where that inner fight cools out. Both have a mean and a temperature; only one is recoverable from them.

So the pair of numbers is a lossy summary, and cooling is the operation that performs the loss. That is not a defect — it is what a summary is for — but it means that a position cannot be replaced by its mean and temperature in general, only in the accounting where those are all that matter. Two positions may be interchangeable everywhere and that is a much stronger relation than sharing a summary.

The place this bites hardest is a position with several bends, where the temperature reports only the highest one. A component with temperature 44 and a secondary crossing at 11 behaves like a temperature-44 fight at first and like a temperature-11 fight afterwards, and a player who cooled it once and wrote down two numbers has thrown away the second act.

What the tax is a model of

A tax nobody pays is a strange thing to build a theory on, and it is worth saying what it stands in for, because the answer explains why the number it produces is useful.

The tax is a model of the rest of the board. A player deciding whether to take a fight worth two points is not choosing between taking it and doing nothing; they are choosing between taking it and taking something else. The cost of moving here is the value of the best move available elsewhere, and that is a real quantity even though no rule mentions it.

Cooling makes that opportunity cost a parameter and sweeps it. At tax tt, the position’s scores are what they would be if every other move on the board were worth tt. The temperature is the level of competition at which this component stops being worth taking — which is exactly the question a player asks about it.

That reading also explains why the temperature is a ranking device rather than a valuation. Two components are compared by asking which stays worth taking under a higher tax, and the one that does is the one to play in. Nothing has to be paid for the comparison to be meaningful; the tax is a common scale, and the scale is what makes two unlike fights comparable at all.

The reading also fixes what the units are, which is the practical thing to know about a temperature. A tax is measured in whatever the position is scored in, so a temperature is a price — the most a player should be willing to pay elsewhere for the right to move here. That makes small temperatures worth taking seriously rather than rounding away, because a board late enough will have nothing on it worth more.

Cooling {2 | 1}, one degree at a time. The same position under a rising tax on moving. Each bar is what Left gets moving first and what Right gets moving first, once every move costs the tax. The bars close as the tax rises, and at the temperature they meet — and from there on the position is worth its mean value and neither player wants to touch it.
Fig. 5 A fight over a single point, taxed a quarter at a time. The gap opens at one and is gone by a tax of a half, so this component is worth taking while the rest of the board offers less than half a point and not afterwards. Nothing about the operation changes at this size; only the grid the tax is swept on has to be fine enough to catch where the bar shuts, which is what the quarter steps are for.

Several components at once is the situation being modelled, and it is the reason the number is comparative. Each offers a move, a player can take one of them per turn, and what the tax stands for is whatever the best of the others was worth. A stack of coupons is that idea made finite and playable.

Why the tax is charged all the way down

If the tax stands for the best move available elsewhere, one detail of the definition needs justifying: it is charged on every move, at every depth of the tree, and not once at the top.

Charging it once would model something quite different — an environment with exactly one alternative move in it, taken or forgone at the first turn and gone thereafter. That is not the situation. A player who declines this component and plays elsewhere faces the same choice again next turn, and again after that, because the rest of the board still has moves in it.

So the recursive charge is the model saying the environment persists. Every level of the tree is a turn, every turn has an elsewhere, and every elsewhere is worth about the same — which is the idealisation the whole construction rests on and the one worth naming, because it is the assumption that fails first in a real game.

It fails as the board empties. The alternatives are not worth a constant tt for ever; they run out, and the last few are worth less than the first few. Cooling models an environment of unlimited moves all worth the same, and a real endgame is an environment of finitely many moves of decreasing value.

That is exactly what a stack of coupons is built to be: a finite environment, of stated and decreasing sizes, which two people can actually sit down with. The coupon stack is the concrete version of the idealisation and cooling is the limit of it, and the reason the site has both is that only one of them can be played.

Which makes the model testable

Read that way, the tax is not an accounting device but a claim about play, and a claim about play is something a search can be pointed at.

The claim: a component cooled by tt should behave like the same component sitting beside an environment whose moves are worth tt. If it does not, the tax is the wrong model of the elsewhere, whatever elegant properties the operator has.

This site checks it in the one place it bites hardest. Whether a move must be answered is measured by taking a local fight, putting it beside a real switch of each temperature in turn, and solving the whole board — not by cooling anything. The crossover found that way lands where the cooling picture says it should, which is the model earning its keep against an actual opponent rather than against its own diagram.

And it explains why the temperature is a ranking device and not a valuation, which the section above asserts. A valuation would have to survive being read alone; a ranking only has to survive comparison. The tax is a common environment applied to two components at once, so what it produces is meaningful between them and not about either — and that is precisely as much as the opportunity-cost story licenses, since an opportunity cost is by construction a comparison.

That is worth holding against the temptation the two-number summary invites. Mean and temperature look like a measurement of one position, in the way a length is a measurement of one object. They are the output of an operation that modelled everything else, and the second number in particular is a statement about the company the position is expected to keep.

What the solver computed, and how

Nothing here is evaluated by the formulas above. The strip and both thermographs are produced by the same recursion.

For a number, the two walls coincide in a single vertical line at that value — temperature runs up the page, so a wall that never moves is vertical — and the temperature is reported as negative — a convention chosen so that numbers sort last when components are ordered by what is at stake.

For anything else: compute the thermograph of every option; shift Left’s options’ right walls down by the tax and take the pointwise maximum, giving Left’s wall; shift Right’s options’ left walls up by the tax and take the pointwise minimum, giving Right’s. Walls are carried as exact lists of breakpoints, so the operations are on piecewise-linear functions rather than on samples, and the crossing is found by solving a linear equation on the interval where the sign of the difference changes.

The cooled scores at a given tax are then two lookups into those walls. coolScores does exactly that and nothing else, which is why cooling needed no new code on this site — it is a reading, not a computation.

The gate runs five heat-and-cool round trips and requires exactness to a part in 10910^9. It also requires the temperature of a heated number to come back as the heating amount, which is a second, independent thing that could be wrong.

Where the model stops

The tax is uniform. Every move costs the same, everywhere in the position, at every depth. A game in which some moves are more expensive than others is a different object and cooling as defined here does not describe it.

Cooling does not commute with everything. Cooling a sum is not always the sum of the cooled components, and the failure is exactly where the interesting behaviour is. Where it does hold, the accounting of a whole endgame becomes arithmetic; where it does not, that arithmetic is out by a bounded amount.

Temperature is a single number for a position that may need several. As above: a thermograph with two bends has two temperatures in any useful sense, and the word refers only to the top one.

Infinitesimals have no temperature to speak of. An all-small position has temperature zero or thereabouts, and cooling says nothing useful about it — a different measurement is needed, and the fact that these two theories cover disjoint territory is why both exist.

Normal play. The base case of the thermograph recursion is a position with no moves, and its being a loss for the mover is the convention everything rests on.

And what the operation is finally for is an ordering. Cool every component of a board by the same rising tax and they freeze one after another, in a definite order; that order is the order to play them in, and the components that were numbers before the tax started are the ones nobody ever has to touch. The whole of the practical theory is that sentence, and the rung that spends it is playing the hottest.

Reading the strip carefully

The first figure repays a second look, because two of its rows say something the arithmetic above does not.

The bars close at a constant rate. Each unit of tax narrows the gap by two — one from each side — because both walls move inward at one unit of value per unit of tax. That slope of one is not an artefact of the example; it is forced, since a move costs tt and is worth whatever the option is worth, so the score falls linearly in tt with slope exactly one.

That is why the temperature of a simple switch is half the gap rather than the gap. The two walls approach at combined speed two, so a gap of four closes at a tax of two.

Four rows are not many to read a rate off, so here is the same claim over a fight big enough for the arithmetic to be unmistakable.

Cooling {8 | −2}, one degree at a time. The same position under a rising tax on moving. Each bar is what Left gets moving first and what Right gets moving first, once every move costs the tax. The bars close as the tax rises, and at the temperature they meet — and from there on the position is worth its mean value and neither player wants to touch it.
Fig. 6 A ten-point fight, taxed one unit at a time. The gaps run ten, eight, six, four, two, nought — one row per unit, two points of closing per row, with no row out of step — and the bar shuts at a tax of five, which is half of ten. The mean is three throughout and the bar is not symmetric about it, which is the second thing this row of numbers settles: the closing rate is a fact about the tax and has nothing to do with where the position sits.

The rows above the temperature are the second thing. They are identical — the bar has become a point and stays a point however high the tax goes. A position that has frozen does not un-freeze, and no amount of further tax makes it worth less or more than its mean.

ttemperature    Left’s score=Right’s score=mean.t \geq \text{temperature} \;\Longrightarrow\; \text{Left's score} = \text{Right's score} = \text{mean}.

The freezing is permanent, and it is what makes the mean well defined. If the two scores could separate again at some higher tax, “the value it settles at” would not be a single number and the whole apparatus would have nothing to report.

Cooling {4 | 0}, one degree at a time. The same position under a rising tax on moving. Each bar is what Left gets moving first and what Right gets moving first, once every move costs the tax. The bars close as the tax rises, and at the temperature they meet — and from there on the position is worth its mean value and neither player wants to touch it.
Fig. 7 A second position under the same treatment, with a tax that overshoots. The bar closes at a tax of two and the last row, at a tax of three, is identical to the row at two. Cooling past the temperature does nothing at all, which is what makes the temperature a well-defined height rather than a place the diagram happens to be narrow.

The generalisation

Cooling has a relative that is stranger and more useful than it looks: cooling by an infinitesimal amount.

Charge a tax smaller than every positive number. Positions that were fights stay fights, because their temperature is a positive number and the tax cannot reach it. Positions that were already numbers stay numbers. But positions that were infinitesimally close to zero — the all-small ones — get flattened, and what emerges is a position stripped of everything that does not matter against a background of large fights.

The result is the reduced canonical form, and it is the right notion of “the same position for practical purposes” in a game where the small change is going to be irrelevant. Two positions with the same reduced canonical form play identically in any sum containing something hot, and may play differently in a sum of nothing but infinitesimals.

That is a second summary with a second loss, and it is a good illustration of the pattern this subject runs on: each layer of approximation is exact within a stated range and blind outside it, and the ranges are chosen so that between them they cover the positions that occur.

Who found it, and when

Cooling, heating and thermographs are Conway’s, worked out with Elwyn Berlekamp around 1970 and set out in On Numbers and Games and then in Winning Ways.

The motivation was Go, and specifically the observation that strong players evaluate an endgame region by asking how big it is — how many points the move there is worth — and then play the biggest. Formalising “how big” is exactly the problem cooling solves, and the fact that the answer is the height at which a diagram closes rather than a difference of scores is the part that had to be discovered.

Berlekamp went on to build the thermographic method into a working system for Go endgames, and the demonstrations in which it out-played professionals on constructed positions in the 1990s are the most direct evidence that the abstraction is the right one. The tax is imaginary; the points it predicts are not.

The ladder from here

This anchor began with what is at stake, which asks the question, and this rung supplies the operation that answers it. Reading a thermograph is the same object approached as a diagram, and playing the hottest is what the answer is spent on.

Later rungs: the mean value theorem, proved by cooling many copies. Cooling by infinitesimals, which is the reduced canonical form. Thermographs with several bends and what a second temperature means. Sente and gote — the asymmetric fights where one player’s move demands a reply — which is where the simple picture of a symmetric switch finally breaks. And the failure of cooling to distribute over sums, which is the error term in every endgame estimate.

The thing to carry from this rung is that the temperature was not defined and then measured. It is the output of an operation, the operation is a tax, and the tax is imaginary in exactly the way an interest rate is imaginary — nobody pays it, and it decides what things are worth.

Part 2 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 17.

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.

Canonical formCoolingFreezing pointHeatingMean valueSwitchTax on movingTemperatureThermograph