Case study
No Rulebook, No Tells
The studio never gave us their rules. We reverse-engineered them from 100 shipped levels, built an agent on the guesses, and asked their own level designer to pick the machine’s work out of a lineup. He caught 14 of 20 — and still called the levels nearly impossible to tell apart from human work. Five days and three physics models later his detection rate was no better than guessing, and the agent was shipping at 90% acceptance.
A studio shared 100 production levels from a live puzzle game and posed a challenge: could an AI agent design levels good enough to sit, unnoticed, inside their campaign? The evaluation was fixed before any code existed — a blind test. We would generate 20 levels, shuffle them with 20 real ones, and the studio's designer would mark the ones he believed were machine-made. Success meant his picks were no better than chance.
That framing did most of the work. When your acceptance test is a human expert trying to catch you, every engineering decision bends toward one question: what can he see that we can't measure yet?
What we did not get was a rule book. No design document, no style guide, no list of what makes a level shippable, no explanation of the mechanics beyond what a player would see. The studio hands its designers years of accumulated taste; we were handed a folder of levels and a deadline. Every rule in this post — orientation, device budgets, corpus bands, the house rule about layered containers — is something we had to infer from the files or lose a round to.
We were shooting blind, and the first shot landed closer than anyone expected.
What a level is — and what makes one good
The puzzle is a drag-and-collect design. Colored polyomino containers sit in a grid; same-colored tokens are scattered around them. The player drags a container; tokens it reaches board it; a full container clears. The studio layers devices on top: spawners streaming queued tokens in from an edge, hidden second layers that double a container's capacity after it first fills, locks, obstacles, and axis constraints. A good level is not a hard level — it is a shaped one:
Anatomy of a good level
- 1Fast opening. Two blue tokens sit one drag from the blue container — the player scores in the first seconds. The studio never opens cold.
- 2One far route. The red container's second token is across the board. One or two long collection routes carry the difficulty; the rest stay near.
- 3Budgeted devices. One hidden layer (the "4" badge doubles a 2-cell container) and one spawner. The studio caps device types at three per level.
- ·Portrait, balanced, imperfect. Taller than wide, weight spread across the grid, and never mirror-symmetric — "neat but noticeably human."
Deconstructing the studio's hand
Before generating anything we built the measurement stack. The 100-level corpus was reverse-engineered file-by-file (eight schema generations; an exact per-color conservation invariant holding in 100 of 100 levels), and the game's dynamics were settled by frame-stepping gameplay footage — queue order, lock semantics, and movement rules came from pixels, not from asking the studio.
The key artifact is the positional corpus window. Every level reduces to ~20 measurable features, and a level destined for campaign slot N is compared against the band of real levels near slot N — because the studio's hand changes across the campaign: boards grow, headroom shrinks, devices accumulate. A candidate must sit inside the band on every admitted feature:
One candidate level vs the corpus window for its slot
Around that critic sits the rest of the pipeline: a simulator and beam-search solver as the solvability oracle, a deterministic construction kit (place, connect, populate, assign), and the agent — an LLM driving 14 tools in a loop: study the slot's window, compose, populate, critique, fix, certify, save. Five golden eval tasks gated every change to any layer.
The pipeline
On paper the baseline was flawless: 20 generated levels, every one certified solvable, every one inside its corpus windows, five of five evals green. We shipped the first blind pack with some confidence.
Round 1: caught in twenty minutes, and praised anyway
Two things happened in that first round, and only one of them was a failure. The designer scored 14 of 20 (p = 0.013 against chance) — and he barely looked at the compositions. One distributional giveaway carried the score: board orientation. The studio had never shipped a landscape level. We had shipped seven, because nothing in a per-level check makes "taller than wide" matter.
The round-1 failure, side by side
Board orientation — the round-1 fingerprint
The other thing that happened is easy to miss under a losing score. Asked what he thought of the levels themselves — the ones he had just sorted — he said:
“If it weren’t for the obvious mistakes, it is nearly impossible to distinguish this from a level designed by a human.”
— the studio’s level designer, round 1
That is a strange sentence to receive on the round you lose 14–6, and it set the whole project’s direction. The compositions were already at human standard; what gave them away were obvious mistakes — a landscape board, a device rate nobody would ship. Those are enumerable. We were not being asked to teach an agent taste from scratch, only to close a list of tells, which is a far more tractable job than it looked like at 14 of 20.
A second lesson from the same round: expert feedback must be verified before it's encoded. Of the tells the designer claimed, one was real (orientation), one was demonstrably false (we disproved his stated movement-constraint rule three separate ways against his own levels), and one flaw he circled with confidence was in one of the studio's own levels. Reviewers pattern-match too.
Round 2: the physics was a hypothesis, and it was wrong twice
The next round changed format: the designer imported our levels into the live game and played them. He identified all six machine levels, six for six — not by style, but because none of them could be completed. Our rules model, the foundation under the solver's perfect corpus record, was wrong about how collection works. It would be wrong once more before it was right:
Three physics models, two funerals
What does a level that dies to this look like? Here is the shape that killed us, reduced to its essence:
A level that certifies under v2 and is unwinnable under v3
The deeper cost was epistemic. The solver had proven all 100 corpus levels solvable under v1 — a perfect score that was vacuously true, because generous physics make hard layouts easy. Under the true, strictest model the same solver initially cleared only 75 of 94 usable corpus levels; search upgrades bought back 6 more.
Solver coverage of the studio corpus, by rules model
Round 3: reaching chance
With engine-true physics in the certificate, all twenty levels were regenerated. The iteration is visible if you watch a single campaign slot travel through the rounds:
The same campaign slot, three generations
This time the designer hedged. He softly flagged four of six, let two through clean — and confidently accused one real level, whose asymmetry turned out to be the studio's own long-standing mistake. Detection landed at p ≈ 0.12: statistically, guessing.
Designer detection across rounds
In the review call that followed, the designer said of one machine-made level that had fooled him completely:
"It was a good level — it challenged me, its balance was right. Had it been submitted to me, I would have approved it."
The same call surfaced knowledge that exists only in the designer's head: unwritten house rules. The most valuable one bans reusing a hidden-layer container's colors anywhere else on the board — the studio's own fix for a dead-end state that had once burned them:
The dead-end the house rule prevents
Round over round, each failure hardened into a permanent, corpus-calibrated check. The critic that started as statistical bands ended as a codified house style:
Hard checks in the critique gate, cumulative
The regression that taught us the most
Then a quality regression appeared from an unexpected direction. Swapping in a newer base model produced a set that certified beautifully — and used zero optional devices. No hidden layers, no obstacles, twelve open airy boards. Our own earlier sets had the opposite fingerprint (a device in nearly every level). Either way the set-level distribution was drifting from the studio's, and the designer had already shown he notices sets, not levels.
Hidden-layer usage rate, by set
The obvious hypothesis — the new model is just timid — died in a controlled A/B. We reran the identical 12 slots with the previous model, the one that had historically used devices at the studio's rate, under the current codebase. It did not restore the mechanics. It collapsed: a third of the slots saved, every failure citing the same cause, and its few survivors just as bare.
Save rate, same 12 slots, same code
The real mechanism was survivorship bias through our own acceptance gate. The solvability certificate is a semi-decision procedure: when the beam search fails we treat the level as unsolvable, but it may just be beyond the search. And the levels beyond the search are precisely the dense, device-heavy, corpus-typical ones — 13 of the studio's own 94 levels resist our solver. So every generation loop, regardless of model, learned the same lesson: plain and spacious certifies, ambitious gets rejected. The generator had quietly inherited the verifier's blind spots. Even the designer had sensed it, remarking that the output felt flat — he was reading the solver's fingerprint, not the model's.
We measured the cheap fixes honestly before believing them. Widening the search before rejecting recovered just 1 of 14 solver-resistant corpus levels — width was not the constraint. Requiring devices in the briefs got models to finally attempt them, and promptly halved the save rate, because device-bearing boards are exactly what the gate can't certify. (It also exposed a self-inflicted bug: a brief that required a device on a campaign slot where the studio hadn't introduced that device yet — an impossible instruction the agent rightly refused.)
The forward path inverts the problem: generate the proof, not the candidate. Instead of scattering tokens and then searching for a solution, populate the board by playing backwards from the solved state — every level then carries a solution witness by construction, certification becomes replay instead of search, and yield decouples from solver strength entirely. As a bonus, the witness length becomes a difficulty dial, which is the studio's next ask.
Blind start, shipped agent
What transferred
- Put the ground truth outside the code. The blind test with a human expert found every failure our internal metrics missed — and defined "done" unambiguously.
- Treat rules as hypotheses. Three physics models, two killed by evidence. A validator resting on unfalsified assumptions doesn't validate; it flatters.
- Distributions are the tell, not instances. Every detection round was won or lost on set-level statistics — orientation, device rates — that no per-level check can see.
- Verify the expert. Encode feedback only after it survives contact with the data: of the designer's claims, some were gold, one was false, and one accused his own studio's level.
- Your acceptance gate shapes your generator. Any learned or searching producer will drift toward what the verifier rewards. If the verifier is weak somewhere, output will be systematically biased away from that somewhere — and the bias will look like a model problem until you A/B the environment.
- When verification is the bottleneck, generate certificates. Constructing levels backwards from the solved state makes every output provably solvable and turns the hardest check into a replay.