# PALIMPSEST

> Read every strong board to find the habits that quietly hold a board back, then break them. This experiment produced the project's best board: 463 of 480.

- Canonical page (with interactive figures/demos): https://eternity2.dev/research/lab/experiments/raphael-anjou/learning/palimpsest/
- Updated: 2026-07-21
- Topics: local-search, learning
- Reproduce: `just research-record-boards`
- Source: Ropke & Pisinger 2006, adaptive large-neighbourhood search (the destroy-and-repair frame this steers) — https://doi.org/10.1287/trsc.1050.0135

---
Every experiment in the [study](/research/lab/experiments/raphael-anjou/learning)
so far has trusted agreement between strong boards: where the good boards concur,
follow them. PALIMPSEST is the turn where that trust is examined, and it produced
this project's best board. When many independent searches all reach a high but not
perfect board, they tend to agree on a lot of placements. Some of that agreement
is genuine structure, and some of it is a shared bad habit: a local choice that
looks good and keeps every search stuck just short of the top. The idea behind
this experiment is to read the whole corpus of strong boards, separate the helpful
agreement from the trap, and attack the traps.

## How it works

Take every board anyone has found that scores reasonably well, and for each
pair of neighbouring positions count how often a given pair of pieces sits
there, weighted by how good the board was. Two patterns fall out. Some
adjacencies show up again and again in the very best boards: those are safe,
real structure. Others show up almost everywhere but never in the top boards:
those are the traps, the choices that feel right and cap the score.

The traps cluster in particular regions of the board rather than spreading
evenly. Knowing where they are turns the corpus into a map: which placements
to trust, and which to pull apart and rebuild. Grouping boards by how their
corners are arranged then points the search at the most promising family to
attack.

> **[Figure]** Interactive: the trap map, corner-family by corner-family — interactive: PalimpsestDiagram. 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

Used as a map to steer the search, this reached 463 of 480 matched edges, the
best board this project has produced. For comparison, the community's best on
this puzzle is 470, and a complete solution is 480.

One caveat worth stating: trying to use the trap list directly, by forcing the
search to avoid trapped placements, did not work on its own and tended to
make boards worse. The value was in reading the corpus to choose where to
focus, not in hard-coding its conclusions into the search.

## Method

For the reader who wants the exact procedure. It runs in two passes.

**1. Score-weighted, basin-separated consensus mining.** Over a corpus of
boards scoring 400–480, for every adjacent cell-pair $(i, j, \text{dir})$ and
every piece-pair that ever sits there, compute two frequencies rather than one:

$$
\begin{aligned}
p_\text{high}(\text{pair}) &= \frac{\#\{\text{boards with the pair, score} \ge 460\}}{\#\{\text{boards with score} \ge 460\}} \\[4pt]
p_\text{all}(\text{pair}) &= \frac{\#\{\text{boards with the pair}\}}{\#\{\text{all boards}\}}
\end{aligned}
$$

together with a *ceiling*: the maximum score of any board containing that pair.
The ceiling, not $p_\text{high}$, is what separates the two categories.
**Good consensus** is high $p_\text{all}$ with a ceiling that reaches the top
family, boards at or within a point of this project's best (463): patterns the
strongest boards keep, so trustworthy structure. **Consensus traps** are high
$p_\text{all}$ with a ceiling that stalls a couple of points short, no board
carrying the pair breaking past the low-460s: the agreed-upon wrong choice that
locks a whole family below the record. The cut sits between "reaches the top"
and "stalls just below"; on this small corpus (a 463 ceiling, boards clustered
from the high 450s to low 460s) it is set by hand rather than swept, and
$p_\text{high}$ (score $\ge$ 460) is reported alongside but is not the
discriminant. The single-frequency view (persistence alone) cannot tell these
apart; splitting by ceiling is the whole trick.

**2. Trap-destroy ALNS.** Take a 461 board (it lives *inside* the trap basin
by construction), locate the ~50 highest-ranked trap pairs it contains, and
find the wedge: the position whose removal breaks the most trap pairs while
preserving the good-consensus ones. Then perturb those trap cells, swap them
to non-trap pieces, introducing 4–8 deliberate mismatches, and feed the board
back to [adaptive large-neighbourhood search](/research/build/local-search/local-search-alns).
ALNS's worst-band destroy operator preferentially tears open exactly those
intentionally-broken regions and rebuilds them. Run: 30 minutes × 6 seeds.

The complexity is unremarkable: the mining pass is linear in the corpus size,
and the real cost is the ALNS search it steers. The contribution is *where* it
aims that search, not a new search.

## Reproduce

The verifier `just research-record-boards` recomputes the matched-edge score of
the committed 463 board from its raw Bucas edges and checks it equals the
claim, so the board is reproducible and checkable byte-for-byte in the viewer.
The search that *found* it is a stochastic run of the shared ALNS
engine (30 min × 6
seeds), steered by the trap map described above. It will not reproduce the same
board, which is why the artifact of record is the board, not a re-run. The
steering is read from a corpus of strong boards, so the run is not reproduced
from scratch here.

## Open questions

Why does rebuilding the trapped regions tend to land back on the same known
top board rather than a genuinely new one? Would a separate map per corner
family reveal structure that the combined map hides? And could a gentle
penalty for trapped placements help where a hard ban hurt?

## Related

- [Anti-pattern mining](https://eternity2.dev/research/build/learning/anti-pattern-mining) — The subtle idea in learning from strong boards: not every agreement between them is good. Some shared placements are real structure; some are a shared trap that caps every search just short of the top. Separate the two, and attack the trap.
- [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.
- [The rigidity wall](https://eternity2.dev/research/why/rigidity-wall) — Every record board we have is frozen in place. You cannot nudge your way from a great board to a perfect one, and we can prove it.
- [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.
- [Local search and ALNS](https://eternity2.dev/research/build/local-search/local-search-alns) — Destroy part of a board, rebuild it better, and let the algorithm learn which demolitions pay. Adaptive large-neighborhood search is the most reliable polisher this project has, and the cleanest demonstration of the wall where polishing ends.
