Particular games

One more heap, one more up

End-Nim's 5,460 small rows are all infinitesimals, and comparison can pin the size of only 433 of them. The atomic weight calculus weighs every one: each weight is a whole number of ups, a row of n heaps never weighs more than n − 1, three heaps are read exactly by three comparisons, and the weight alone accounts for 4,508 of the 4,738 rows the same player wins whoever starts. From four heaps on, equal end heaps stop meaning a level row.

Assumes: A game with nothing at stake · The number inside the bracket

End-Nim is Nim’s row of heaps with a player at each end: Left takes any number of counters from the leftmost heap, Right from the rightmost, and a player facing an empty row has lost. Taking from the ends evaluated every row of up to six heaps of up to four counters — 5,460 of them — and found 2,693 distinct values and not one non-zero number. A game with nothing at stake found out why: either player can move exactly when the row is not empty, which makes the whole game all-small, so every value is an infinitesimal, every stop is nought, and every temperature is nought. Nothing in End-Nim is ever worth fighting over, in the sense temperature measures.

That essay closed on the instrument the game needed and nobody had yet applied to it. A game whose only interesting quantity is measured in multiples of ↑\uparrow wants atomic weight, the number of ups a position is worth, and the calculus that produces it had not been run on End-Nim or on any other game. The number inside the bracket has now run it on every all-small value to day three and found that it adds exactly where comparison only bounds. End-Nim is the first real game to be weighed with it.

The figure above is the smallest interesting slice: rows of three heaps with three counters in the middle, each cell the weight of one row, in ups, positive when Left is ahead. It already shows the shape of the whole answer — the sign comes from the ends, the size from the middle — and the rest of this essay is what the census says once the same question is put to all 5,460 rows.

Every row gets a number

Comparison gave End-Nim almost nothing, for the reason how many ups first gave. The up-bracket of a position is the largest nn with G≥n⋅↑G \ge n\cdot\uparrow and the smallest nn with G≤n⋅↑G \le n\cdot\uparrow, and on End-Nim it pins a row to a single integer only 433 times in 5,460. The rest are bands one to four ups wide, 3,254 of them two wide, because almost every End-Nim value holds something — a star, or an option confused with the multiples of up — that comparison against those multiples cannot see past.

The calculus has no such trouble. It replaces each option by its own weight, shifts Left’s down by two and Right’s up by two, takes the simplest game between the two sides, and when that is an integer — which on End-Nim it is every time — asks whether the row is above, below or confused with a remote star, a nimber too large for anything in the row to notice. Run on every row, it returns a weight for all 5,460, and every one is a whole number of ups. Not one half, not one star, not one hot weight: End-Nim’s options never outweigh each other by three, which the arithmetic of the recursion says is what a fractional weight needs.

One more heap, one more up. End-Nim rows by number of heaps, with the range of atomic weights, how many weigh nought and how many have a pinned up-bracket: 1 heaps, 4 rows, 0, 4 at nought, 0 pinned; 2 heaps, 16 rows, −1 to +1, 4 at nought, 4 pinned; 3 heaps, 64 rows, −2 to +2, 24 at nought, 6 pinned; 4 heaps, 256 rows, −3 to +3, 32 at nought, 36 pinned; 5 heaps, 1,024 rows, −4 to +4, 280 at nought, 61 pinned; 6 heaps, 4,096 rows, −5 to +5, 488 at nought, 326 pinned.
Fig. 1 All 5,460 rows, by number of heaps. Every weight is an integer, every one lies inside its bracket, and the range widens by exactly one up per heap — from nought for a single heap to plus or minus five for six. The bracket pins only 433 of them; the calculus weighs all of them.

The first pattern is in the column of ranges. A single heap weighs nought — it is a Nim heap, a nimber, and nimbers weigh nothing. Two heaps weigh between minus one and one. Three, between minus two and two. Each added heap widens the range by one up, and through six heaps of up to four counters no row of nn heaps weighs more than n−1n - 1 in either direction. The size of the heaps does not move this ceiling: rows of three heaps with heaps up to seven, checked below, never weigh more than two.

That is a statement about where End-Nim’s advantage lives. A large heap is not worth many ups. A long row can be. The unit of advantage in this game is not a counter but a heap, and the reason is visible in the move rule: a heap is a turn a player must spend to get past it, whatever its size, and what is being counted is turns.

Three heaps, three comparisons

On two heaps the weight is just the sign of the difference. a ba\ b weighs one if a>ba > b, minus one if a<ba < b, nought if they are equal: the larger end’s owner is one up ahead, which is the two-heap rule of taking from the ends — the larger end wins — sharpened from an outcome to an amount.

Three heaps a b ca\ b\ c are the first case where the middle can matter, and the middle matters exactly as much as the figure at the top suggests. The law is

aw(a b c)=sgn⁡(a−c) (1+sgn⁡(max⁡(a,c)−b)).\mathrm{aw}(a\ b\ c) = \operatorname{sgn}(a - c)\,\bigl(1 + \operatorname{sgn}(\max(a, c) - b)\bigr).

The ends decide who is ahead: equal ends weigh nought, and otherwise the player owning the larger end has the advantage. The middle decides how much. If the middle heap is smaller than the larger end, the advantage is two ups. If it equals the larger end, one. If it is bigger, nothing at all.

Exact on every row of three. The three-heap End-Nim law — weight sgn(a − c) × (1 + sgn(max(a, c) − b)) — checked against the atomic weight calculus on all 343 rows with heaps from one to 7, by regime: ends equal, 49 rows, e.g. 4 6 4 weighs 0; middle below the larger end, 182 rows, e.g. 5 2 3 weighs +2; middle equal to it, 42 rows, e.g. 5 5 3 weighs +1; middle above it, 70 rows, e.g. 2 6 5 weighs 0.
Fig. 2 The three-heap law against the calculus on all 343 rows with every heap from one to seven, by which comparison applies. It is exact on every one. A middle heap bigger than both ends cancels the advantage completely, whichever end is larger.

The last clause is the one worth reading slowly. In 2 6 52\ 6\ 5, Right’s end is the bigger, and on two heaps that would make Right one up ahead. With a six in the middle, the row weighs nought. What happens is that whoever empties their end heap first has the middle heap become their end, and a middle heap bigger than both ends is a prize for whoever reaches it — which is the player who empties their own end first, the one with the smaller end. The larger end’s advantage in tempo is exactly cancelled by the smaller end’s earlier arrival at the six. When the middle equals the larger end the race is closer and half of the two-up advantage survives; when the middle is smaller than the larger end, reaching it is no prize, and the full two ups stand.

The law is checked, not derived. On all 343 rows of three heaps with heaps from one to seven, the calculus and the formula agree exactly; 182 of them have a middle below the larger end and weigh ±2\pm 2, 42 have a middle equal to it and weigh ±1\pm 1, 70 have it above and weigh nought, and the 49 with equal ends weigh nought too. Nothing in the check reaches past seven, and nothing in the formula depends on seven, so the natural conjecture is that it holds for every three-heap row. That conjecture is not proved here.

The weight is most of the outcome

The weight is most of the outcome. Outcomes of all 5,460 End-Nim rows up to six heaps of up to four, by atomic weight: weight +2 or more: 1,395 rows, 1,395 Left, 0 Right, 0 first player, 0 second player; weight +1: 919 rows, 859 Left, 0 Right, 60 first player, 0 second player; weight 0: 832 rows, 115 Left, 115 Right, 241 first player, 361 second player; weight −1: 919 rows, 0 Left, 859 Right, 60 first player, 0 second player; weight −2 or less: 1,395 rows, 0 Left, 1,395 Right, 0 first player, 0 second player.
Fig. 3 All 5,460 rows by weight and by who wins. A weight of two or more either way is an outright win for that side on every row. A weight of one is a win for that side moving first and, on 859 of 919 rows, moving second too. Every second-player win weighs nought.

The first census of End-Nim made much of one number: 4,738 of the 5,460 rows are won by the same player whoever moves first. In a game with no temperature, nothing to fight over and no number to bank, that is an odd amount of determinacy, and nothing at the time said where it came from.

The weight says where most of it comes from. The two-ahead rule guarantees that an all-small game weighing two or more is a win for Left whoever starts, and End-Nim has 1,395 rows weighing two or more and 1,395 weighing minus two or less. That is 2,790 outright wins accounted for before any play is examined. At weight one the guarantee is weaker — only that Left wins moving first — but End-Nim is generous: 859 of its 919 rows at weight one are won by Left from either side, and the other 60 are first-player wins; none is won by Right or by the second player. The mirror holds at minus one. So of the 4,738 rows won outright, 4,508 carry a weight of at least one in the winner’s favour, and only 230 — 115 each way — are outright wins that the weight calls level.

The other end of the table is just as clean. All 361 second-player wins weigh nought, which they must — a game equal to nought weighs nought, and every one of those 361 rows is nought — but the converse fails, and that is where the weight runs out. The 832 rows weighing nought include those 361, 241 first-player wins, and 230 rows that one side wins outright by less than an up. Nought is the weight saying that whatever decides the row is smaller than its unit, and in End-Nim that happens on about one row in seven.

The mirror rows weigh nothing, and are not alone

One block of the nought column was guaranteed before the census ran. Where the nimbers run out found 410 rows worth nimbers, and the rows that are their own mirror proved the condition exact on this game: a row is a nimber precisely when it equals its own negative. A value equal to its own negative must weigh the negative of its own weight, because weights add and negation reverses them, and the only weight that is its own negative is nought. All 410 weigh nought, the 361 rows worth zero among them, and none of the weighted rows is self-negative.

The interesting part is the remainder. The nought column holds 832 rows, so 422 rows weigh nought without being mirrors: 192 first-player wins that are not nimbers, and the 230 outright wins the weight calls level. Those 422 are the place where End-Nim’s partizan character is real and smaller than an up — values that are not their own negatives, whose advantage, where they have one, sits below the unit the calculus counts in. They are what a finer instrument than atomic weight would have to measure, and the subject has such instruments for some families of infinitesimal and none that is known to apply to these.

So the census divides End-Nim into three layers that the earlier essays saw only as one mass of infinitesimals. The heavy rows, weighing at least one up either way, 4,628 of the 5,460, where the weight fixes the outcome almost everywhere. The mirror rows, 410, weighing nought because they must. And the 422 light rows, weighing nought for no structural reason anyone has stated, where every interesting question about End-Nim that the weight cannot answer now lives.

From four heaps, the ends stop deciding

From four heaps the ends stop deciding. End-Nim rows whose two end heaps are equal, by number of heaps, with how many have a non-zero atomic weight and the heaviest example: 2 heaps, 0 of 4 weighted; 3 heaps, 0 of 16 weighted; 4 heaps, 48 of 64 weighted, e.g. 3 1 2 3 weighs −3; 5 heaps, 162 of 256 weighted, e.g. 3 1 1 2 3 weighs −4; 6 heaps, 896 of 1,024 weighted, e.g. 3 1 1 1 2 3 weighs −5.
Fig. 4 Rows whose two end heaps are equal. On two and three heaps every such row weighs nought; on four heaps 48 of 64 do not, and on six heaps 896 of 1,024. The heaviest examples put a single heap of two next to one end and carry the full n−1n - 1 ups that a row of their length can.

The three-heap law makes equal ends look like a level row, and on three heaps they are: all sixteen rows of three heaps with equal ends weigh nought, as do the four rows of two. A reader extrapolating would expect the ends to keep deciding the sign of the weight, with the interior adjusting the size.

They do not, and the break is total rather than gradual. On four heaps, 48 of the 64 rows with equal ends carry a weight. The heaviest is 3 1 2 33\ 1\ 2\ 3, with threes at both ends and Right three ups ahead — the most any four-heap row can weigh. The lighter cases make the mechanism visible: 1 1 2 11\ 1\ 2\ 1 has single counters at both ends, and Right is a full up ahead, because the heap of two sits next to Right’s end. Right’s lone counter is a step towards a heap of two; Left’s is a step towards another single. What the ends hold is not the question. What lies one heap in from each end is part of the answer, and from four heaps on there is a heap one in from each end that the other player can never reach first.

With equal ends, the inner pair decides. Atomic weights of End-Nim rows 3 b c 3 for inner heaps from one to four, listed for each second heap b over third heaps c = 1 to 4: b = 1: 0 −3 −2 −1; b = 2: +3 0 −2 −1; b = 3: +2 +2 0 −1; b = 4: +1 +1 +1 0.
Fig. 5 Four-heap rows with a three at each end, by their two inner heaps. With the ends level, the inner pair takes over the job the ends did on two heaps: the side whose inner heap is larger is ahead, and the ends set how far — the further they reach past the larger inner heap, the bigger the weight, up to the three a four-heap row can carry.

With the ends equal the four-heap weights are not chaotic; they are the two-heap rule moved one step inward. In e b c ee\ b\ c\ e the sign is the sign of b−cb - c — Left is ahead when the heap just inside her end is the larger — and the size is one up plus one for each step by which the ends reach past the larger inner heap less one, capped at three. With threes at both ends, 3 1 2 33\ 1\ 2\ 3 weighs minus three; widen the inner pair to 3 1 4 33\ 1\ 4\ 3 and it weighs minus one, because the ends no longer reach past the four. The rule holds on all 64 rows with equal ends and heaps up to four. It has the same reading as the three-heap law: the ends are a reserve that whoever wins the inner race gets to spend, and a reserve worth spending is one larger than the prize the inner race was about.

The share keeps rising with length: 162 of 256 five-heap rows with equal ends are weighted, and 896 of 1,024 six-heap rows. On a long row equal ends are almost never level. They also stop deciding the sign when the ends differ — a short four-heap row like 1 2 1 21\ 2\ 1\ 2, with the larger end on Right’s side, weighs plus one — and the simple counting formulas that a reader would try next, built from the ends and the number of interior heaps below or above the larger end, each fail on more than half the rows of four heaps. With equal ends there is a rule; with unequal ends the census has found none as short as the three-heap law.

One spare counter, as many ups as the row is long

One spare counter, a weight as long as the row. End-Nim rows of a two followed by one to seven ones, with their atomic weights, up-brackets and values where short: 2 1 weighs +1, bracket [0, 2]; 2 1 1 weighs +2, bracket [1, 3]; 2 1 1 1 weighs +3, bracket [2, 4]; 2 1 1 1 1 weighs +4, bracket [3, 5]; 2 1 1 1 1 1 weighs +5, bracket [4, 6]; 2 1 1 1 1 1 1 weighs +6, bracket [5, 7]; 2 1 1 1 1 1 1 1 weighs +7, bracket [6, 8].
Fig. 6 A heap of two followed by single counters. A row of single counters alone weighs nought at every length; one extra counter at Left’s end makes the row weigh one up for every single counter behind it. The bracket sits one either side of the weight on every row, and past five heaps the values themselves outgrow a line of print.

The census’s ceiling of n−1n - 1 has a simple witness. A row of single counters weighs nought at every length — it is ∗\ast or 00 according to its parity, a race in which each player removes one heap a turn from their own end and nobody has anything to spare. Put one extra counter in Left’s end heap and the row 2 1 1⋯12\ 1\ 1 \cdots 1 with kk single counters behind it weighs exactly kk ups, checked to k=7k = 7.

The extra counter is a move Left can make without shortening the row, a tempo held in reserve, and a reader might expect a reserve of one move to be worth a constant amount. The values say why it is not. 2 12\ 1 is {0∣∗2}\{0 \mid \ast 2\}: Left’s best move empties the row’s advantage to nought, and Right’s only move leaves the lone heap of two. Every further single counter wraps the same shape once more — 2 1 12\ 1\ 1 is {0∣{0∣∗2}}\{0 \mid \{0 \mid \ast 2\}\} — because Right’s only move removes one single from his end and leaves the shorter row, while Left’s best is still to reach nought. The row is a tower, one level per single counter behind the spare.

The calculus reads a tower like that in one line. Left’s option is nought, weight nought, shifted to −2-2; Right’s option is the tower one level shorter, weight k−1k - 1, shifted to k+1k + 1. The simplest game between −2-2 and k+1k + 1 is nought, an integer, so the remote star decides; the row is above it, so its weight is the largest integer not at least k+1k + 1, which is kk. Each single counter Right has to remove before he can reach the spare is one more level of the tower and one more up. The value grows by a level per counter and is too long to print past five heaps; the weight grows by one.

The bracket tells the same story at lower resolution, and it is the case when the ups add singled out: a family with a star in every member. It is [k−1,k+1][k - 1, k + 1] on every row of the family, two wide and centred on the weight, which is what a single star in the value costs. Comparison here is right about the size and wrong by one in each direction about the exact count. The weight removes the uncertainty and keeps the rest.

What the weight cannot show

It cannot see inside nought. 832 rows weigh nought and they are spread over every outcome: second-player wins, first-player wins, and 230 rows that one side wins outright by an amount smaller than an up. Those 230 are where End-Nim’s determinacy is decided by something the calculus is not built to measure, and nothing on this page says what it is.

It does not yet describe four heaps. The three-heap law is three comparisons, and the equal-ended rule extends it inward; for the 192 four-heap rows with unequal ends the census gives every weight without giving the rule they follow. Whether there is a short rule — reading, perhaps, each end against the heap beside it — is open.

The ceiling is measured. No row of nn heaps up to four counters, and no three-heap row up to seven, weighs more than n−1n - 1; that is a census to six heaps, and the claim for every row is a conjecture.

The conventions underneath

Normal play: a player who cannot move loses, so the weights measure who moves last. The game is End-Nim exactly as its first essay defines it, a counter taken from the end heap, an emptied heap removed. Normal play is the convention who moves last makes the foundation of everything here. Weights are taken on canonical forms, by the calculus in the number inside the bracket, and comparison with the remote star is made at two sizes past each row’s birthday and required to agree. The positive direction is Left’s: a positive weight means the player taking from the left end is ahead. And the census is the same one the earlier End-Nim essays used — every row of one to six heaps with each heap between one and four — so its counts can be set beside theirs: the 2,693 values, the 410 nimbers, the 361 noughts, the 4,738 outright wins.

How the census was taken

Each row is built as a game by the End-Nim recursion, reduced to canonical form, and weighed; the weight is memoised on the canonical form, so the 5,460 rows cost the weighing of their distinct values rather than of every row. The bracket is the comparison against n⋅↑n\cdot\uparrow for nn from −12-12 to 1212, and the outcome is the usual pair of first-move searches. The three-heap check runs separately on all 737^3 rows with heaps from one to seven. Every figure refuses to draw if its caption’s claim fails on any row it covers — a weight of the wrong size for its length, a three-heap row off the law, a row weighing two that Left does not win, an equal-ended row of three heaps carrying a weight.

Still open: a rule for four heaps

The three-heap law took three comparisons, and its shape — the ends for the sign, the middle against the larger end for the size — is a reading of who reaches the middle first and whether it is worth reaching. Four heaps have two interior heaps, each next to one end, and the census says they matter: equal ends carry weights, and the heaviest rows have a two beside one end. The equal-ended rows already have a rule, the two-heap rule moved one step inward. The natural next measurement is to classify the 192 four-heap rows with unequal ends by the four comparisons each end makes with the heap beside it and with the other end, and ask whether the weight is a function of that pattern. If it is, End-Nim has an exact weight rule for four heaps written in comparisons alone, and the step from three heaps to four says what each further heap adds. If it is not, the four-heap weights depend on the heap sizes in a way no ordering can capture, and End-Nim’s arithmetic of ups is as rich as its 2,693 values — only better organised.

Part 5 of 5

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

All-smallAtomic weightEnd-NimExhaustive searchInfinitesimalNormal playOutcome classPartizanRemote starTwo-ahead ruleUp (↑)Up-bracket