a triangle on a stalk, worth ∗2
A Hackenbush position in which every edge is green, so either player may cut any of them and the position is impartial. Its value is a single Nim heap. Two principles find which one: fusion, which collapses every cycle to a point and leaves that many loops behind, and the colon principle, which replaces a branch by a stalk as long as the branch's own value.
6 essays call
green-graph. 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
7 distinct positions, harvested by running this generator again at the options each essay passed it.
| Position | Worth | Outcome | Drawn in |
|---|---|---|---|
a square with a roof |
∗0 |
P | Squash every loop to a point |
a three-by-three lattice on the ground |
∗0 |
P | Squash every loop to a point · Nim is easy, in binary |
a tree with two branches |
∗4 |
N | Squash every loop to a point · When the nested sum only sees the value |
a triangle on a stalk |
∗2 |
N | A tree is still a number · Squash every loop to a point |
a triangle standing on the ground |
∗1 |
N | Squash every loop to a point |
a triangle with a tail |
∗0 |
P | A green edge on a blue one |
two loops on one stalk |
∗2 |
N | A winning strategy that is a spanning tree |
Where it is called
Changing this generator changes every one of these figures.
A winning strategy that is a spanning tree
The Shannon switching game was sold in a box in 1960 and solved in 1964, and the solution is not an assertion that somebody wins. It is a property of the graph anybody can check, and the strategy falls straight out of it — whichever link the opponent cuts, take its partner in the other tree.
Squash every loop to a point
Colour every Hackenbush edge green and the game becomes impartial, so the whole picture is worth a single Nim heap. Two principles find which one without playing anything — fuse the cycles, then run one pass up the tree — and a nine-vertex lattice that costs 1,283 positions to solve costs twelve steps to read.
Nim is easy, in binary
Three heaps of a thousand counters take thirty bits to write down and three thousand counters to lay out. The nim-sum does three exclusive-ors either way. Whether that counts as fast depends entirely on which of the two numbers the work is compared against.
A green edge on a blue one
Blue over green and green over blue are the same two edges in the other order. One is worth 1∗ and the other ↑∗ — a number with a star on it against something smaller than every positive number — so a stalk with all three colours in it stops being a numeral and starts being a position whose value depends on what is underneath.
When the nested sum only sees the value
The ordinal sum reads the form and not the value: three positions all worth zero, placed under a star, give three different answers. On impartial games it reads the value after all — 72 substitutions of an equal-valued heap from a different game, and every ordinal sum comes back unchanged. That difference is the whole reason a green Hackenbush tree can be collapsed one branch at a time.
A tree is still a number
A Hackenbush string spells its own value in binary. Put a fork in it and the numeral has nothing to read — there is no leftmost anything. The value is still a number, in all 10,066 forests up to six edges; it is still computable, by the ordinal sum, in all 3,238 single-trunk trees; and the reading is right on 762 of them, of which 126 are the strings it was written for.
The whole library · The position index · The figures that play back