Welter positions and what they are worth
Coins on a strip, with the Grundy value the recursion returns and the nim-sum the squares would have if they were independent heaps. The two columns are the essay: they hardly ever agree.
2 essays call
welter-coins. 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
19 distinct positions, harvested by running this generator again at the options each essay passed it.
| Position | Worth | Outcome | Drawn in |
|---|---|---|---|
0, 1 |
0 |
P | No two heaps alike |
0, 1, 2 |
0 |
P | No two heaps alike |
0, 1, 4, 5 |
0 |
P | No two heaps alike |
0, 2, 4, 6 |
0 |
P | No two heaps alike |
0, 2, 5, 7 |
0 |
P | No two heaps alike |
0, 3 |
∗2 |
N | No two heaps alike |
0, 3, 4 |
0 |
P | No two heaps alike |
0, 6 |
∗5 |
N | No two heaps alike |
1, 3, 5 |
0 |
P | No two heaps alike |
1, 3, 6 |
∗7 |
N | No two heaps alike |
1, 4 |
∗4 |
N | No two heaps alike |
1, 4, 6 |
0 |
P | No two heaps alike |
2, 3 |
0 |
P | No two heaps alike |
2, 3, 8, 9 |
0 |
P | No two heaps alike |
2, 4, 5 |
0 |
P | No two heaps alike |
2, 5 |
∗6 |
N | No two heaps alike |
3, 7 |
∗3 |
N | No two heaps alike |
4, 5 |
0 |
P | No two heaps alike |
6, 7 |
0 |
P | No two heaps alike |
Where it is called
Changing this generator changes every one of these figures.
No two heaps alike
Welter's game is Nim with one extra clause — no two heaps may be the same size — and the clause is fatal to the nim-sum, which gives the right answer in none of the 120 three-coin positions. What replaces it is a function of pairs: ⟨a | b⟩ = (a ⊕ b) − 1, exact on all 55 two-coin positions, and nim-added over every pair it is exact on the whole board provided the number of coins is even.
The pairing the formula hides
Welter's closed form sums a function over every pair of coins and needs an extra term when the count is odd, which the rung below called a surprise. Read as a matching it is not: an odd number of coins cannot be paired, the left-over coin contributes its own square, and some matching gives the value on every position measured.
The whole library · The position index · The figures that play back