AWM
← All games‹ bp35cn04 ›

cd82

Turn a cup around a container and pour colours until the container matches the target picture.

6 levels · 11 rules · all levels replayed in Lean

Replay

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

cd82, 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

The small picture at the top left is the target, and the square container in the middle is to be painted to look like it. At the top right is the palette; click a block and the cup changes to that colour. The large cup turns around the container among eight positions; a direction key makes it turn one cell toward the side pressed, with the cup mouth always facing the container; when the direction pressed is not suitable, this key does nothing. Press "pour", and the container is cut into two halves by a line through the centre perpendicular to the direction of the cup mouth, and the half nearer the cup is painted whole in the colour in the cup; a later pour covers an earlier one. Shapes that one cut cannot produce are left to the small cup: the small cup appears only when the large cup is exactly east, south, west or north; click its grey edge, and a strip of colour is laid over the container's edge nearest to it. When the container equals the target picture cell by cell, the level is cleared. The budget bar at the very bottom shortens bit by bit with the steps, and when it shrinks to the end the game is over; colours not on the palette cannot be painted.

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

Model

The final model: 7 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 color_control_winnable : Winnable L2_board L2_start := …
theorem pair_control_winnable : Winnable L3_board L3_start := …
theorem color_not_winnable : ¬ Winnable colorBoard L2_start := …
theorem pair_not_winnable : ¬ Winnable pairBoard L3_start := …
theorem L0_winnable : Winnable L0_board L0_start := …
theorem L1_winnable : Winnable L1_board L1_start := …
theorem L2_winnable : Winnable L2_board L2_start := …
theorem L3_winnable : Winnable L3_board L3_start := …
theorem L4_winnable : Winnable L4_board L4_start := …
theorem L5_winnable : Winnable L5_board L5_start := …

What cannot be won under the model

theorem colorKey_no_win (b : Board) (hp : ColorPremise b) :
    ∀ s a, legal a = true → ColorKey b s → step b s a ≠ .won := …
theorem unsolvable_by_color (b : Board) (s : St) (hp : ColorPremise b) (h : ColorKey b s) :
    Unsolvable b s := …
theorem color_unsolvable : Unsolvable colorBoard L2_start := …
theorem pairKey_no_win (b : Board) (hp : PairPremise b) :
    ∀ s a, legal a = true → PairKey s → step b s a ≠ .won := …
theorem unsolvable_by_pair (b : Board) (s : St) (hp : PairPremise b) (h : PairKey s) :
    Unsolvable b s := …
theorem pair_unsolvable : Unsolvable pairBoard L3_start := …

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 cd82.zip 1.1 MB · 69 files

Re-run the proof

Before you start: our run of this check took 81 s and 3.8 GB of memory at its peak (2026-10-23).

  1. Download cd82.zip and unpack it. The model and its theorems are in archive/cd82-20260912/formal/Game.lean. Before changing it, check that its SHA-256 is
    35d730265f95fe57097b92d69099e36f9e7b91eed824c0ecd28300fc13c01983
  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:
    'consistent' depends on axioms: [propext]
    'faithful' depends on axioms: [propext]

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/cd82-20260912/_lib.py.