AWM
← All games‹ g50tlf52 ›

ka59

Select shelled blocks and push blocks around until every block fits exactly into a frame.

7 levels · 11 rules · all levels replayed in Lean

Replay

The certified run that cleared every level, one action at a time.

ka59, first frame of the certified run

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 field there are shelled blocks, yellow cross blocks without a shell, frames, walls, purple bands and door bands. Click a shelled block and control switches to it. A direction key makes it walk that way: if the cell ahead is empty it moves one cell, and if ahead is a wall or a purple band it does not move; when ahead it is adjacent to another block or door band, it does not move itself but pushes the adjacent thing out a fixed distance, stopping on hitting a wall, and continuing to slide if it stops on a band, until it leaves the band. Cross blocks cannot be clicked and can only be pushed. A door band grows one layer with each direction-key press, and when it reaches one layer short of full it resets to zero, and on the beat of the reset it sweeps the block directly in front of it out in the direction it grows. When every block fits exactly into one frame, the level is cleared. The budget bar at the bottom shortens bit by bit with the number of actions, and running it empty is judged a loss.

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

Model

The final model: 9 object types and 11 rules. Each rule is a Python check against every recorded step; 10 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 real_winnable : Winnable L0_startWorld := …
theorem L0_winnable : Winnable L0_startWorld := …
theorem L1_winnable : Winnable L1_startWorld := …
theorem L2_winnable : Winnable L2_startWorld := …
theorem L3_winnable : Winnable L3_startWorld := …
theorem L4_winnable : Winnable L4_startWorld := …
theorem L5_winnable : Winnable L5_startWorld := …
theorem L6_winnable : Winnable L6_startWorld := …

What cannot be won under the model

theorem key_no_win (b : Board) : ∀ s a, Key b s → step b s a ≠ .won := …
theorem unsolvable_by_count (b : Board) (s : St) (h : Key b s) : Unsolvable ((b, s) : World) := …
theorem drop_unsolvable : Unsolvable dropWorld := …

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 ka59.zip 1.2 MB · 78 files

Re-run the proof

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

  1. Download ka59.zip and unpack it. The model and its theorems are in archive/ka59-20260917/formal/Game.lean. Before changing it, check that its SHA-256 is
    a2016b3b6dc4f0672cbb5441652da9584f0299687bef886a20f9724bccf48b11
  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 core_step=1219,push_kick=98,push_shove=98,bare_pushed=528,gate_pushed=12,gate_tick=496,gate_end=496,gate_strike=12,gate_idle_strike=2,contact_face=1742,click_selects=360,level_solved=1701,budget_tick=1664
    '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/ka59-20260917/_lib.py.