The losses a game actually meets
Assumes: One loss in sixteen · Before the theorem there was the mirror
The Kayles losses can be sorted by what it takes to see that they are lost. Some are mirrors, every row length appearing an even number of times, and the copying answer of the puzzle books wins them. Some pair off by value, every Grundy value appearing an even number of times, which needs the values but no arithmetic. The rest need the exclusive-or. Counted over every position of a given number of skittles, the mirrors’ share goes to nothing and the pairing’s share falls towards one in sixteen, slowly, because the only row worth ∗5 is a row of twenty-eight.
That count weighed every position of a size equally, and the essay that made it ended on the obvious objection. A game does not meet positions that way. It starts from one row, the players’ choices carve a thin trail through the positions, and most of the 9,253,082,936,723,602 positions with three hundred skittles are never visited by any game anybody plays. The question it left was whether, along a game’s own trail, the losses look like the census or like something else.
They look like something else, and the difference is large. A game from a single row of 48 skittles, with each player choosing among the available moves at random, meets losses of which about seven in ten pair off by value and nearly half are mirrors. The census of positions with 48 skittles has 46 per cent and 8. A winner who copies whenever possible meets nothing but mirrors, from any single row, which is why the puzzle books never needed the theory. And the exclusive-or turns out to live in one particular stretch of a game, the middle, between an opening that always pairs and an endgame that always mirrors.
Weighting by play
A game needs a rule for who plays what before its trail can be weighed, because a trail is a probability over positions and the probabilities come from the choices. The rule used here is the plainest one that respects who is winning.
Every single row of Kayles is a win for the player to move, since its Grundy value is never nought, so a game from one row alternates between positions won and lost for the player to move. In a won position the player to move chooses uniformly among the winning moves, the moves to a position of value nought. In a lost position the player to move has no winning move and chooses uniformly among all moves, each distinct resulting position counted once. Every position reached gets a probability, and every lost position among them is sorted by the three tests. The share of the losses a test sees is the expected number of losses it sees in one game over the expected number of losses met.
The two pairs of curves separate early and keep separating. At 48 skittles a game meets about seventeen losses on average. Of those, 47 per cent are mirrors and 72 per cent pair off by value. Among all positions of 48 skittles, 8 per cent of the losses are mirrors and 46 per cent pair by value. The play curves are still falling slowly at the right edge, the pairing share most of all, but the mirrors have nearly levelled. Between 28 and 48 they move only from 50 to 47 per cent.
So the census says what a list of positions looks like and not what a player meets. The lost positions with 48 skittles in the census average almost fourteen rows of assorted lengths. A game from a row of 48 meets its losses while the skittles run down from 47 to two, and those losses average under eight rows, because a game breaks rows one move at a time and the moves that win often leave rows in pairs.
Why the census overweights the hard positions
The census counts a position once whether a game could ever reach it or not, and the positions it is full of are exactly the ones a game rarely makes. Most partitions of 48 have many small parts in irregular multiplicities: a row of seven, two of five, three of two, a scatter of ones. Each such position is one of very many of its kind, and the exclusive-or has to balance a long list of values in it. A game makes positions like that only after many moves of breaking long rows, and by then the skittles are few and the rows short.
A game’s positions are also correlated with its own history in a way the census is not. A winner’s reply restores a balance, and the most common way to restore it is to leave two things that cancel: a row beside an equal row, or beside a row of equal value. So the winning moves themselves feed pairs into the position, and the pairs persist, since a loser who moves in one row of a pair leaves the other for the winner to answer. Two games of equal value are the same game in every company, and in play that sameness is constantly being manufactured by the side that is winning. The census has no side that is winning.
The puzzle answer is a whole strategy
One policy for the winner makes the point in its extreme form.
A winner who copies whenever possible, preferring a move to a mirror over any other winning move, meets nothing but mirrors, from every row size tried. That is the puzzle’s answer carried through a whole game, and it works because the opening move can always split a single row into two equal halves. The opening knocks down the middle skittle or the middle two and leaves two equal rows; from then on the winner copies, the position after each winner’s move is again two equal halves, and every lost position the game passes through is a mirror. The figure’s check that this holds over every game the loser’s choices can produce is a check of a one-line argument: copying keeps a mirror a mirror.
The census figure explains why the trick looked weak. Among all won positions to twenty-four skittles, fewer than half have a move to a mirror, so a player who knows only how to copy, dropped into a random won position, is usually stuck. But a copying winner from a single row is never dropped anywhere. It stands only in positions its own previous move created, two equal halves with one of them disturbed by the loser, and in every such position the copying move exists by construction. The census measures the trick against positions the trick never visits.
This is the historical point the census could not make. Between Bouton’s paper and Sprague’s, the copying argument was the only general fact about sums anybody used, and the census found it seeing only 271 of the 1,194 losses to twenty-four skittles. That sounds like a weak tool. In play from a single row it is a complete one. A player holding only the puzzle’s trick wins every game of Kayles that starts from one row and never meets a position the trick cannot handle, because the trick never lets the game leave the mirrors. The theory of 1935 was needed for positions the trick does not produce, which in this game means positions somebody set up deliberately.
A winner who does not copy
The trick decides which losses get met, so the shares depend heavily on the winner’s policy. The other two rows of the table measure how much.
A winner choosing uniformly among winning moves is the neutral case, and it meets mirrors in about half the losses and pairings by value in about three quarters. A winner who deliberately avoids leaving a pairing by value whenever some winning move allows it pushes the shares down, and even then not far. From a row of 48, the avoiding winner still meets mirrors in 38 per cent of the losses and pairings by value in 45, and needs the exclusive-or in 55. From a row of 12 the avoiding winner meets pairings by value in 85 per cent of the losses, because there is rarely any other way to win.
The avoiding policy is a lower bound on what pairing by value sees, for this loser. No winner can push the share lower than one who avoids pairs at every opportunity, and that one is still forced into them in nearly half the losses at 48 skittles. What forces it is the subject of the last figure.
Three stages of a game
The losses a game meets are not alike from first to last, and sorting them by their order in the game shows a shape that no census contains.
The first loss is the position the opening leaves, and from a single row that is always two rows, or one row and nothing. Two rows lose for the player to move only if their values are equal, so the first loss always pairs off by value. It is a mirror only if the winner happened to pick the symmetric opening, about one time in seven from a row of 40, since most rows have several openings that leave two rows of equal value and different lengths, such as twenty-five and four.
From the second loss to about the eighth, the share that pairs off by value hovers near a half. Mirrors are rare at first, between four and fourteen per cent from the second loss to the sixth, and begin to climb only after that. This is where the rows have been broken into several pieces of mixed lengths and the winner’s reply restores a balance among three or more values. It is the stretch where Bouton’s exclusive-or is doing the work, applied to values rather than sizes, which is the step that took thirty-four years.
From about the ninth loss the share climbs steeply, and by the twelfth every loss is a mirror. By then the rows are ones and twos. A row of one is worth ∗ and a row of two ∗2, nothing else is left, and a position of ones and twos is lost exactly when each length appears an even number of times. The endgame of Kayles is copying, whatever the winner intended.
The endgame is ones and twos
The losses a game is likeliest to meet say the same thing from another angle.
Two single skittles are met in 94 per cent of games from a row of thirty, four single skittles in 79 per cent, six in 57. Every game ends in a position of ones and twos and passes through several such losses on the way. The first loss on the list that is not a mirror is twenty-five skittles beside four, met in 13 per cent of games, and twenty-four beside five, also 13. Both are openings: knocking a skittle out of a row of thirty to leave rows of equal value but different length, twenty-five and four both worth ∗, or twenty-four and five both worth ∗4.
So a game of Kayles from one row has a bookend structure. Its first loss needs the values and nothing more, because two rows cancel only when they are equal in value. Its last few losses need nothing but copying. In between, for a handful of moves, the exclusive-or is needed about half the time. A census of positions has no beginning, middle or end, and that is the main reason it gives a different answer.
Where pairing cannot be avoided
The avoiding winner’s share of pairs has a floor, and the floor has a cause that can be counted.
At a winner’s turn, the winning moves are the moves to a position of value nought, and sometimes every one of them leaves rows that pair off. Then the avoiding winner has no choice. From a row of 12, that happens at 88 per cent of the winner’s turns, and at 86 per cent every winning move leaves a mirror. From a row of 48 it happens at 48 per cent of the turns, 38 per cent leaving only mirrors. These forced turns come mostly at the two ends: the opening, where two rows of equal value are the only way to win, and the endgame of ones and twos, where only a mirror wins.
As the starting row grows, the middle stretch grows with it, the forced share falls and the exclusive-or’s share rises: 38 per cent of the losses at 24 skittles, 50 at 36, 55 at 48. The middle of the game is where a player who wants to make the theory necessary can make it so, and its length grows with the starting row. A game from a row of three hundred, too large to weigh here, would presumably spend most of its losses in that middle stretch.
The convention named
Normal-play Kayles: knock down one skittle or two adjacent ones; the player who cannot move loses. A game starts from one row. The loser, in a position of value nought, chooses uniformly among the distinct positions it can move to; the winner chooses among moves to positions of value nought by one of three policies: uniformly, preferring mirrors then pairings, or avoiding pairings when it can. Every reachable position is weighted by its probability, exactly, by passing probabilities down the positions in decreasing order of skittles. The loss order in the third figure averages over the different depths at which a position can be reached, which blurs the stages slightly without changing their shape.
The three tests are the earlier census’s: a mirror has every row length an even number of times, a pairing by value every Grundy value an even number of times, and a loss has values whose exclusive-or is nought.
What the weighting cannot show
How real players choose. Uniform choices are a convention, not a model of anyone. A strong loser would stall rather than move at random, preferring positions that keep the game long; a human winner would prefer moves that are easy to see, which are exactly the pairing moves. Both would change the shares, and the second would push them towards the copying winner’s hundred per cent.
Games from other starting positions. Everything here starts from one row. A game from two unequal rows, or from a random position, starts in the middle stretch rather than at the opening and could meet the exclusive-or far more often. The census and the single-row trail are two ends of a range, and positions set up by someone who knows the theory are not on it.
Rows longer than 48. The weighting enumerates every reachable position, and from a row of 60 that is already 856,177 positions; the figures stop at 48. The mirror share in play has stopped falling by then and the pairing share has not.
Still open: how long the middle lasts
The trail has a beginning that always pairs, an end that always mirrors, and a middle where the exclusive-or matters about half the time, and the shares a game meets come down to how many of its losses fall in that middle. From a row of 40 it is about seven of fifteen. The natural measurement is that count against the starting row, past 48, which would say whether the middle grows like the row, like its square root or like its logarithm, and so whether the exclusive-or’s share in play climbs towards the census’s fifteen sixteenths or levels off well short of it. The endgame starts when the rows are ones and twos, and how many moves a game spends breaking long rows into short ones is a question about the loser’s choices more than the winner’s, which is where the strategy that is a symmetry would have to give way to a strategy that stalls. Sprague–Grundy prices every position on the trail; the trail itself says how often the price is needed.
Part 7 of 7
One argument about Sprague–Grundy. The parts either side of it:
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.
EndgameExhaustive searchGrundy valueKaylesNim-sumPairing strategySprague–GrundyStrategySymmetry
- A list of shapes is an endgame table endgame, exhaustive search, grundy value, nim-sum, sprague–grundy
- A pairing that is not a symmetry exhaustive search, grundy value, pairing strategy, strategy, symmetry
- Cram is played in pieces, and the pieces are small exhaustive search, grundy value, nim-sum, sprague–grundy, symmetry
- Looking for the symmetry exhaustive search, grundy value, pairing strategy, strategy, symmetry
- A board one column wider exhaustive search, pairing strategy, strategy, symmetry
- A coalition counts to three exhaustive search, grundy value, kayles, strategy