Impartial games

A split that settles the game it is added to

Put a free split in front of all 512 octal codes with up to three digits and ask, heap by heap, where it decides the value. Ninety-three codes are finished with it by heap six, and none at heap five; 342 never are. Four are finished at heap 971 or 980, after deciding nearly two hundred and fifty heaps — and from heap 998 they repeat with period 51 and a palette of four values, while the same removals without the split show no period in thirty thousand heaps.

Assumes: A split matters at four heaps or at all of them · Four values, and the sequence is settled for ever

A split matters at four heaps or at all of them asked one question of sixty-four games and got an answer with nothing in the middle. Each game was an octal code with two digits after the point and a free split in front: a player may take counters as the digits allow, or break a heap into two without taking anything. For each heap the question was whether the split decides the value — whether, with the split removed and everything else left alone, that heap would be worth something different. Twenty-two of the sixty-four codes needed the split at no heap past four. The other forty-two needed it at a quarter of all heaps or more, for as far as anybody cared to look. Between “finished by heap four” and “a quarter of everything” there was nothing at all.

The essay closed by naming where that gap might close. A third digit gives each game a removal of three counters, and with it more ways to reach a value without splitting — so more chances for a split to matter for a while and then be covered for ever. A single game decisive at heaps well past four, and then never again, would turn the dichotomy into a spectrum and make the size at which a split stops mattering into a real quantity.

There are 512 codes with three digits after a split, the sixty-four two-digit ones among them as the codes ending in nought. Asked the same question, they keep the gap almost exactly where it was, and then four of them cross it in a way nobody would have guessed.

A third digit, asked the same question

The test is the same one, and it is local. At each heap, take the game’s own Grundy values for every smaller heap — computed with the split, since the split is part of the rule — and compute the heap’s value twice: once by the mex of all its options, once by the mex of the options that remove counters. If the two differ, the heap is decisive for the split. A code’s decisive heaps are a list, and the list either stops or does not.

Where the free split stops deciding, over 512 codes. The 512 take-and-break codes 4.d₁d₂d₃ grouped by the last heap, up to 4,000, at which the free split decides the value: 73 never, then 47, 18, 14 and 14 codes ending at heaps 2, 3, 4 and 6, none at 5 or from 7 to 970, four at 971 or 980, and 342 still deciding at 4,000.
Fig. 1 All 512 codes 4.d₁d₂d₃, sorted by the last heap up to 4,000 at which the free split decides the value. Ninety-three are finished by heap six, with none ending at heap five; 342 are still deciding at heap 4,000. Four end at heap 971 or 980, in a region where no other code ends at all.

Read from the top, the picture looks like the two-digit answer with a few more rows. Seventy-three codes never need the split: every value a split reaches at any heap, a removal reaches there too. Forty-seven are finished at heap two, eighteen at heap three, fourteen at heap four — the same three endings the two-digit census found, in larger numbers. Then the first new thing: fourteen codes are finished at heap six, and not one at heap five. The short side of the gap has moved, by two heaps.

Then a long blank. No code’s last decisive heap lies anywhere from seven to 970, and below that blank are 342 codes still deciding at heap 4,000, the far end of the computation. That is the dichotomy again, with its edge at six instead of four.

And between the two, four codes the dichotomy has no room for. Their last decisive heap is 971 or 980. They are not finished early and they are not deciding for ever; they are the case the question was asked about.

The free split's four classes, by number of digits. The 512 codes 4.d₁d₂d₃ classed by what the free split does, separated into the 64 with no third digit and the 448 with one: never decisive 73, finished by heap six 93, finished late 4 (all three-digit), decisive for ever 342.
Fig. 2 The four classes, separated into the 64 codes with no third digit and the 448 with one. Every two-digit code keeps the class it had in the smaller census; the third digit adds codes to the old classes and creates exactly one new one, with four members.

Separating the census by digits shows that nothing about the two-digit answer was disturbed. The sixty-four codes ending in nought are the sixty-four already counted, and every one lands in the class it was given there: eleven never, eleven short, forty-two for ever. The 448 codes with a genuine third digit split 62, 82 and 300 across the same three classes and four into the new one. So the third digit does not blur the old picture. It adds one class, and that class is very small and very specific — all four of its codes start 4.3, with 4 or 5 in the second place and 4 or 6 in the third.

Why a heap of six can need a split once

The short side reaching six is worth a look before the four, because it says what a finite decisive set is made of. Fourteen codes end there, and the simplest is 4.003: the only moves are the free split and taking three counters, leaving one heap or none.

Heap six of 4.003, move by move. The options of a heap of six in the game 4.003: taking three leaves a heap worth 2, and each of the three free splits leaves a position worth 0, so the heap is worth 1, where the removal alone would make it worth 0.
Fig. 3 Heap six of 4.003. Taking three leaves a heap worth 2, and all three splits — one and five, two and four, three and three — leave positions worth 0, so the heap is worth 1. Without the splits the only option is worth 2 and the heap would be worth 0. At heap seven the removal already reaches 1, and the value is 0 either way.

The values of 4.003 start 0, 0, 1, 2, 1, 0, 1. A heap of six has one removal, to a heap of three worth 2, and three splits. Every split happens to produce two heaps of equal value — one and five are both worth nought, two and four both worth 1, three and three trivially equal — so every split is worth nought by the exclusive-or. The options are {2, 0}, the least missing value is 1, and that is the heap’s value. Take the splits away and the options are {2}, whose mex is nought. So heap six is decisive.

At seven the removal leaves a heap of four worth 1, the splits supply nought and 3, and the value is nought with or without them. From there on the sequence settles into alternating noughts and ones, the removal of three always reaches the value a split would have supplied, and the split never decides again. That is the shape of every short decisive set: a few small heaps where the split’s options and the removals’ options have not yet overlapped, then a regime where the removals cover everything the split could add.

Why heap five never ends a list is not explained here, only counted. Among the 512 codes, a heap of five is sometimes decisive — but never as the last decisive heap. Every code decisive at five is decisive at a later heap too, and in fact at a share of all heaps. No short decisive set has more than four members, and the longest of them, 4.323 and 4.325 at heaps two, three, four and six, is still finished before a reader would have time to doubt it.

Four codes that need the split for nine hundred heaps

The four new codes are 4.344, 4.346, 4.354 and 4.356. In all of them a player may take one counter, leaving one heap or none; take two, leaving two heaps (and in two of the four, nothing either); take three, leaving two heaps (and in two of the four, one); or split a heap without taking anything. They differ only in which removals are allowed, and they turn out to have exactly the same Grundy values at every heap — the extra moves in one rule are moves to values the others already reach.

4.344: a split that decides for 980 heaps and then stops. The first 1,200 heaps of the game 4.344, sixty to a row, with the 254 heaps where the free split decides the value marked. They thin out and stop at heap 980; from heap 998 the sequence repeats with period 51 and the split never decides again.
Fig. 4 The first 1,200 heaps of 4.344, sixty to a row. The 254 heaps at which the free split decides the value are marked; they are dense at first, thin through the eight hundreds and stop at heap 980. From heap 998 the values repeat with period 51, shaded, and the split decides nothing more.

Their decisive heaps are not a handful. 4.344 needs its split at 254 heaps and 4.346 at 178, the difference between them being the heaps where 4.344’s narrower removals leave a gap that 4.346’s wider ones fill. The decisive heaps are dense through the first few hundred heaps — a split is needed at about one heap in four over the first thousand, more often early — and then they thin, through the seven and eight hundreds, to a last few at 939, 940, 971 and 980.

After that, nothing. No heap from 981 to 8,000 needs the split in any of the four codes. And the reason they stop is visible in the shading: from heap 998 the values repeat with period 51. Before that the values wander, reaching 35; inside the period they use four numbers only — 1, 4, 10 and 15, in a fixed pattern of fifty-one — and in that regime a removal reaches every value a split could add.

A period here is a theorem, not a guess, and the reason is the argument a period is a proof gave for subtraction games, carried over to games that split. If the values of a game whose moves remove at most three counters and leave at most two heaps repeat with period p from heap n0n_0 over a long enough stretch, they repeat for ever: every option of a later heap is a pair of smaller heaps, at least one of which is far enough out to be shifted back by a period without changing its value. The stretch required is twice the start plus the period plus the largest removal, here 2 × 998 + 51 + 3 = 2,050 heaps. Nothing in that argument cares whether the smallest removal is one counter or none, so it covers the free split as it covers any other splitting move. The values have been computed to 8,000.

The same argument, applied to the removal options alone, gives their mex a period of 51 from the same start, and it agrees with the full value at every heap from 981 to 8,000. So the four codes need their split at a finite set of heaps and never again, and that is proved rather than observed. The cap is a real parameter: allow the split only on heaps up to 980 and 4.344 is the same game.

The split did the settling

That would be enough for the question as it was asked. What makes the four codes worth a whole essay is what happens without the split.

The free split settles codes that are unsettled without it. Four codes 4.344, 4.346, 4.354 and 4.356, whose free split decides 177 to 254 heaps and stops by heap 980, all repeat with period 51 from heap 998 and never exceed 35. With the same removals and no free split, ·344, ·346 and ·354 show no period in 30,000 heaps and values past 100, and ·356 settles only at heap 7,315 with period 142.
Fig. 5 The four late codes against the same rules with the free split removed. With the split, each decides at 177 to 254 heaps, stops by heap 980 and repeats with period 51 from heap 998, with no value above 35. Without it, ·344, ·346 and ·354 show no period in 30,000 heaps and values past 100, and ·356 settles only at heap 7,315 with period 142.

Take away the free split and each of the four is an ordinary octal game: ·344, ·346, ·354 and ·356. Three of them have no period anywhere in thirty thousand heaps, and their values grow — ·344 to 522, ·346 to 1,039 — which is the behaviour the sequence nobody has settled describes for the open cases of the octal family, and the slow, unsteady rise that growing is not climbing measured in codes like them. The fourth, ·356, does settle, with period 142 from heap 7,315, about seven times later than its split version and with a period nearly three times as long.

So adding a move made these games simpler. With the split, the values stay below 36 and fall into a period of 51 before heap a thousand. Without it, they climb past a thousand and do not repeat. A rule with more options would be expected, if anything, to have richer values, and splitting is a move found the same surprise once already, in Lasker’s Nim, whose Grundy sequence is simpler than its removals alone would suggest. Here the effect is larger and has a sharper shape. The split is not a small correction that persists. It does its work early — 254 times in the first thousand heaps — and the work it does is to keep the values small enough for the removals to take over. Once they have, it is idle.

That inverts the usual reading of a decisive set. A heap where the split decides is a heap where the split changes the value, and here those changes are not decoration. Take away the split at those 254 heaps and the values above them change too, because every value is computed from all those below. The game that results is ·344, and it grows without bound on the evidence. The free split at those few hundred heaps is the whole difference between a solved game and an unsolved one.

The other side of the gap moves too

The four codes live in a gap that the three-digit family otherwise keeps. But the far side of that gap is not where it was either.

How much of every heap a for-ever split decides. The 342 three-digit codes whose free split stays decisive, grouped by the share of heaps 2,001 to 4,000 it decides. 46 sit below a quarter, the floor on two digits, and the smallest share is a sixth.
Fig. 6 The 342 codes whose free split decides for ever, by the share of heaps 2,001 to 4,000 at which it decides. On two digits no share was below a quarter; on three, forty-six codes sit below it and the smallest share is a sixth, held by twelve codes whose values run 1, 1, 1, 2, 2, 2.

On two digits the smallest share a for-ever split ever decided was a quarter. On three it is a sixth. Twelve codes reach that floor, all with values repeating 1, 1, 1, 2, 2, 2 after the first heap, and in each of them the split is needed once in every six heaps, at a fixed place in the pattern. Thirty-four more decide at a fifth or a little more, so forty-six codes sit below the old quarter.

Both edges of the gap therefore moved inward when a digit was added: the finished side from four to six, the for-ever side from a quarter to a sixth. That makes it tempting to think the gap is only a fact about short codes, and that with four or five digits it would fill in until every last-decisive heap and every share appeared somewhere. The three-digit census does not say that. What it says is narrower: one digit more moved each edge a little and put four codes in the middle, at a single place, and nowhere else. The 512 codes have room for a code finished at heap 50, or 200, or 600, and there is none.

Nor do the shares fill in smoothly. Among the exact ones the commonest is a half, held by 34 codes, then a quarter and every heap; the exact shares that appear are fractions with small denominators — a third, five twelfths, seven twelfths, three quarters — plus a few with longer periods, 5/24, 15/60, 34/79. And 128 of the 342 codes have decisive heaps that show no repeat shorter than 240 in the second half of the window. Not one of those 128 has values that repeat within 4,000 heaps either: they are codes whose values themselves have not settled, and for them the share is a count rather than a fraction.

The class is only as sharp as the window

The four late codes were nearly missed, and how they were nearly missed is the most practical thing in the census.

The split classes at 1,000, 2,000 and 4,000 heaps. The 512 codes 4.d₁d₂d₃ classed at windows of 1,000, 2,000 and 4,000 heaps. The four codes whose split stops at heap 971 or 980 count as decisive for ever at 1,000 and as finished late from 2,000; every other count is unchanged.
Fig. 7 The same 512 codes classed at windows of 1,000, 2,000 and 4,000 heaps. At 1,000 the four late codes count as deciding for ever, because their last decisive heaps fall in the window’s second half; from 2,000 they count as finished. Every other count is the same at all three windows.

The two-digit census called a code decisive for ever when its split was still deciding somewhere in the second half of the window, and its window was 1,000 heaps. Read the same way, the four codes are decisive for ever: their last decisive heaps, 971 and 980, sit in the second half of a 1,000-heap window. The census at 1,000 heaps reports the dichotomy perfectly intact — 73, 93, 346 — and says nothing about any code finished late.

Doubling the window moves the four, and only the four. From 2,000 heaps to 8,000 nothing else changes. That is reassuring about the rest of the census and sobering about its method. A code finished at heap 1,950 would have been called for ever by a census at 2,000 and found only by one at 4,000, and a code finished at 3,900 would still be hiding now. A local test answers a global question only up to a window, and the shape of the answer — a gap, with a few late codes in it — is exactly the shape a window would hide. The same point was made about periods in a repetition is a guess, where a reader who stopped early was confidently wrong; here the cost of stopping early would have been the one interesting result.

For the four, the window is not the end of the evidence, since the period proof covers every heap. For the 342, it is. Some of them may be finished at heap 50,000.

Convention, method and what was counted

Codes are written d0.d1d2d3d_0.d_1d_2d_3. The digit d0=4d_0 = 4 is the free split: a heap may be broken into two non-empty heaps with nothing removed. Each later digit dkd_k says what may be left after removing k counters — bit 1 for nothing, bit 2 for one heap, bit 4 for two non-empty heaps — so ·344 allows taking one counter to leave one heap or none, and taking two or three to leave two heaps. Play is normal: the player with no move loses. Values are by the mex rule.

A heap n is decisive when the mex of all its options differs from the mex of its removal options, both computed from the game’s full sequence below n. A code’s class is read from its last decisive heap up to the window: none, at most six, more than six but in the first half of the window, or in the second half. A share is exact when the decisive heaps repeat with period at most 240 over the second half; otherwise it is a count. Every code was computed to 4,000 heaps, all 512 again to 8,000 for the classification, and the four late codes and their ordinary counterparts to 30,000.

The period of 51 from heap 998 is reported when the values repeat for at least three periods and 200 heaps, and then proved by the window argument above, which needs the repeat to hold to heap 2,050. ·356’s period of 142 from 7,315 has been seen to repeat through 30,000 heaps; the window it would need is about 14,800, so that one is proved too. The absence of a period in ·344, ·346 and ·354 is only an absence in the range searched.

What the census does not show

That the gap stays empty for longer codes. Four digits after the point allow 4,096 codes with a split in front, and both edges moved when the third digit was added. Nothing here says whether the next digit moves them again, puts more codes in the middle, or fills it.

Why heap five is never last, and why six is. The fourteen codes finished at six have a reason each, of the kind 4.003 showed; a general statement that would forbid heap five or seven is not given.

Why the four late codes settle. The period is proved once it appears, but nothing here predicts that it will, or why a split used 254 times should leave values small enough for a removal of three to cover. The sharp contrast with ·344, unsettled without the split, is measured rather than understood.

What a decisive heap costs. The picture marks where the split is needed. It does not show how much each decisive heap changes the values above it, which is the quantity that turns 4.344 into ·344 when all of them are taken away at once.

A cap is a size, and it can be large

The formula is a limit capped the take in Lasker’s Nim and watched the capped games converge, and one split is enough found that Lasker’s Nim needs only its smallest splits; the essay that asked where a split matters capped the split instead and found that every code either ignored a cap above four or changed just past any cap at all. With three digits that is no longer true. 4.344 with its split allowed only on heaps up to 980 is 4.344, and with the split capped at 970 it is a different game; the size of a split’s working life is a property of the rule, and for these four rules it is nearly a thousand heaps.

That also says something about the octal games the split was added to. The ordinary family has a long list of codes whose values have never settled, and the usual way to settle one is to compute further. Here are three unsettled codes that settle within a thousand heaps when a free split is put in front of them — and do so by needing that split for nearly a thousand heaps and then not at all. Whether that is an accident of four neighbouring rules, or a route by which some unsettled games are attached to settled ones, the census of 512 cannot say.

Still open: whether a split can settle a famous code

The four late codes are settled versions of ·344, ·346 and ·354, which nobody has studied for their own sake. The obvious next measurement is to put the free split in front of every unsettled ordinary code of up to three digits — ·6, ·007, ·16 and the rest of the list that the sequence nobody has settled carries — and ask, for each, whether the split version settles, at what heap, and whether its decisive set is finite. A famous code with a split version that settles would not settle the famous code, since the split changes the game. But it would be the first time the unsettled octal codes had been sorted by something other than how far the computation has gone: by whether one extra move, used for a while, is enough to make them repeat.

Part 7 of 8

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

Exhaustive searchGrundy valueMexOctal gamePeriodicitySprague–GrundyTake-and-break