AWM
← All games‹ tn36tu93 ›

tr87

Turn glyph shapes in the answer bar; the level clears when it matches the question text rewritten by the legend.

6 levels · 7 rules · all levels replayed in Lean

Replay

The certified run that cleared every level, one action at a time. Beside each step: the rules of the model that explain it; they are also marked in the rule list below.

tr87, first frame of the certified run

Explained by

Press Play or step to load the run. Keys, while the player is on screen: ← → step, Space play / pause. A click is circled; cells that changed are outlined.

How it plays

On the screen there are a line of question text, a legend book and an answer bar. Each rule in the legend is a pair of glyph strings: the key string on the left is replaced by the value string on the right. Rewrite the question text segment by segment according to the legend, sometimes following the colour chain through several rounds, until it is rewritten into the colour of the answer bar and exactly fills the answer bar; what is obtained is the answer. The left and right keys move the focus (the string boxed by the corner markers) to the next string or the previous string; the up and down keys turn the shape of every glyph in the focus string forward or backward by one step along a ring of seven. When the answer bar equals the answer shape cell by cell, the level is cleared; only the shape is looked at, not the orientation. In some levels the focus rests on the legend, and what must be rewritten is the legend itself. The counter bar at the very bottom eats up one cell every few steps.

tr87, first frame of the certified run
Start
tr87, last frame of the certified run
After the winning move

Model

The final model: 6 object types and 7 rules. Each rule is a Python check against every recorded step; 4 of them are translated into Lean (the paper's per-game table). Code under a rule is the file of the same name in the agent's Lean project.

Object types

Rules

Code is shown with comments and the agent's notes removed; the files as written are in the archive under Check it yourself.

Proof

For every level, Lean starts from the level's first screen, applies the model's rules to the certified actions, and checks that every computed state agrees with the recorded frame on the components the model represents, and that the last one wins. Each theorem is closed by the Lean kernel and is a statement about the learned model.

Every level can be won

theorem L0_winnable : Winnable (L0_start : World) := …
theorem L1_winnable : Winnable (L1_start : World) := …
theorem L2_winnable : Winnable (L2_start : World) := …
theorem L3_winnable : Winnable (L3_start : World) := …
theorem L4_winnable : Winnable (L4_start : World) := …
theorem L5_winnable : Winnable (L5_start : World) := …

What cannot be won under the model

theorem noTarget_no_win : ∀ (w : World) (a : Act), NoTarget w → step w a ≠ .won := …
theorem unsolvable_noTarget (w : World) (h : NoTarget w) : Unsolvable w := …
theorem famLock_no_win : ∀ (w : World) (a : Act), FamLock w → step w a ≠ .won := …
theorem unsolvable_famLock (w : World) (h : FamLock w) : Unsolvable w := …
theorem scene1_unsolvable : Unsolvable (scene1 : World) := …
theorem scene2_unsolvable : Unsolvable (scene2 : World) := …

Statements only; the proofs and the full Lean project are in the archive, with the steps to re-run them, under Check it yourself.

Check it yourself

Everything on this page comes from files you can download and check. The archive holds the agent's files: the recorded run, the concept book, the concept sources, the Lean project and the sealed model file, plus the record of our kernel check.

Download tr87.zip 0.2 MB · 39 files

Re-run the proof

Before you start: our run of this check took 38 s and 2.0 GB of memory at its peak (2026-10-24).

  1. Download tr87.zip and unpack it. The model and its theorems are in archive/tr87-20260907/formal/Game.lean. Before changing it, check that its SHA-256 is
    efc52d00cdb8da9c10377b6a6324a28313cabac3cce5f914719812c13cebcfc1
  2. Install Lean with elan, then the version named in the archive's lean-toolchain:
    elan toolchain install leanprover/lean4:v4.34.0
  3. Copy the model file to Check.lean and append these two lines to the copy:
    #print axioms consistent
    #print axioms faithful
  4. In the folder that holds Check.lean, run:
    lean +leanprover/lean4:v4.34.0 -M60000 Check.lean
  5. Lean should finish without errors and print:
    GUARD_HITS cursor_lr=69,cursor_shape=421,focus_move=115,glyph_local=306,only_focus=422,shape_step=306,budget_bar=421,win_rule=262,win_prev=262
    'consistent' depends on axioms: [propext]
    'faithful' depends on axioms: [propext]
    The first line is printed by the file itself: for each rule, how many recorded transitions meet its condition.

What a pass establishes

consistent: for every recorded transition, as read by the agent's parser and with duplicates removed, every rule whose condition holds also has its effect hold. faithful: the certified run, recomputed step by step from the first screen of each level, matches the record and ends in a win. Axioms used: propext, all among Lean's standard ones.

What it does not establish: that the parser reads the screens correctly (that step runs in Python, outside Lean), or that a rule whose condition never occurs in the record is right. The Python file that produced the readings inside the model file is in the archive at meta/repair-20260928/lib/tr87-20260907/_lib.py.