Concepts

N-tuple evaluation

An n-tuple network is the cheapest learnable evaluation for a board. Pick a set of tuples, each a short list of squares; for each tuple, look up the combination of what stands on those squares in a table and add the weight. The value of a position is a sum of a few hundred table lookups, which costs about as much as generating the legal moves. Lucas introduced the idea for Othello and it carries over to any grid game with a small per-square alphabet.

Weight table for one tupleown 6 · empty · hidden · empty · own 2 · empty+0.31own 6 · hidden(moved) · hidden · empty · own 2 · empty-0.08empty · empty · blue 10 · empty · own 2 · empty-0.74own B · own F · empty · own 3 · empty · empty+0.52......value(s) = Σ over tuples of w[tuple][pattern(s)]4 classes per square, 6 squares: 4,096 entries per table.Symmetric tuples share tables under the left-right mirror.Update: w += α (r + γ v(s') - v(s)) along the afterstate.
Three tuples of squares index three weight tables, and the position's value is the sum of the looked-up weights.

The alphabet on a square

From one player's view a square is empty, a lake, an own piece of a known type, a revealed opponent piece of a known type, or a hidden opponent piece that has or has not moved. Collapsing own and revealed types into rank classes (immovable, weak, middle, strong, the two special pieces) keeps the alphabet near a dozen symbols, so a tuple of six squares indexes a table of a few million entries. Tuples are placed on straight lines, small squares and the two lake mouths, and mirrored left to right; Blue's view is rotated so the same tables serve both sides.

Learning by temporal difference

The tables are trained by TD(λ) self-play: play a game between two copies of the evaluator with a small exploration rate, and after each move nudge the weights of the tuples present in the position toward the value of the next position, with the final result as the last target. The Settlers project trained its leaf tables the same way and they became its baseline, which is the precedent for putting this rung between hand-written search and neural networks.

Afterstates

The n-tuple player evaluates positions after its own move, before the opponent replies, so one evaluation per legal move ranks the moves without any search. Attacks on hidden pieces are the exception: the afterstate is not known until the battle resolves. The player scores such a move by the belief-weighted average of the afterstates over the possible defender types, using the same counting prior as the greedy player, so the tables learn a value for "a piece of mine stands here having just won a battle" rather than for a specific hidden outcome. This is the same expectation the expectimax leaf computes at its chance nodes, which is why the tables drop into the search unchanged.

Why bother before transformers

Two reasons. First, the tables are a strong, fast leaf for the expectimax search, so the search rung gets a second registered comparison: same search, learned leaf against hand-written leaf. Second, the n-tuple player is a cheap sanity check on the whole self-play machinery, from the environment bindings to the arena, before the expensive runs start. If TD self-play cannot learn to beat greedy here, the problem is in the pipeline, not the model.

The n-tuple rung has a decision rule on its approach page and no registration yet.