Temperature

Reading a thermograph

A thermograph is two walls rising from a number line, closing in as the tax on moving increases, and meeting where the position stops being worth fighting over. Everything about a position's hotness is in the shape.

The thermograph is one diagram carrying a position’s entire hot behaviour: what it is worth, how urgent it is, and how both change as the cost of moving rises.

It looks like two lines leaning towards each other. Reading it takes five minutes and repays them.

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.012345601234valuetemperaturetemperature 2mean 3Left's wallRight's wall{5 | 1} — mean 3, temperature 2
Fig. 1 The thermograph of a switch. Value runs along the horizontal axis, temperature up the vertical, the two walls close in as the tax rises, and the height at which they meet is the temperature.

The axes

Horizontal: value. Positions to the right are better for Left.

Vertical: temperature. Zero at the bottom, increasing upwards. Height tt shows the position as it is after cooling by tt — that is, with every move taxed tt.

At each height there are two marks: the best Left can guarantee at that tax, and the best Right can. Stacking those marks over all heights gives the two walls, left and right.

The left wall is on the right-hand side of the diagram and vice versa, which reads backwards until it is seen once. Left’s wall marks how far right Left can push the value; Right’s marks how far left Right can push it. So the walls face each other with the truth between them.

The bottom

At temperature zero there is no tax, and the two walls sit at the extremes the players can reach outright.

For {51}\{5 \mid 1\}: Left, moving, reaches five; Right reaches one. So the walls start at five and one, four apart. The gap at the bottom is the confusion interval — the range of numbers the position is confused with. {51}\{5\mid1\} is confused with every number strictly between one and five, and greater than every number below one, and less than every number above five.

That gap has a direct reading: it is the range over which the position’s outcome depends on who moves. Wide gap, much at stake.

The walls closing

As the tax rises, both players’ reachable extremes shrink. Left, taxed tt per move, reaches only 5t5 - t; Right reaches 1+t1 + t.

So the left wall runs from five leftwards at slope one, and the right wall from one rightwards at the same slope. They approach and meet.

5t=1+t    t=25 - t = 1 + t \implies t = 2

They meet at height two, at value three. Height two is the temperature; value three is the mean value. Above the meeting point the walls coincide and rise vertically together — the mast — because a position cooled past its temperature is a number and stays that number however much more it is taxed.

The whole diagram, then: a wedge from a gap at the bottom to a point, and a vertical mast above it. The mast’s horizontal position is the mean; the wedge’s height is the temperature.

The thermograph of {4 | 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.1234501234valuetemperaturetemperature 1mean 3Left's wallRight's wall{4 | 2} — mean 3, temperature 1
Fig. 2 A cooler position. The bottom gap is narrower, the walls meet lower, and the mast sits at the mean — the same anatomy at a smaller scale.

Vertices, and why the walls bend

For a switch the walls are straight, because there is only one option each way. Positions with several options, or options that are themselves hot, produce walls with vertices.

A vertex is a height at which the best option changes. Below it, one option is best; above it, taxed more heavily, another is. The wall bends where the crossover happens.

That is why a thermograph carries more than two numbers. A position with a bent wall behaves differently at different temperatures — an option that is best on a quiet board is not best on a busy one — and the bends record exactly where the switchover lies.

Reading them: a vertex on the left wall at height tt means Left’s preferred move changes at board temperature tt. That is directly actionable, and it is what the diagram gives that a pair of numbers cannot.

Recursive construction

The walls are built from the options’ walls, which is why the diagram works for positions of any depth.

The left wall of GG at temperature tt is the maximum over Left’s options of that option’s right wall at tt, minus tt. The switch of side is the essential part: after Left moves, it is Right to play, so what matters is what Right can then guarantee.

Symmetrically for the right wall, with minimum and plus tt.

That recursion bottoms out at numbers, whose thermographs are a single vertical mast at their own value with no wedge at all — nothing at stake, so nothing to draw. Every thermograph is therefore a stack of masts and wedges assembled from below, and a bent wall is where two of the sub-diagrams handed over.

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. 3 Two thermographs side by side. Each was built from its options’ thermographs, and the difference in their shapes is the difference in how their options rank at different taxes.

A thermograph built by hand

The recursion is easier to trust after building one, so here is a two-level position taken from the bottom up.

G={{42}0}G = \{\, \{4 \mid 2\} \mid 0 \,\}

The inner switch first. {42}\{4 \mid 2\} has mean three and temperature one. Its left wall runs from four leftwards at slope one, its right wall from two rightwards, and they meet at height one, value three. Above that, a mast at three.

Now the outer position’s right wall. Right’s only option is 00, a number, whose thermograph is a mast at zero. Right’s wall of GG at temperature tt is that mast plus tt: a line from zero running rightwards at slope one.

And the left wall. Left’s only option is the inner switch, so the left wall of GG at tt is the inner position’s right wall at tt, minus tt. Below height one that right wall is at 2+t2 + t, so the outer left wall is at 2+tt=22 + t - t = 2 — vertical. Above height one the inner right wall is the mast at three, so the outer left wall is at 3t3 - t, sloping left.

The vertex. At height one the left wall bends, from vertical to sloping. That bend is the signature of the inner switch resolving: below temperature one the inner fight is live and Left’s option is worth what Right can hold it to; above it the inner fight is settled at three and the tax starts to bite.

The meeting. The walls meet where 3t=t3 - t = t, at t=32t = \tfrac32, value 32\tfrac32. So GG has mean 32\tfrac32 and temperature 32\tfrac32.

Neither number is guessable from the braces. The bend is what makes the difference, and it exists because one of the options was itself hot.

The thermograph of {4 | 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.1234501234valuetemperaturetemperature 1mean 3Left's wallRight's wall{4 | 2} — mean 3, temperature 1
Fig. 4 The inner switch, whose thermograph is the ingredient of the calculation above. Its mast at three is what the outer position’s left wall follows once the tax exceeds one.

Common misreadings

Four, in the order they usually occur.

The walls are swapped. Left’s wall is on the right. It marks how far right Left can push the value, and Left prefers larger values, so it is the right-hand boundary of the wedge. Everybody reads this backwards the first time.

The meeting point is not the value. It is at height equal to the temperature and horizontal position equal to the mean. Two different quantities read off one point, and the vertical coordinate is not a value at all.

The bottom gap is not an error bar. It is the confusion interval — the numbers this position is genuinely confused with. Not a range of uncertainty about a true value; the position really does behave differently against different numbers in that range.

The mast is not “the value of the position”. The position is not a number, and the mast is the number it becomes when cooled enough. A position with mean three is not worth three; it is worth three when the moves in it are shared, and worth five or one when they are not.

That last one is the important one. The mean is a summary that is exactly right for adding up and exactly wrong for playing.

Four things a position can beEvery position falls into one of four outcome classes, and only three of them correspond to a comparison with zero. The fourth — first player wins — is a position confused with zero, neither greater, smaller nor equal, and it is where the subject departs from arithmetic.0outcome P= 0whoever must move, loses10outcome L> 0Left wins, whoever starts-10outcome R< 0Right wins, whoever starts00outcome N‖ 0whoever moves first, winsblue edges are Left's moves, red are Right'sthree of the four are comparisons with zero; the fourth is not
Fig. 5 The classes again. A hot position is confused with a whole interval of numbers rather than just with zero, and the bottom gap of a thermograph is that interval drawn.

What the solver computed

thermograph(g, tMax) in lib/cgt.js implements that recursion directly, returning the two walls as lists of vertices — exact piecewise-linear functions rather than samples.

This matters for what the figures are allowed to claim. A sampled wall would let the temperature be read as “where the two drawn curves appear to cross”, which is a statement about the picture. Computed walls let wallAt(w, t) evaluate either wall exactly at any height, and the temperature is the solved intersection of two line segments.

The values were checked by hand before any figure was drawn. {51}\{5 \mid 1\}: mean three, temperature two, walls straight with no vertices. {42}\{4 \mid 2\}: mean three, temperature one. {20}\{2 \mid 0\}: mean one, temperature one. Each matches the switch formula m=(l+r)/2m = (l+r)/2, t=(lr)/2t = (l-r)/2, and assertValue re-checks on every build.

For a number the routine returns coincident walls and a negative temperature, which is the correct report of a cold position rather than a failure. That case was the one that needed care in the implementation: a search for a crossing finds one immediately at the bottom, and the code must recognise that as “no wedge” rather than “temperature zero”.

Reading one quickly

In practice a thermograph is scanned rather than analysed, and there are four things to take from it.

Where is the mast? That is the mean value — what the position contributes to the total.

How high is the meeting point? That is the temperature — how urgent the position is.

How wide is the bottom? That is the confusion interval — the range of numbers this position is confused with, and therefore how much the outcome swings on who moves.

Are the walls bent? If so, the best move here depends on the board temperature, and the position needs re-examining as the game cools.

Four glances, and they answer where this component sits in the ordering of moves and what it is worth when the dust settles.

The scale of the axes

A practical note about drawing these, since the two axes carry different things.

The horizontal axis is a value, measured in whatever units the game uses — moves, points, counters. The vertical axis is a temperature, measured in the same units, since a tax on moving is subtracted from a value.

So the axes have the same units and the walls have slope one. That is a real constraint rather than a drawing convention: a wall can only have slope ±1\pm 1 or be vertical, because a wall’s motion with temperature is either “taxed at the full rate”, giving slope one, or “already settled”, giving vertical.

A wall that appeared to have slope one-half would be a drawing error, and the generators here enforce it. The vertices are computed and the segments between them are drawn at the slope the mathematics dictates, so a bend in a wall is always a change between the two allowed slopes rather than a smooth curve.

This makes thermographs easy to check by eye. Every segment is at forty-five degrees or vertical; anything else is wrong. It is the same kind of visual invariant that makes the number line placement of Hackenbush stalks checkable — the picture has a property that a mistake would break.

The mast is the mean, and the mean adds

One structural fact makes the diagrams worth stacking up.

Mean values add: the mean of a sum is the sum of the means. So a board of components has a total mean equal to the sum of the mast positions, and that total says who is ahead once every hot fight has been shared out fairly.

Temperatures do not add, and there is no operation on thermographs that produces the thermograph of a sum. That is the standing limitation of the whole method, and it is why the diagrams are read one at a time and compared, rather than combined.

The comparison is still worth a great deal. Ordering components by temperature orders the moves, and summing the masts says who wins if the ordering is respected. Those two facts together are essentially the whole practical content of temperature theory.

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 Components ordered by the height of their meeting points. The ordering is the play order; the sum of the mast positions is the outcome if it is followed.

What the diagram omits

Worth saying, since a thermograph is a complete description of a position’s hot behaviour and an incomplete description of the position.

It says nothing about which move achieves a wall. The wall records how far a player can push the value; the move that does it is not in the diagram, and two positions with identical thermographs can require entirely different play.

It says nothing about infinitesimal differences. Two positions differing by \uparrow have the same thermograph, because cooling washes out everything below temperature zero. In a game where the numbers cancel, that difference is the whole outcome and the diagram is silent on it.

It says nothing about the position’s outcome class directly, though the class can be recovered from where the walls sit relative to zero.

And it says nothing about length — how many moves the fight takes — which matters for whether a component gets resolved before the game ends.

So the thermograph answers “how much and how urgent” thoroughly and everything else not at all. That is a good trade for endgame planning and a bad one for the last few moves, which is exactly the point at which the small values take over.

Where it came from

The thermograph is Conway’s, in On Numbers and Games, and the picture has not changed since. The vocabulary — mast, wall, wedge, confusion interval — is from Winning Ways.

The applied development is Berlekamp’s. Mathematical Go, with David Wolfe, uses thermographs on real endgame positions and introduces refinements needed for Go specifically, including handling of ko and of positions where the sum’s temperature must be estimated rather than derived.

The diagram’s persistence is a small point in favour of it. Forty years of a subject that rewrites its notation regularly, and the thermograph is drawn the way it was drawn first.

Where the model stops

No thermograph of a sum. The most-wanted operation does not exist. Thermographs describe components.

Exact walls need exact evaluation. The construction is recursive over the options’ thermographs, so it inherits the ceiling on exact computation. Every diagram here is of a position small enough to build exactly.

The temperature of a real board is estimated. Applications use an ambient temperature estimated from the components, not derived. That estimate is where practical Go analysis puts its judgement.

Cold positions have degenerate diagrams. A number’s thermograph is a bare mast. That is correct and uninformative, and it means the diagram is a tool for hot positions only.

Normal play, as everywhere.

The ladder from here

Next: playing the hottest, which is what the diagrams are for; then cooling and heating as a pair of inverse operations; thermographs with vertices worked through in detail; and orthodox accounting, which is the Go-specific bookkeeping built on top.

Further out: sums of thermographs and why the natural constructions fail, and the extension to loopy games, where the walls can fail to meet at all — the diagram’s way of reporting a position that need never end.