Generator

The same game, the opposite ending

The same game, the opposite ending
The same game, the opposite ending. Nim under normal play, where the player who cannot move loses, and under misère play, where they win. The positions are identical and only one class of them changes hands — which makes misère Nim look easy and is deeply misleading about misère play in general.

Nim under normal play, where the player who cannot move loses, and under misère play, where they win. The positions are identical and only one class of them changes hands — which makes misère Nim look easy and is deeply misleading about misère play in general.

9 essays call misere-nim. The drawing above is what it returns with no arguments at all; every call below passes it something, because a placement that passes nothing draws whichever member of the family the generator happens to default to rather than the one its essay argues about.

The positions it draws

32 distinct positions, harvested by running this generator again at the options each essay passed it.

PositionWorth OutcomeDrawn in
heaps 1 P Misère play · Tame and wild
heaps 1, 1 N Misère play · Tame and wild · Two misère outcomes are not enough · What a tame heap may be replaced by · What a wider pool rescues
heaps 1, 1, 1 P A pass is not a move · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · Two misère outcomes are not enough · What a tame heap may be replaced by
heaps 1, 1, 1, 1 N Misère play · Nim, and the nim-sum · The sentence that solved the other convention · What a wider pool rescues
heaps 1, 1, 1, 1, 1 P Misère play
heaps 1, 1, 1, 1, 1, 1 N Misère play
heaps 1, 1, 2 N Misère play
heaps 1, 1, 2, 2 P Misère play
heaps 1, 1, 5 N A pass is not a move · Misère play · Nim, and the nim-sum · The patch that generalised · The sentence that solved the other convention
heaps 1, 2 N Misère play · Two misère outcomes are not enough
heaps 1, 2, 2 N Misère play
heaps 1, 2, 3 P A pass is not a move · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · What a wider pool rescues
heaps 2 N Misère play · Tame and wild · Two misère outcomes are not enough
heaps 2, 2 P A pass is not a move · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · What a tame heap may be replaced by · What a wider pool rescues
heaps 2, 2, 2 N Misère play
heaps 2, 3 N What a tame heap may be replaced by
heaps 1 ∗1 N Misère play · Tame and wild
heaps 1, 1 0 P Nim is easy, in binary · Misère play · Tame and wild · Two misère outcomes are not enough · What a tame heap may be replaced by · What a value leaves out · What a wider pool rescues
heaps 1, 1, 1 ∗1 N A pass is not a move · Nim is easy, in binary · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · The theorem that needed none of the theory · Two misère outcomes are not enough · What a tame heap may be replaced by
heaps 1, 1, 1, 1 0 P Misère play · Nim, and the nim-sum · The sentence that solved the other convention · What a wider pool rescues
heaps 1, 1, 1, 1, 1 ∗1 N Misère play
heaps 1, 1, 1, 1, 1, 1 0 P Misère play
heaps 1, 1, 2 ∗2 N Misère play
heaps 1, 1, 2, 2 0 P Misère play
heaps 1, 1, 5 ∗5 N A pass is not a move · Misère play · Nim, and the nim-sum · The patch that generalised · The sentence that solved the other convention
heaps 1, 2 ∗3 N Nim is easy, in binary · Misère play · Two misère outcomes are not enough
heaps 1, 2, 2 ∗1 N Misère play
heaps 1, 2, 3 0 P A pass is not a move · A token on a graph · The move that gives counters back · Nim is easy, in binary · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · The theorem that needed none of the theory · Three players and no answer · What a value leaves out · What a wider pool rescues
heaps 2 ∗2 N Misère play · Tame and wild · Two misère outcomes are not enough
heaps 2, 2 0 P A pass is not a move · Misère play · Nim, and the nim-sum · Tame and wild · The patch that generalised · The sentence that solved the other convention · What a tame heap may be replaced by · What a value leaves out · What a wider pool rescues · Who moves last
heaps 2, 2, 2 ∗2 N Misère play
heaps 2, 3 ∗1 N Nim is easy, in binary · What a tame heap may be replaced by

Where it is called

Changing this generator changes every one of these figures.

What reversing the ending destroys. Everything that makes normal play tractable is a theorem about who moves last, and misère play contradicts every one of them. The positions are unchanged; the means of evaluating them is gone, and what replaces it is far heavier. Where it stops

Misère play

Change one word — the player who cannot move wins — and the games are identical, the strategies are not, and almost every theorem of the normal-play theory stops being true. It is the cheapest possible modification and the most expensive.

Nim with heaps of 3, 5, 7. Heaps of counters; a move takes any number from one heap. The position is a loss for the player to move exactly when the binary digits of the heap sizes cancel in every column — the nim-sum — and that is the whole of the theory of Nim. Impartial games

Nim, and the nim-sum

Three heaps of counters, take as many as you like from one of them, and the player who takes the last counter wins. The winning condition is not a search, not a table, and not a heuristic — it is the bitwise exclusive-or of the heap sizes, and it was found in 1901.

The genus of Kayles ·77, heap by heap. One row per heap: the genus symbol, the misère outcome it implies, and whether the symbol is one a Nim heap has. A game all of whose positions are tame is played in a misère sum exactly as Nim is; a single wild heap ends that, and the normal-play Grundy value gives no warning of which heaps those will be. Where it stops

Tame and wild

The genus is a Grundy value with a tail — the misère values of the position with 0, 1, 2, … heaps of ∗2 added — and a game is tame when its symbols are the ones Nim heaps have. Computed here for seven games over heaps 1 to 14: Kayles goes wild at heap 5, Dawson's chess at heap 9, the octal game ·6 at heap 7, and heaps 3 and 11 of Dawson's chess are both worth ∗2 under normal play with only one of them tame.

What the two outcome classes of the parts settle. For each pair of outcome classes, the set of outcomes the sums actually took. A cell with one letter is a pair of classes that decided the answer; a shaded cell with several is a pair that did not. Both conventions have ambiguous cells — the difference is that normal play repairs them with values and misère play has nothing to repair them with. Where it stops

Two misère outcomes are not enough

Knowing who wins each part does not say who wins the sum. Over 676 sums built from a pool of twenty-six positions, nine of the sixteen pairs of outcome classes settle the answer under normal play and not one of the sixteen settles it under misère — and the nine that work are theorems about a value being zero, which is exactly the thing misère play does not have.

Kayles ·77: what each heap may be replaced by. Each heap with its genus, the Nim position carrying that genus, and the Nim heap a reader would substitute from the normal-play value alone. The two columns agree except where the genus belongs to no single heap — and there the second one is wrong, in sums, by exactly the amount the census counts. Where it stops

What a tame heap may be replaced by

Calling a heap tame is only worth anything because a tame heap can be swapped for a Nim position with the same genus in any misère sum. The swap is not always a single heap: Kayles' heap of eight is worth ∗ under normal play and carries the genus of 2 + 3, and substituting ∗ instead gets three of the twenty-eight Kayles pairs wrong.

A pass that may not end the game is not a component at all. The same grouping with the pass forbidden as the final move. Each group now holds several values, and a group with several values is a proof that the parts do not determine the whole. Where it stops

A pass is not a move

Put a single pass token on a Nim board and one clause decides everything. If it may be taken at any time — including as the move that ends the game — the value of the whole is the nim-sum with a one added, in all 120 positions swept: the pass is a heap of one. Forbid it as the final move and the value stops being a function of the nim-sum at all, and 3 and 1 + 2 come apart.

What a wider pool rescues. The misère outcome table built four times over, on pools of 10, 22, 100, 113 positions. A cell holds the set of outcomes that sums of its row class and column class actually took. Fifteen of the sixteen cells are short of all four outcomes on the smallest pool and none is on the largest, so every near-miss in the original table was a statement about the pool rather than about misère play. Where it stops

What a wider pool rescues

The misère outcome table has sixteen cells, and over a pool of ten positions fifteen of them hold fewer than four outcomes — which looks like structure and might be a shortage of positions. Thirteen values further on there is nothing left: every pair of outcome classes takes every outcome, so the near-misses were the pool, and the prediction the rung below made was right.

Moore’s rule, reversed. Moore’s Nim under the misère convention at three values of k, with the normal-play rule and the same rule plus a clause about heaps of one. The patch is the one Nim takes, with the modulus the normal-play rule already carries, and it is right on every position swept. Impartial games

The patch that generalised

Misère Nim takes a one-line patch: play the normal-play strategy until every heap holds a single counter, then invert. Moore's Nim, where a move may take from up to k heaps at once, takes exactly the same patch with exactly the same modulus — and the two rules disagree on six positions out of 923.

The misère sentence, asked of games it was not written for. Bouton's one-sentence solution of misère Nim put to four other impartial games and checked against a search on every position. It is exact on Nim, which is the game it is a theorem about, and wrong on all the others — and wrong in both directions, calling wins losses and losses wins, where the same paper's normal-play criterion errs only one way. The clause responsible is the one about heaps of size one, which is a statement about how many counters are left rather than about what a move can do with them. How it was found

The sentence that solved the other convention

Bouton's paper solves misère Nim too, in one line, and it is the only misère result in the subject that fits on one. Transplanted the way the normal criterion is, it fails differently — the normal one calls losses wins and never the reverse, and this one errs in both directions on every game tried, because the clause it adds is about counters rather than about moves.

The whole library · The position index · The figures that play back