# PRIOR

> Build a board from nothing, breaking ties by where pieces tend to sit in the strong boards we already have. It reaches a high score with no starting board to copy.

- Canonical page (with interactive figures/demos): https://eternity2.dev/research/lab/experiments/raphael-anjou/learning/prior/
- Updated: 2026-07-21
- Topics: construction, learning
- Reproduce: `just research-record-boards`
- Source: Beam search (this project's concept page): bounded-width best-first construction — https://github.com/raphael-anjou/eternity2/blob/main/web/content/research/build/construct/beam-search.mdx

---
PRIOR opens the [learning-from-strong-boards study](/research/lab/experiments/raphael-anjou/learning)
with the simplest thing the idea can be: a count. Most strong boards on this site
are found by taking an existing good board and improving it. PRIOR asks a harder
question: can you build a competitive board from an empty grid, with no board to
anchor to? The trick is to let the crowd of past good boards quietly guide the
construction without copying any single one of them, and the guidance is nothing
more than a tally of where pieces tend to sit.

## How it works

From the library of boards scoring well, PRIOR learns one simple thing: for
each position on the board, how often each piece shows up there. That gives a
gentle preference, a prior, for what tends to belong where.

Then it builds with a beam search, keeping many partial boards alive at once
and extending them cell by cell. When two options match the same number of
edges, the prior breaks the tie toward the piece that's more typical of
strong boards in that spot. A diversity rule keeps the many parallel attempts
from collapsing onto the same path. No single board is copied; the guidance
is statistical.

> **[Figure]** Interactive: the position-prior heatmap — interactive: PriorDiagram. Rendered on the canonical page (link above); not shown in this markdown export.

## The board
> **[Interactive: RecordBoard]** Rendered on the canonical page (link above); not shown in this markdown export.
## The result

From scratch, PRIOR reaches the mid-450s, and with a sharper prior built from
only the very best boards it climbs higher. Followed by local refinement it
reaches 460, the board shown here. That a from-nothing build lands this close
to the records is the point: the structure of good boards is partly
learnable, and you don't need to start from one to get there.

It is not the project's top score (463), and the final lift here leans on a
refinement step, which the board's label notes. But as a clean-slate result
it's the strongest the project has, and it's the foundation the later
multi-signal builders grew from.

## Method

The prior is deliberately the simplest thing that could work: a count. Over
every corpus board scoring above a threshold (440 for the base prior), tally a
$256 \times 256$ matrix $M[p][c]$, how many strong boards place piece $p$ in
cell $c$. Normalized per cell, that is the preference used to break ties.

Three sharpenings, each a variant of the same tally:

- **Rotation-aware.** Split each piece by its four rotations: a
  $1024 \times 256$ tensor ($256 \times 4$ rows). The prior now prefers not
  just the right piece but the right orientation, 262,144 entries against the
  base 65,536.
- **Per corner-family.** The strong boards fall into families by their four
  corner pieces. Building a *separate* prior from just one family's boards
  gives a signal the pooled matrix averages away, this is what let the
  from-scratch build reach a fresh 460 rather than the crowded common basin.
- **Sharper threshold.** Rebuilding the prior from only the very best boards
  (a higher cutoff) raises the ceiling of the construction, at the cost of a
  thinner, noisier signal.

Construction is a [beam search](/research/build/construct/beam-search): keep $W$
partial boards, extend cell by cell, and when candidates tie on matched edges
let $M$ break the tie; a diversity rule keeps the $W$ beams apart. The 460 here
takes a from-scratch beam build to the mid-450s, then a short local-refinement
tail to 460.

**Novelty was checked, not assumed.** The resulting board is compared against
every 460-tier board already known by corner-permutation and Hamming distance
on (piece, position); a match only counts as a new basin when the corner
family differs or the Hamming distance is large. PRIOR's board passed that
test, it is a genuinely distinct basin, not a re-discovery.

## Reproduce

`just research-record-boards` verifies the committed 460 board's score exactly,
edge by edge, from its stored Bucas string, so the result is checkable even
though the search that found it is not deterministic (its final lift uses a
stochastic refinement tail). The board is the artifact of record. The search
that produced it is the shared beam
producer, with the
one change this page describes: the learned positional prior that breaks its
ties. That prior is a matrix mined from a large corpus of strong boards, which
is why the run is not reproduced here from scratch.

## Open questions

How sharp can the prior get before it overfits? Built from only a handful of
top boards the signal is strong but thin. Could a separate prior per
board-family capture structure the combined one averages away? And how much
of the final gap is the construction versus the refinement that follows it?

## Related

- [Corpus priors](https://eternity2.dev/research/build/learning/corpus-priors) — The simplest way to learn from strong boards: count where each piece tends to sit, or how often it serves a scarce demand, and use that count as a gentle tiebreak in construction. It has to stay a tiebreak; the moment it becomes part of the objective it collapses the search.
- [Learning from strong boards](https://eternity2.dev/research/lab/experiments/raphael-anjou/learning) — A study in five experiments of one idea: instead of searching Eternity II from first principles, mine the corpus of strong boards already found for structure and feed it back into a search. A position prior, a learned move-vote, a scarce-demand compass, an anti-pattern miner, and a record decode, ordered from the simplest signal to the subtlest, and the one wall all five reach.
- [KEYRING](https://eternity2.dev/research/lab/experiments/raphael-anjou/learning/keyring) — Build a board from scratch, ranking each next piece by three signals learned from past strong boards. Reached 460 in a board family no earlier search had cracked.
- [GAUNTLET](https://eternity2.dev/research/lab/experiments/raphael-anjou/pipelines/gauntlet) — Run the same beam search across nine different scan orders, so it lands in different regions instead of always converging to the same one. The zigzag order found a brand-new 458 board.
- [Piece theft, where solvers die](https://eternity2.dev/research/why/piece-theft) — A solver fills a few rows for free, then hits a wall in the middle of the board. Here's the mechanism: a scarce piece spent in the wrong place, rows ago.
- [Beam search](https://eternity2.dev/research/build/construct/beam-search) — Keep the K most promising partial boards alive at once and grow them cell by cell. Beam search is the workhorse behind this project's from-scratch builders, and a clean illustration of why breadth alone stalls in the deep interior.
