Values

Worth nothing, and worth fighting for

A switch is a position both players want to move in. Its average value can be zero while the difference between getting there first and second is enormous, and that gap is a second number every position carries.

The simplest position that is not a number takes about four seconds to describe. Left may move to a position worth two; Right may move to one worth zero; nobody may do anything else.

±1  =  {20}1,or in general{ab} with a>b.\pm 1 \;=\; \{2 \mid 0\} - 1, \qquad \text{or in general} \qquad \{a \mid b\} \text{ with } a > b.

Both players want to move here. Left gets 22 by moving; Right holds it to 00. Neither wants to leave it alone. That single property — Left’s option better for Left than Right’s is for Right — is the definition of a switch, and it is the exact opposite of what makes a position a number.

A switch, its mean and its temperaturePositions of the form {a | b} with a above b: both players want to move there, so neither is settled. The bar spans the two options, the marked point is the mean the position is worth once the fighting is over, and the temperature is half the gap — which is exactly what moving first is worth.-205{2 | -2}mean 0t = 2{5 | 1}mean 3t = 2{1 | 0}mean 1/2t = 1/2{3 | -1}mean 1t = 2{1/2 | −1/2}mean 0t = 1/2valuethe mean is the midpoint of the two options, and the temperature is half the distance between thema switch is worth nothing on average and everything to whoever moves in it
Fig. 1 Five switches on a value line. The bar spans the two options, the marked point is what the position settles at once the fighting is over, and the number on the right is what moving first is worth. Every one of these is worth its mean on average and something quite different to whoever moves.

Two numbers, not one

A number carries one piece of information: how far ahead somebody is. A switch carries two, and neither can be recovered from the other.

The mean value is where the position settles. For {ab}\{a \mid b\} with aa and bb numbers it is a+b2\tfrac{a+b}{2}: in a large sum of independent components, both players eventually take about half the switches each, and the long-run accounting comes out at the average.

The temperature is ab2\tfrac{a-b}{2}: half the gap, which is what moving first in this component is worth relative to the settled value. It is how much a player would pay for the turn.

{51}:mean 3,temperature 2.\{5 \mid 1\}: \quad \text{mean } 3, \quad \text{temperature } 2.

Those two numbers are independent. {51}\{5 \mid 1\} and {33}\{3 \mid 3\} have the same mean and completely different temperatures — the second is not a switch at all, it is the number three, and nobody wants to touch it. {51}\{5 \mid 1\} and {22}\{2 \mid -2\} have the same temperature and different means. A position needs both, and reporting only the value tells a player who is winning and not whether the game is close.

The notation makes the split explicit. A switch is written x±tx \pm t — mean plus or minus temperature — so {51}\{5 \mid 1\} is 3±23 \pm 2 and {11}\{1 \mid -1\} is 0±10 \pm 1. Written that way the second number stops looking like a derived quantity and starts looking like what it is: half the description.

It is worth being blunt about how counter-intuitive one consequence is. A switch 0±1000 \pm 100 is worth nothing. Its mean is zero, it is not better for either player, and in a long game it will contribute nothing to the final count. It is also, by a wide margin, the most important thing on the board, because whoever moves there first gains a hundred over whoever does not. A quantity that is zero and decisive at the same time is not something a single number can express, and the whole of this essay is the consequence of that.

Why a switch is not a number

The formal statement is worth having because it is what everything else rests on.

A game {ab}\{a \mid b\} with aa and bb numbers is itself a number exactly when a<ba < b — when Left’s option is worse for Left than Right’s is for Right. Then neither player wants to move, the simplicity rule applies, and the value is the simplest number in between.

When a>ba > b the rule does not apply and the position is not equal to any number at all. It is not between bb and aa in any useful sense; it is confused with every number strictly between them.

b<x<a{ab}x.b < x < a \quad \Longrightarrow \quad \{a \mid b\} \parallel x.

That is the algebraic form of “both players want to move here”. Being confused with xx means neither {ab}x\{a\mid b\} \geq x nor x\leq x holds, which means the position plus x-x is a first-player win — which is exactly the statement that whoever moves gets the better of it.

Comparing two positions is playing their differenceTo decide whether one position is worth at least another, subtract and see who wins moving second. It is the only definition of comparison the subject has, and it produces a partial order — some pairs come out confused, which no comparison of numbers ever does.↑ − 0= ↑outcome L↑ > 0∗ − 0= ∗outcome N∗ ‖ 0⇑ − ↑= ↑outcome L⇑ > ↑1/2 − 1/4= 1/4outcome L1/2 > 1/4↑∗ − ∗= ↑outcome L↑∗ > ∗the differencethe verdict‖ means confused: neither greater, nor smaller, nor equal — and no amount of care removes it
Fig. 2 Confusion, computed. Comparison in this subject is subtraction followed by a question about who wins the difference moving second, and for a switch against a number strictly between its options, neither player can. That is not an approximation to an ordering; it is the absence of one.

The interval a switch occupies

A useful way to hold a switch in mind is as an interval rather than a point.

{51}\{5 \mid 1\} is confused with every number in (1,5)(1, 5), greater than every number at or below 11, and less than every number at or above 55. So it occupies the open interval, and its mean sits at the centre of it.

That picture is exactly right for simple switches and becomes an approximation for anything more complicated — which is the first place the neat theory starts to fray, and the reason thermographs exist. A position whose options are themselves fights does not occupy a symmetric interval, its walls bend, and the mean stops being the midpoint of anything obvious.

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. 3 The same switch as a thermograph. The two walls slope inward at one unit of value per unit of tax, meet at the temperature, and the value they meet at is the mean. For a simple switch the diagram is two straight lines and contains exactly the two numbers already named.
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. 4 And what happens when an option is itself a fight. The left-hand thermograph is a simple switch, straight-walled. The right-hand one has a bend, and the bend is the inner fight cooling out at a lower temperature than the outer one — at which point “the mean is the midpoint” stops being true.

What a mean is the mean of

The word “mean” is doing something specific and it is not obvious what, since there is no chance anywhere in this subject and nothing to average over.

The answer is that it is an average over many copies. Take nn copies of a switch {ab}\{a \mid b\} and nothing else. The players alternate; each takes one copy at a time; Left gets aa from about half of them and Right holds about half to bb. The total comes out near na+b2n \cdot \tfrac{a+b}{2}, with a discrepancy of at most one copy’s worth of the gap depending on who moves first and whether nn is odd.

Divide by nn and the discrepancy goes to zero. That limit is the mean, and it is the sense in which the mean is what a component is “really worth”: it is the rate at which a component contributes to a long game, with the advantage of moving first amortised away.

value of n copiesnmean.\frac{\text{value of } n \text{ copies}}{n} \longrightarrow \text{mean}.

That the limit exists at all is a theorem — the mean value theorem of this subject — and it is not obvious, because a game’s value is a symbolic object and dividing one by nn is not an operation that makes immediate sense. What the theorem actually says is that the value of nn copies stays within a bounded distance of nn times a fixed number, and the bound does not grow with nn.

A position is the sum of its partsFour separate Hackenbush sprigs. A move is a move in one of them, so the position is their disjunctive sum, and its value is the sum of their values. Which part to play in is the entire decision, and the values are what makes it decidable.1/2+−1/2+1/4+−1/4=0outcome Peach sprig is a separate game; a move is a move in one of themthe total was computed by adding the games, not the labels
Fig. 5 The setting the mean is defined in. A position made of several independent components, each contributing its own share, with the total computed by adding the games rather than the labels. A single component’s mean says nothing on its own; it says what the component adds to a collection like this one.

The temperature is what the bound is made of. A collection of components with temperatures t1t2t_1 \geq t_2 \geq \ldots finishes within t1t_1 of the sum of the means, and that error term is exactly the advantage of moving first in the biggest remaining fight. Two numbers, and each one is answering a different question about the same position.

What the solver computed, and how

The two numbers in every figure here are produced by the thermograph recursion in lib/cgt.js, and neither is read off the options.

A thermograph is computed by taking each option’s thermograph, shifting it inward by the tax, and taking the extreme: Left’s wall is the maximum over Left’s options of their right walls shifted down by tt, and Right’s is the minimum over Right’s options of their left walls shifted up by tt. Walls are kept as exact piecewise-linear functions — lists of breakpoints — rather than sampled, so the temperature is found by solving for the crossing rather than by looking for where two curves appear to meet.

For {51}\{5 \mid 1\} that machinery returns temperature 22 and mean 33, which agree with halving the gap and averaging the options. That agreement is the point of running it: the formula is a special case, and the recursion is what applies when the special case does not.

The site’s gate checks the relationship in the direction that can fail. Heating a number xx by an amount tt produces the switch {x+txt}\{x+t \mid x-t\}; the gate builds that switch and asks the thermograph for its mean and temperature, and requires them to be exactly xx and tt. Five cases are run on every build, and a discrepancy of more than a part in 10910^9 fails it.

That check has teeth because the two routes have nothing in common. One constructs a position from two numbers; the other runs a recursion over piecewise-linear walls and solves for an intersection. Getting the same pair of numbers back is not automatic.

Where the model stops

The mean is a long-run quantity. It is what a component contributes when it is one of many, played out over a whole game. In a position consisting of a single switch and nothing else, the mean is not what happens — whoever moves takes their option and that is the end of it. Quoting a mean for an isolated component is a category error.

A switch is the simplest hot game, not the general one. {ab}\{a \mid b\} with numbers on both sides is as simple as a fight gets. Real positions have options that are themselves positions, thermographs with bends in them, and means that are not midpoints. Everything in this essay that is stated as a formula holds only for the simple case, and the essay says which claims those are.

Temperature is not urgency in any psychological sense. It is a number derived from the position, and it says how much is at stake in this component relative to its own settled value. Comparing temperatures across components is meaningful and is the practical use; comparing a temperature with a mean is not.

Normal play. The thermograph recursion has the normal-play convention built into its base case, as everything here does.

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 Where the second number earns its place. Four components of one position sorted by what is at stake, with the settled one — the number — last. A player with only the values could not produce this ordering, because the values do not contain it.

Where a switch comes from in a real game

Switches are not an abstraction invented to have something to analyse. They are what a contested region of a real board looks like once it has been reduced.

Take a Domineering board late in a game, when the empty squares have separated into small clumps. A clump in which Left can place one domino and Right can place one, and after either placement nothing more can be done, is a switch: Left’s move leaves a position worth something to Left, Right’s leaves one worth something to Right, and both want it.

Small Domineering boards and what they are worthEvery value here was computed from the moves rather than looked up. Even on boards this small the values are switches and infinitesimals rather than numbers, which is the ordinary situation for a partizan game and the reason the theory needs more than arithmetic.1×2-1R2×21 | -1N2×32 | −1/2N3×31 | -1NLeft plays vertically, Right horizontally
Fig. 7 Small Domineering boards with their values. Some are numbers — nobody in a hurry — and some are fights, and the difference is visible in the values rather than in the shapes. Every value here was computed from the placements, and the ones that are not numbers are switches or close relatives of them.

The same shape turns up everywhere the theory is applied. A Go corner where one player can seal it and the other can break in. A Hackenbush picture with a green edge somewhere near the ground. A Toads and Frogs strip where one piece can advance or be blocked. In each case the local analysis reduces the region to two numbers, and the rest of the game is then arithmetic on those pairs.

That reduction is what makes the theory useful and it is also its main cost. Everything specific about the region is thrown away — the shape, the number of moves left in it, how it was reached — and what survives is a value and a size. Where the discarded detail mattered, the reduction has to be redone rather than repaired.

The generalisation

Switches generalise in two directions and both matter later.

Upward, into structure. Replace the numbers aa and bb by arbitrary games and the result is a general hot position. Everything about it is still described by a thermograph, but the walls bend and the mean is defined as where they meet rather than as an average. That is what a thermograph is for, and the simple switch is the case where the diagram happens to be two straight lines.

Downward, into the infinitesimals. Shrink a switch’s temperature to zero and the position does not become a number; it becomes something confused with zero at an infinitesimal scale. The games ±x\pm x for very small xx, and their limiting relatives, are where the margin in a close game actually lives — and they are invisible to any accounting that only tracks means.

The two directions together are the reason the subject needs both numbers permanently. One of them describes the game as a bookkeeper sees it and the other describes it as a player does, and there is no exchange rate between them.

Who found it, and when

The switch notation ±x\pm x and the mean-and-temperature pair are Conway’s, and the theory around them was built with Elwyn Berlekamp for a specific practical reason: Go endgames are sums of independent regions, most of which are switches, and the question of which one to play in is the question a strong player actually faces.

The idea of a mean value has an older relative in the theory of games in the economists’ sense, where the value of a repeated situation is an average over plays. The combinatorial version is sharper — the mean is exact rather than expected, because there is no chance anywhere — and the fact that it needs a companion number is the part that has no analogue there.

Berlekamp’s work on Go endgames in the 1990s turned the pair into a working method, and the demonstrations in which it out-counted professional players in constructed positions are the strongest evidence anywhere that the abstraction was the right one.

The ladder from here

This is the base rung of the switches anchor, and the ladder runs into most of the rest of the site.

Later rungs: the mean value theorem, which says every game has a mean and proves it by a limiting argument over many copies. Switches with unequal walls, and what happens to the interval picture. The games ±x\pm x as xx shrinks, and the boundary where a switch stops being a switch. Cooling, which is the operation that turns a switch back into its mean and is the reason the temperature is called a temperature. And the accounting of a whole endgame as a sum of switches, which is where the two numbers are finally spent.

The thing established here, and used everywhere afterwards, is that one number is not enough. A position has a value and a size, and reporting only the first is reporting only half of what a player needs.