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.

Assumes: The simplicity rule · Who moves last

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 temperature. Positions 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.
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.

Independence is a claim that can be drawn rather than asserted, and drawing it takes two pictures because it has two directions. Hold the temperature still and let the mean move, and the whole family slides along the line with none of the bars changing width.

A switch, its mean and its temperature. Positions 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.
Fig. 2 Four switches of temperature 2, settling at 3, 2, 1 and 0. Every bar is four units wide, so the number in the right-hand column is the same on all four rows; every marked point is somewhere else, so no two of them are worth the same. Whoever moves first in any of these gains two over where it settles, and which one a player would rather be holding is a different question with a different answer.

Now hold the mean still and let the temperature move, and the reverse happens: the marked point never shifts and the bar opens out around it.

A switch, its mean and its temperature. Positions 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.
Fig. 3 Five switches settling at 3, with temperatures 1/2, 1, 2, 3 and 4. All five are worth the same on average and there is an eightfold range in what moving first is worth, so a player told only that a component is worth three has been told the same thing about a rounding error and about most of a game.

Those five rows also carry something neither number reports. {71}\{7 \mid -1\} and {60}\{6 \mid 0\} are confused with zero — whoever moves wins them — while {42}\{4 \mid 2\}, {51}\{5 \mid 1\} and {7252}\{\tfrac72 \mid \tfrac52\} are wins for Left whoever moves. Five positions, one mean, one column of temperatures, and two different answers to the only question a player at the board is asking. Being worth three on average and being ahead are separate statements, and the outcome classes are where the second one lives.

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.

The claim holds at every size, which is the way to see that the mean is not a small number rather than a number that happens to be nought.

A switch, its mean and its temperature. Positions 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.
Fig. 4 Five symmetric switches, from ±8\pm 8 down to ±132\pm \tfrac{1}{32}. Every marked point is at nought and the temperatures run 8, 2, 1/2, 1/8 and 1/32, falling by a factor of four at each step. The bar shrinks and the mean does not move, because the mean is not a measure of size — the bottom row is worth exactly as little as the top one and worth a two-hundred-and-fifty-sixth as much to move in.

Reading down that figure is also the shortest route to the two directions this essay ends in. Keep going down and the bars never quite close, and what is waiting at the bottom is not the number nought but a whole scale of positions confused with it.

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.

That confusion is computed rather than declared, and the computation is the same one used everywhere else here. 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: the difference is a first-player win, so neither \ge nor \le holds. It is not an approximation to an ordering, it is the absence of one, and being confused is not the same as being unknown — the answer has been computed and the answer is that there is no order.

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.
Fig. 5 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.

Two straight lines is all a switch can manage, and it is all a switch needs. Give one an option that is itself a fight — {4{20}}\{4 \mid \{2 \mid 0\}\} beside the plain {40}\{4 \mid 0\} — and the right wall acquires a bend where the inner fight cools out at a lower temperature than the outer one. From there the mean stops being the midpoint of anything, the temperature stops being half of anything, and the two numbers stop describing the position rather than merely describing it approximately.

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.

The setting that definition lives in is worth keeping in view, because it is not a single position. It is a board made of several independent components played at once — a disjunctive sum — with each part contributing its own share and the total obtained by adding the games rather than the labels. A component’s mean says nothing about the component in isolation. It says what the component adds to a collection, and a collection is the only place the word has any content.

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.

For a switch, the limit is reached at two

The mean is introduced above as a limit — take nn copies, divide by nn, watch the discrepancy vanish. For the positions this essay is actually about, that undersells it considerably.

Add a switch to itself and the discrepancy is not small. It is gone.

{11}+{11}=0{51}+{51}=6{31}+{31}=2\{1 \mid -1\} + \{1 \mid -1\} = 0 \qquad \{5 \mid 1\} + \{5 \mid 1\} = 6 \qquad \{3 \mid -1\} + \{3 \mid -1\} = 2

Exactly, in every case — a number, not a game that behaves like one. Twice the mean, at two copies, with nothing left over.

A switch, its mean and its temperature. Positions 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.
Fig. 6 The three switches that identity is stated for, with the number each pair adds up to sitting on the diagram already. Their means are 0, 3 and 1, and two copies of each are worth 0, 6 and 2 — twice the marked point, exactly, with the temperatures in the right-hand column contributing nothing at all. The second number is the whole of what cancels.

The reason is the notation the essay already introduced. A switch is x±tx \pm t, and ±t\pm t is its own negative: negating {tt}\{t \mid -t\} swaps the options and negates them, which returns the same game. So ±t+±t=0\pm t + \pm t = 0, and

(x±t)+(x±t)  =  2x+(±t+±t)  =  2x.(x \pm t) + (x \pm t) \;=\; 2x + (\pm t + \pm t) \;=\; 2x.

Which turns the essay’s most counter-intuitive sentence into arithmetic. A switch 0±1000 \pm 100 is worth nothing — and now in the strongest available sense: put two of them on a board and they cancel completely, whoever moves, however the play goes. The hundred points are real and they are entirely a matter of who moves first, and with two copies the answer to who moves first is both, once each.

Where that stops, exactly

It stops the moment an option is not a number, and the boundary is sharp.

{5{40}}+{5{40}}  =  {9{8,{95}4}}\{5 \mid \{4 \mid 0\}\} + \{5 \mid \{4 \mid 0\}\} \;=\; \{9 \mid \{8,\, \{9 \mid 5\} \mid 4\}\}

Two copies of a fight with a follow-up are not twice anything. The value is a game with braces in it, and the pile has to be played rather than counted.

So the mean’s convergence is not one story. For a simple switch it is not a limit at all — it is an identity at n=2n = 2. For a position with a bend in its thermograph the limit is genuine, arrives slowly, and is what the mean value theorem is for.

That is worth carrying because it says which positions the tidy account describes. Everything on this page — five switches on a line, a mean at the midpoint, a temperature at half the gap — is exact for options that are numbers, and the “approximation” language the essay reaches for in the next section belongs to the other case. The neat theory does not fray gradually; it is exact, and then it is not.

And it explains the shape of the error term. With every component a simple switch, the components pair off two at a time and each pair contributes exactly twice its mean, so the only discrepancy on the whole board is the odd one left over when the count is odd. That is one component’s worth, whatever the board’s size — which is precisely the bound the last paragraph of the section above quotes, arrived at by counting leftovers rather than by any analysis of limits.

What the solver computed, and how

The two numbers in every figure here are produced by the thermograph recursion, 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 before anything is published, 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.

That is also where the second number earns its keep at a board rather than on a page. Sort the components of a position by what is at stake — {60}\{6 \mid 0\} at temperature 3, {20}\{2 \mid 0\} at 1, {10}\{1 \mid 0\} at 1/2, and the number 12\tfrac12 with no temperature at all — and the ordering that comes out is the order to play them in. A player holding only the four values could not produce that list, because the values do not contain it: the number is worth more than two of the fights and is the last thing anybody should touch.

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 worth. Every 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.
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.

Part 1 of 10

One argument about Switches. 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 23.

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.

CoolingDomineeringEndgameHot gameMean valueSwitchTemperatureThermographTwo numbers