# MIDDEN

> Decide in advance not when a board may break, but where: confine every mismatch to a chosen shape of cells, and search for the best shape.

- Canonical page (with interactive figures/demos): https://eternity2.dev/research/lab/experiments/raphael-anjou/pipelines/midden/
- Updated: 2026-07-21
- Topics: local-search
- Source: Piece theft (this project): the spatial view of where boards fail that MIDDEN gates against — https://github.com/raphael-anjou/eternity2/blob/main/web/content/research/why/piece-theft.mdx

---
Most break-allowing solvers control when a mismatch is permitted: at certain
depths, past a certain fill. MIDDEN controls where instead. It fixes a mask, a
chosen set of cells, and rules that mismatches may only be paid inside it;
everywhere else must match perfectly. Then it searches over the shape of that
mask. Existing methods say when to take damage; this experiment asks where
damage should live.

## How it works

Pick a mask: a couple of rows, a couple of columns, a scattered lattice of
cells, or a set chosen by color. Run the search forcing perfect matches
outside the mask and allowing mismatches only inside it. Different mask shapes
lead the search into different parts of the space, so the mask becomes a
design knob rather than a fixed rule.

Comparing shapes shows which geometry of allowed damage lets a board grow a
long perfect run before it has to spend a mismatch.

> **[Figure]** Interactive: the damage-geometry break masks — interactive: MaskShapeDiagram. Rendered on the canonical page (link above); not shown in this markdown export.

## The result

A dispersed lattice of allowed-damage cells extends the longest perfect run
markedly further than concentrating the damage in a row or two, pushing the
perfect wall from around 150 cells to the 170s. The mechanism is clear; what
stays open is the economics: turning a longer perfect run into a higher final
score once the endgame has to absorb the deferred damage.

So the mask is a real lever, the spatial complement to the usual timing
controls, with a measured effect on how far a board stays perfect, but not
yet a finished route to a record.

## Method

Every other break-tolerant search gates damage by *when*, a depth, a fill
fraction. MIDDEN gates by *where*. It is the first cell-set (WHERE) damage
control against everyone else's depth (WHEN) gates.

- **The mask.** A chosen set of cells (a 256-bit mask) is passed as
  `--break-cells`. Inside the mask, mismatches are allowed; everywhere else must
  match perfectly. The search is otherwise a standard break-tolerant DFS off a
  fixed frame.
- **The sweep.** Mask *shape* becomes the design variable: a couple of rows, a
  couple of columns, a dispersed lattice, or a colour-chosen set, swept over
  shapes and densities, each 300 s × 8 seeds.

The measured result is a graded-density design rule: a **dispersed lattice** of
allowed-damage cells extends the longest perfect run from ~153 cells to
167–174 (**+21**), far more than concentrating the damage into a row or two.
The mechanism is clear; the open economics is the endgame, a longer perfect
run only helps if the tail can absorb the deferred damage, and the dispersed
mask that maximizes the wall does not by itself seal the finish. The natural
next step (composing a dispersed body-mask with an open tail) is exactly what
the MIDDEN-v2 sweep set out to test.

## Reproduce

Seeded off a fixed frame; the wall-extension effect reproduces across masks,
though the exact board depends on seeds, and the committed 452 board is
checkable in the viewer. Like [CLOISTER](/research/lab/experiments/raphael-anjou/pipelines/cloister)
it needs a pre-solved border frame (plus the break-cell mask, which is a literal
input); a runnable backing directory that ships the frame is planned.

## Open questions

Which mask shapes convert a longer perfect run into actual matched edges at
the end, rather than just deferring the damage? Can spatial masks be combined
with timing controls so a board is gated in both where and when it may break?
And is there a mask that mirrors where the best known boards actually carry
their mismatches?

## Related

- [LADDER](https://eternity2.dev/research/lab/experiments/raphael-anjou/pipelines/ladder) — Throw hundreds of cheap short searches at the board, keep only the deepest starts, and promote the survivors through longer and longer rounds.
- [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.
- [CLOISTER](https://eternity2.dev/research/lab/experiments/raphael-anjou/pipelines/cloister) — Fix a perfect border, then search the interior with the border's edges treated as hard constraints from the very first cell.
- [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.
