Temperature

A thermograph is built from its options'

The diagram is not measured, it is computed — each wall is an extremum over the options' opposite walls, shifted by the tax. That construction is why a hot follow-up lowers the temperature instead of raising it, and why two fights with the same swing can differ by a factor of two in what is at stake.

Assumes: Reading a thermograph · Cooling

Reading a thermograph treats the diagram as a thing to be read: two walls rising from a number line, closing as the tax on moving rises, meeting at the temperature. That is what it is for.

It is not how it is made. The walls are not traced by sampling the position at a series of taxes; each one is an extremum over the options’ walls, shifted, and the whole diagram is a recursion of the same shape as every other computation on this site.

Knowing the construction explains things the finished picture cannot: why a fight with a large follow-up has a low temperature, why one of its walls comes out flat, and why the mast stands where it does.

The thermograph of {6 | {5 | {4 | 0}}}. 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. 1 A fight with a follow-up that has a follow-up. Left’s move ends it at 6; Right’s goes to {5 | {4 | 0}}, which is itself a fight worth 4 on average. The walls meet at a temperature of 1 despite six points separating the two opening moves — and the reason is entirely in how the walls were built.

The two lines that build it

Write LS_G(t) for the height-t value of Left’s wall and RS_G(t) for Right’s. The construction is:

LS_G(t) = the largest, over Left’s options G^L, of RS_{G^L}(t) − t.

RS_G(t) = the smallest, over Right’s options G^R, of LS_{G^R}(t) + t.

And for a number x, both walls are the vertical line at x, which is the base case.

Three things in those lines are worth slowing down over.

The sides swap. Left’s wall is built from the options’ Right walls. That is not a typo and it is the same swap the stops have: Left moves, and then it is Right’s turn to move first in whatever Left left behind.

The shift is the tax. Moving costs t, so Left’s wall is pulled down by t and Right’s pushed up by t. That is the entire content of cooling — the operation is a tax, and the tax appears here as a shift.

The extremum is the choice. Left takes the best available option at every height, so the wall is an upper envelope; Right takes the worst for Left, so Right’s is a lower one. A wall bends exactly where the option achieving the extremum changes.

Built once, by hand

Take {5 | {4 | 0}} and construct its walls from its options’ walls.

Left’s option is the number 5, whose walls are both the vertical line at 5. So LS(t) = 5 − t: a line falling from 5 at slope one.

Right’s option is {4 | 0}, whose own left wall runs from 4 at t = 0 down to 2 at t = 2 and is vertical above that. Shift it up by t: the falling part becomes (4 − t) + t = 4, a horizontal line at 4.

The two walls meet where 5 − t = 4, which is t = 1. So the temperature is 1 and the mast stands at 4.

That paragraph is the construction carried out on one position, and the construction is drawable: each option contributes a line, and the wall is the envelope of the contributions rather than anything drawn in its own right.

The wall as an envelope. A thermograph with each option's contribution to its wall drawn over it, built from that option's two stops alone. The wall is the envelope of those contributions and it bends where the envelope has a corner.
Fig. 2 The same calculation with the working left in. The thin lines are the two options’ contributions — Left’s option is the number 5, contributing a line falling from 5 at slope one, and Right’s option {4 | 0} contributes max(4, 2 + t), flat at 4 for as long as its own fight is live. The walls are those two lines and nothing else, and they meet at a temperature of 1 with the mast at 4.

Drawing the option beside the position it becomes an option of is the other half of the same picture, because the flat wall is easier to believe once the falling wall it came from is in view.

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; {5 | {4 | 0}}, straight-walled. 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. 3 The option and the position built from it. The first is a plain switch whose walls fall symmetrically from 4 and 0; the second is what happens when that switch becomes somebody’s option — its left wall, shifted by the tax, comes out flat, and the flat wall is what caps the temperature at 1.

That flat wall is the whole explanation of sente. Right’s move buys nothing on the diagram at any tax, because the follow-up Left answers with cancels the tax exactly, and whether the answer is actually forced depends on the rest of the board.

Why a hot follow-up cools the position

The general principle falls out of the arithmetic and it is counterintuitive enough to be worth stating twice.

A hot option makes the position colder. The option’s own wall is falling — that is what hot means — and the shift adds t back, so the two cancel and the parent’s wall is flatter than it would have been. A flat wall meets the other one sooner, and meeting sooner is a lower temperature.

Compare with a plain switch. {6 | 2} has both options numbers, so both walls are vertical before the shift and both become slopes of one after it. They close at a rate of two per unit of tax and meet at t = 2.

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.
Fig. 4 The comparison case, where nothing is nested. Both options are numbers, so both walls have the full slope of one and approach each other at a rate of two per unit of tax; four points of swing therefore close at a temperature of 2, with the mast at the midpoint. This is the fastest closing any position can manage, so half the swing is a ceiling on temperature and a plain switch is what attains it.

{5 | {4 | 0}} has almost the same swing on the surface — five against zero — and one of its walls does not move at all, so the walls close at a rate of one and meet at t = 1. Every deviation from the plain-switch shape is caused by an option that is not a number, and there is nothing else it could be caused by.

The deep fight, built two levels down

The essay’s opening figure is worth constructing too, because the recursion runs twice in it and the second pass is where the intuition usually breaks.

{6 | {5 | {4 | 0}}}. Left’s option is the number 6, so Left’s wall is 6 − t.

Right’s option is {5 | {4 | 0}}, whose left wall was built in the previous section: it runs from 5 down to 4 over the first unit of tax, then vertical. Shift it up by t and the falling part becomes flat at 5, and the vertical part becomes a line rising at slope one from 4.

Right’s wall is therefore flat at 5 until t = 1 and rising after that. Left’s is 6 − t. They meet at t = 1, at the value 5.

So the temperature is 1 and the mean is 5, on a position whose two opening moves are six points apart. Two levels of follow-up have each flattened a wall, and each flattening is one exchange that will be answered rather than banked.

The general shape: every level of follow-up removes one unit of slope from one of the walls, and a position deep enough on one side has a wall that barely moves at all. That is why a long forcing sequence in a real game is worth so much less than the number of points it touches — each forcing move is answered, and the accounting closes at the end rather than at each step.

The slopes are an arithmetic of their own

“Every level of follow-up removes one unit of slope” is stated above for one position and it is a general rule, readable straight off the two construction lines.

Take a segment of Left’s wall and ask its slope. The line says LSG(t)LS_G(t) is the largest of RSGL(t)tRS_{G^L}(t) - t, so on any stretch where the same option achieves the maximum,

slope of LSG  =  slope of RSGL    1.\text{slope of } LS_G \;=\; \text{slope of } RS_{G^L} \;-\; 1.

And by the mirror line, RSGRS_G’s slope is LSGRLS_{G^R}'s slope +1+\,1.

Start at the base. A number’s walls are vertical lines, which as functions of the tax have slope 0. Then:

  • an option that is a number gives Left a wall of slope 1-1 — the familiar falling line;
  • and gives Right a wall of slope +1+1, the familiar rising one;
  • an option that is itself a switch has walls of slope 1\mp 1, so the parent’s wall comes out at slope 0 — the flat wall;
  • an option whose walls are already flat gives the parent a wall of slope ±1\pm 1 again.

So the slopes march up and down by exactly one per level of nesting, and every wall of every thermograph on this site is piecewise linear with an integer slope on each piece. Nothing else can occur, because the only operations in the construction are taking a maximum, taking a minimum, and adding or subtracting the tax.

Which is why a thermograph looks the way it does

Three features of every diagram in this field fall out of that, and none of them is obvious from looking at one.

Walls bend only where the extremum changes hands. A bend is one option overtaking another, so the number of bends in a wall is bounded by the number of options that ever achieve the extremum — which is why a plain switch’s walls are straight and why a wall with two bends needs a follow-up with a follow-up.

The slopes never leave a small range. They start at nought and move by one per level, so a wall’s slope is bounded by the depth of the position beneath it. A thermograph cannot be steep: it can have many bends and it cannot have a segment falling at slope three, however deep or hot the position is.

And the flat wall is exactly the boundary case. Slope nought is what a wall reaches when a falling option is cancelled by the tax added on top of it, and it is the one slope at which a player’s move buys nothing as the tax rises. That is the whole of the sente signature, and it is one step of the slope arithmetic rather than a special phenomenon.

What that costs the position

The last of those has a consequence for the temperature that is worth stating in the slope language, because it makes the essay’s counterintuitive result into arithmetic.

The temperature is where the two walls meet, and how quickly they meet is the sum of the rates at which they approach — Left’s wall falling at sL|s_L| and Right’s rising at sR|s_R|. Two number options give 1+1=21 + 1 = 2, the fastest closing available, so the walls meet in half the gap between them.

Replace one option by a fight and that wall’s slope goes to nought. The closing rate halves, and a gap that would have closed at tax tt now closes at 2t2t — except that the flat wall is also lower, because the option it was built from was worth less than a number would have been, so the gap is smaller too. The two effects run in opposite directions and the second wins, which is why the deep positions on this page have temperatures of one rather than of six.

So “a hot follow-up cools the position” is a statement about slopes and offsets pulling against each other, and the essay’s arithmetic is that tug worked out on two particular positions. What the slope rule adds is that the tug is always between the same two quantities, at every level, in every game.

Where the mast comes from

Above the temperature the two walls have met and the diagram is a single vertical line: the mast. Its position is the mean value.

That is not an extra definition bolted on. Above the meeting point neither player will pay to move, so the position has frozen into a number, and the number it froze at is what the construction returns for every higher tax. The mean is the frozen value, and the mean value theorem — that n copies stay within a fixed distance of n means — is a statement about the same number arrived at from a completely different direction.

On a plain switch the mast stands midway between the two stops, and it is easy to carry that away as a rule about masts rather than about switches. The construction says otherwise, and the essay’s own position is where it says so loudest.

The thermograph of {6 | {5 | {4 | 0}}}. 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. The two marks on the base line are the stops — what each player gets by moving first and playing the fight out with no tax charged at all.
Fig. 5 The opening position with its feet marked. The stops are 6 and 5 — one point apart, on a position whose two opening moves are six points apart — and the mast stands at 5, which is not the midpoint of anything but is exactly the right stop. Right’s wall is flat, so the value Right can hold this to under no tax is the value it freezes at under every tax, and the mean has been pinned to one player’s stop by the construction rather than split between them.

The mean arrived at that way is the same number a pile of copies converges on: n copies of a position stay within a fixed distance of n times its mean, however large n gets, and the distance is bounded by the temperature. That is a statement about repetition, and the construction above never mentions repetition at all.

What the construction does not do

The recursion is on options, so it is local to one position — and that is exactly why a thermograph of a sum is not obtainable from the parts’. Put {40}\{4 \mid 0\} beside {20}\{2 \mid 0\} and the means add, 2 and 1 making 3; the temperatures do not, because the construction for the sum takes its extrema over moves in either component and an envelope over a larger option set is not a function of the envelopes over its pieces.

Temperatures do not add is the essay about that, and the construction here says why: the sum’s options are moves in either part, so its walls are envelopes over a combined set, and an envelope over more options is not a function of the envelopes over each.

Reading a bend

Once the construction is understood, the bends in a wall become readable, and each one is a fact about the position.

A bend in Left’s wall is a height at which Left’s best option changes. Below the bend one option gives the better guaranteed value under the tax; above it another does.

A flat stretch is an option whose own fight exactly absorbs the tax — the sente signature.

A wall that starts at a value the position’s notation does not contain is an option that is itself a fight: { {4 | 2} | 0} has a left wall starting at 2 rather than at 4, because Left’s move to {4 | 2} does not deliver 4, it delivers a position from which Right moves first.

Each of those readings is worth a point on a real board, and the place they are spent is the endgame account: a board’s regions are summarised, the summaries added, and the stakes taken in turn. A region whose wall bends is the one the account is least equipped for, because its temperature and its swing say different things and the account has room for only the first.

What it costs

The recursion is over the option tree and it memoises on the position, so a thermograph costs what any other evaluation of the position costs, plus arithmetic on piecewise-linear functions.

Each wall is a list of breakpoints. Combining two walls takes the union of their breakpoints and an extremum at each, so the lists grow with the depth of the position — which is why the deep fight in this essay has more segments than the plain switch.

One consequence is worth naming because this site was caught by it: the height a graph is computed to is part of the answer. The walls are clipped at the top of the frame and the mast runs to it, so a graph computed to a tax of 4 and handed to a caller asking about a tax of 14 has points far outside the second caller’s diagram. The memo is keyed on the height for that reason.

What the cost buys is an ordering. Rank {102}\{10 \mid -2\}, {6{5{40}}}\{6 \mid \{5 \mid \{4 \mid 0\}\}\} and {40}\{4 \mid 0\} by the number the construction produces and the deep fight comes last at a temperature of 1, below the plain {40}\{4 \mid 0\} at 2, despite having the second-largest swing on the board. Estimating from the braces would have put it second; playing the hottest means playing the order the construction returns, and this is the position on which the two disagree.

Where the model stops

Short games only. The recursion needs the options to be simpler and eventually to be numbers. Loopy positions have no such bottom and their thermographs, where they exist at all, need different machinery.

Two walls assume two players with opposed interests. The construction takes a maximum for one and a minimum for the other, which is the normal-play convention doing its work. A scoring game with a different objective would need a different pair of recursions.

And the walls are exact only because the arithmetic is. Every wall here is a piecewise-linear function with slopes 0 and ±1 and breakpoints at dyadic rationals, computed exactly. A sampled thermograph — evaluating the position at a hundred taxes and joining the dots — would look identical and would put the temperature wherever the sampling happened to land.

Three things the construction makes obvious

Collecting the payoffs, because each of them is a fact this site has stated elsewhere and derived nowhere.

Temperature is bounded by half the swing, with equality exactly for plain switches. Both walls move at slope one at most, so they close at rate two at most, so the meeting point is at most half the initial gap. Anything that flattens a wall lowers it.

A position with an option that is a number has a straight wall on that side. Numbers have vertical walls and the shift turns a vertical line into a slope of one, with nothing to bend it.

And the temperature of a position is at most the largest temperature among its options plus nothing. A wall built from an option’s wall inherits its bends, and the shift can only flatten. That is the local version of the fact that a sum is no hotter than its hottest part, and it is why cooling terminates.

None of the three is deep, and all three are invisible from the finished picture: a reader looking at two walls meeting sees a fact about one position, and the construction is what turns it into a rule about every position of that shape.

What the picture cannot show

A finished thermograph shows two walls and hides the construction that made them, which is the subject of this essay and the one thing not drawable.

The clearest case is the flat wall. On the page it is a horizontal line, and horizontal lines look like nothing happening; in the construction it is the trace of a cancellation — an option’s own falling wall exactly compensated by the shift the tax adds. The figure that shows the option beside the parent is the closest available, and it still asks the reader to perform the shift mentally.

Drawing the contributions performs the shift instead, and running the same drawing on the deep position shows where the shortcut it uses runs out.

The wall as an envelope. A thermograph with each option's contribution to its wall drawn over it, built from that option's two stops alone. The wall is the envelope of those contributions and it bends where the envelope has a corner.
Fig. 6 The same construction one level deeper, and the one figure on this page whose thin lines part company with the wall they are supposed to build. Right’s option is {5 | {4 | 0}}, whose stops are 5 and 4 — so a contribution drawn from those two numbers alone is flat at 5 until a tax of ½ and rises afterwards, while the true wall stays flat at 5 all the way to the meeting point at 1. The stops describe an option only when the option’s own walls are straight, and this one’s are not.

That gap is the whole difference between the recursion and a shortcut, and whether the bend can be read off the stops is a question with a measured answer: often, and not always. The recursion is on walls because walls are what the definition names.

The other invisible thing is the option set. A wall is an envelope over several options, and the finished wall records only the winner at each height. A position with six options and one dominant one draws the same wall as a position with one option, and nothing in the picture distinguishes them.

The habit the construction teaches

There is a general lesson here about diagrams, and it is the reason this rung exists at all.

A thermograph is one of the few genuinely two-dimensional objects in this subject, and that makes it feel like a measurement — something read off a position the way a temperature is read off a thermometer. It is not. It is a computed object, every point of it is the output of a recursion, and its shape encodes decisions rather than observations.

The same is true of nearly every picture on this site: a Grundy strip is a computed sequence rather than a plot of data, a position graph is an enumeration rather than a diagram, and a thermograph of a sum is a third computation rather than an overlay of two.

The practical form of the lesson is a question worth asking of any figure in this collection: what recursion produced this, and what would change it? For a thermograph the answers are the two lines at the top of this essay, and knowing them turns the picture from a thing to be believed into a thing that can be checked.

The convention, named

Normal play, short games, and one convention about the tax that decides the whole shape.

The tax is charged per move, uniformly, in both components of any sum. That is what makes cooling a single-parameter operation and the thermograph a two-dimensional picture. A tax that varied by component or by player would need a diagram with more axes, and none of the theorems above would survive.

The second convention is that a number’s thermograph is a vertical line from the base, and that this site prints its temperature as −1. That is a convention rather than a measurement: numbers freeze at every tax, so there is no crossing to report, and −1 is the label chosen for its absence. A reader comparing a number’s “temperature” with a fight’s is comparing a computed crossing with a placeholder.

Part 4 of 8

One argument about Thermograph. 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 10.

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.

CoolingExact evaluationFreezing pointHot gameMastMean valueRecursionSwitchTax on movingTemperatureThermographWall