Cooling
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.
What a tax does
Take , worth on average with at stake.
With no tax, Left moving first gets and Right moving first holds it to . The two scores are four apart, and that gap is what makes it worth fighting over.
Charge a tax of per move. Left still moves to the option worth but pays a unit for the move, so Left’s score is ; Right’s is . The gap has closed to two.
Charge a tax of . Left’s score is and Right’s is . The gap has closed entirely, and neither player gains anything by moving — moving costs exactly what it wins.
Charge a tax of 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.
The tax at which the two scores meet is , which is the temperature, and the value they meet at is , 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.
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 is reading the thermograph at height , 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 pays a bonus of for moving instead of charging a tax. Applied to a number — a position where nobody wants to move at all — it manufactures a fight:
Left may take , Right may hold it to , both want to, and the resulting switch has mean and temperature by construction.
Cool that switch by and comes back. That round trip is the check the site’s gate runs on every build: 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.
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.
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 and a secondary crossing at behaves like a temperature- fight at first and like a temperature- 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 , the position’s scores are what they would be if every other move on the board were worth . 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.
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 thermograph is two horizontal lines at that value 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 on every build and requires exactness to a part in . 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.
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 and is worth whatever the option is worth, so the score falls linearly in 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.
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.
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.
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 and 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.