Concept

Game tree — where it appears

Every line of play from a position, drawn as a tree rather than as the graph of distinct positions it collapses to. Its size is exponentially larger than the graph, which is why nothing here is computed without merging repeats.

Named by 12 essays across 4 fields — each of them below, with the objects they name alongside it.

One node per route, one node per position. For each board, the number of nodes in the recursion tree a solver with no memo table would walk, beside the number of distinct positions that tree contains, beside the longest run of moves in it. The first number is the cost of forgetting; the second is the size of the table that avoids it; the third is the stack, and it stays small however the other two grow.

A position reached eleven ways is one position

A 4×4 Domineering board has 5,700 positions in it and 6,257,129 routes through them. Three heaps of 7, 11 and 13 have 480 positions and 7.6 × 10¹⁶ routes. The gap between those two numbers is not an optimisation — it is the difference between a search that finishes and one that does not.

complexity · Search
Knowing who wins, and knowing what it is worth. Nine positions, each evaluated twice by an instrumented evaluator that starts with an empty cache. The third column counts what deciding the winner costs and the fourth counts what the canonical form costs, in the currency each question is actually paid in.

Knowing who wins, and knowing what it is worth

Deciding a winner expands positions. Computing a canonical form expands pairs of positions, because a comparison unfolds as a recursion over one subposition of each and the reduction makes many comparisons. Measured on the same nine positions by an evaluator that starts empty every time, the second costs between 1.3 and 279 times the first, and the ratio grows with the tree.

complexity · Value cost
What a value costs to write down. Every one of the 1,474 values born by day three, grouped by the width of its canonical form, with the number of symbols the form takes when it is written out. Each count was obtained by walking the canonical form and counting its nodes, so a subposition appearing twice is counted twice — which is what writing it out does. The widest values of the day are not the longest to write.

What a value costs to write down

The canonical form is the smallest form of its value, and it is smallest in the one currency the reduction happens to spend: options. Counted in symbols it is nothing of the kind — the widest value born by day three is not the longest, the longest has six options rather than seven, and every canonical form on the day except the seven integers writes some position out twice.

values · Reversibility
What a day of canonical forms costs, written out and written once. Three costs for the values born by each of the first three days: every node written every time it occurs, every distinct subposition of a single form, and every distinct subposition of any form of the day. The last is one node per value, and the gap between the first and the last widens as the construction goes on.

The same position, written once

Writing out the canonical forms of day three takes 24,940 nodes. Naming each distinct subposition once inside each form takes 10,102, and naming each distinct subposition once across the whole day takes exactly 1,474 — one per value, because nothing appears inside a canonical form that is not itself a value of the day.

values · Reversibility
When counting the free squares gets Push right. Every Push strip of at most seven squares, split by whether any line of play can bring two coins of opposite colour together. Where none can, the count of free squares in front of each coin is the value, without exception; where one can, the count is right more often than not.

The reading that survives too much

Counting the empty squares in front of each coin gets a Push position right half the time, and the rung below said the failures were exactly the positions with two coins of opposite colour side by side. Sixty-six of the 1,072 failures have no such pair, the smallest is five squares long, and the condition that does decide it is not about the board at all — it is about every position the board can reach.

positions · Push
One number per heap, and one number per state. Sums of Fibonacci Nim components solved in full, against two predictions. Giving each component the number its heap size suggests gets a quarter of the pairs wrong; giving it the Grundy value of its state — the pair of heap size and cap — gets every pair and every triple right.

What restores the theorem

Fibonacci Nim breaks the recipe every impartial game is supposed to obey: one number per heap, exclusive-ored, gets a quarter of two-heap sums wrong. Index the recursion on the pair of heap size and cap instead and the recipe is exact on every pair and every triple — and the number a heap of nine carries turns out to be five rather than one.

limits · Memory
Three questions about the same board. For each sum of two positions: the cost of deciding who wins each part alone, of deciding who wins the whole sum by search, and of computing what each part is worth. The middle question is in the middle on seven of the eight, and the exception is the sum whose two parts are identical.

The question in the middle

Between knowing who wins each part and knowing what each part is worth sits the question a player actually has: who wins the board. Priced on sums of two it lands between the other two on seven of eight, cheaper than the values by up to eight times. On sums of three, with nothing repeated, it is dearer than the values on five of six — because a component multiplies a search and only adds to a value.

complexity · Value cost
How much of the board a who-wins search walks. Positions a memoised who-wins search of 4 × 5 Domineering expands under six move orderings, drawn to scale against the 48,670 positions the board has. Leaving the opponent fewest replies expands 1,125; trying losing moves first expands 30,202; all six find the same winner.

The order a solver tries the moves in

A memoised search asking who wins 4 × 5 Domineering expands 1,125 positions when it tries first the move that leaves the opponent fewest replies, and 30,202 when it tries losing moves first — the same answer at twenty-seven times the price. The ordering that already knows which moves win is not the cheapest. A win needs one move and a loss needs all of them, so the price of an order is paid one level down, in the replies it leaves.

complexity · Search
Right, wrong, and right again. A 4 × 5 Domineering position with Right to move, which Right loses, beside what a search cut at each depth from 0 to 9 says about it when it guesses that the player with more placements wins. The guess alone is right, a search one move deeper is wrong, and every deeper search is right.

A verdict that changes with the depth

A who-wins search of 4 × 5 Domineering cut at a fixed depth, guessing that the player with more placements wins where it stops, is right about 72.5 per cent of positions at depth 0 and about every one of them by depth 7. On the way, 4,697 positions are right at one depth and wrong at a deeper one. With a guess that knows nothing, going one move deeper makes the search worse — and its errors alternate in kind with the parity of the depth, so that half its verdicts are proofs.

complexity · Search
How many turns are choices. Every position of each game with both sides to move, classified by whether the turn is a choice at all: no move, exactly one move, several moves that all lead to the same verdict, and several that do not. Only the last is a turn at which the alternation is doing any work.

Eleven moves and one decision

A prefix has one quantifier a turn, so a game of eleven moves is eleven alternations. Counted on the boards themselves, a Toads and Frogs strip of eleven moves has twenty-six turns with exactly one move available and one turn anywhere at which the choice changes the answer; a Clobber board has a hundred and fourteen turns and none. Nim, the game everybody calls solved, decides at four turns in five.

complexity · Alternation
A win is proved by one move and a loss by all of them. The smallest proof of each position's verdict, averaged by verdict. At a node the mover wins the proof takes the cheapest single option; at a node the mover loses it has to answer every option, which is the existential and universal quantifiers of the prefix showing up as two different objects.

Proving a loss means answering everything

A win is established by one move and a loss by every move, so the two verdicts are certified by objects of different shapes. Measured over every position of four games, a loss costs between 1.07 and 2.31 times a win — a small constant, never an exponential. The obvious explanation is the branching and it is wrong: Nim answers six options at a losing turn and pays 2.18, not six.

complexity · Alternation
A turn is not a bit. The number of turns a game lasts, beside the number of quantified bits those turns amount to. Each ply is measured over the positions actually reachable at it rather than along one line, and the bits are the logarithm of the branching, which is what a quantifier prefix would need one of.

A turn is not a bit

The prefix a game is read as gives each player one quantifier a turn, and a turn on a board is a choice among however many moves there are. Nim on heaps of 3, 4 and 5 lasts twelve moves and carries 23.6 bits of choice; a Toads and Frogs strip lasts eleven and carries two. Corrected for that, the model predicts a strategy 539 times too large on one board and 67 times too small on another, and the two failures have different causes.

complexity · Alternation

Named alongside it

The objects these essays reach for when they reach for this one.

Exhaustive searchMemoisationCanonical formComplexityDomineeringPosition graphTranspositionOutcome classSearch costAlternationDecompositionEnumeration

All concepts