Skip to content

Life-like automaton from RLE with a Klein-bottle grid and a playable animated page

Exact prompt

# Life-like cellular automaton from an RLE file, with a playable page `input.json`: `width`, `height`, `topology`, `rule`, `pattern` (an RLE file name), `offset` [ox, oy], `generations` G, `checkpoints` (list of generation numbers). Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json` must write `answer.json` and `life.html` in the working directory. Fresh inputs are generated. ## RLE grammar (full) 1. Lines whose first non-blank character is `#` are comments. Blank lines are ignored. 2. The first non-comment line is the header `x = m, y = n[, rule = ...]`. Ignore its values; the rule always comes from `input.json`. 3. The remaining lines are concatenated with line breaks removed. Everything after the first `!` is ignored, even if it looks like more pattern. 4. Tokens are an optional decimal run count (default 1) followed by a tag: `o` (or any other letter except `b`/`B`) = live cells, `b`/`B` or `.` = dead cells, `$` = end of row. A count on `$` skips that many rows: `3$` moves down 3 rows and resets x to 0. Missing trailing dead cells in a row are implied. 5. Pattern cell (x, y) is placed at grid cell (x+ox, y+oy). For `torus`/`klein`, wrap that position with modulo width/height. For `bounded`, drop cells that fall outside the grid. ## Rule string 6. `Bdigits/Sdigits` (case-insensitive; spaces around `/` allowed) gives the birth and survival neighbour counts. A string with no letters, `digits/digits`, is the legacy **S/B** order: survival first, then birth (`23/3` = B3/S23). Either digit list may be empty. ## Topology (8-neighbour Moore neighbourhood) 7. `bounded`: cells outside the grid are always dead. `torus`: both axes wrap. `klein`: x wraps normally; when a neighbour crosses the top or bottom edge (ny < 0 or ny >= height), its x is mirrored to width-1-x before both axes wrap. A neighbour position that appears more than once counts more than once. (This happens only on tiny grids, never in the tests.) 8. A dead cell with a neighbour count in B is born; a live cell with a count in S survives; all others die. Updates are simultaneous. ## answer.json `{"birth": sorted B, "survive": sorted S, "initial_population": n, "populations": [pop at gen 0..G], "cells_at": {"<g>": [[x, y], ...] for each checkpoint, sorted by y then x}}` ## life.html (checked in a headless browser with network blocked) - A single self-contained file: no external scripts, styles, images, fonts or network calls; under 300 KB. Embedding the initial cells is fine. - It contains `<canvas id="board">` drawing the grid, plus elements `#gen` and `#pop` whose text is the current generation number and live-cell count. - On load it starts animating at least 4 generations per second. - It exposes `window.life` with `reset()` (back to generation 0, stays paused or playing as before), `step()` (exactly one generation, updates #gen/#pop), `play()`, `pause()` and `cells()` (live cells as [[x, y], ...] sorted by y then x). It must use the same rules, topology and placement as above. ## Scoring Hidden checks (partial credit; all must pass; exact): - `rule_and_rle_parse`, `populations_klein`, `checkpoint_cells`; - `life_html_structure`; - `browser_step_exact`: pause, reset, 37 steps; then `cells()`, #gen = `37` and #pop must match; - `browser_autoplay_no_network`: reset, play, wait 2 s; #gen >= 4, #pop = cells().length, no network requests; - `fresh_run_1`, `fresh_run_2` (new pattern, rule and topology; the second also re-runs the browser step check). 40-second limit per run.

Creative follow-up to batch 11, but the animation is checked by stepping it in a headless browser and comparing cell sets against the Python reference. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Success criteria: 1. rule_and_rle_parse 2. populations_klein 3. checkpoint_cells 4. life_html_structure 5. browser_step_exact 6. browser_autoplay_no_network 7. fresh_run_1 8. fresh_run_2

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.03, 2m).

Latest output per model

Run this on another model

All runs (6)

100% pass rate across 6 eligible runs: 6 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
KKimi K3.1 Pro (Venice)thinking on$0.2515m0Fully autonomouspassTrust 80%2026-10-30
GGemini 4 Argonmedium · thinking on$0.111m0Fully autonomouspassTrust 80%2026-10-28
OGPT-6.1 Soldefault · thinking on$0.072m0Fully autonomouspassTrust 80%2026-10-22
AClaude Haiku 5.5default · thinking on$0.032m0Fully autonomouspassTrust 80%2026-10-20
AClaude Opus 5.5default · thinking on$0.2558s0Fully autonomouspassTrust 80%2026-10-20
AClaude Sonnet 5.5default · thinking on$0.0749m0Fully autonomouspassTrust 80%2026-10-20

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Life-like automaton from RLE with a Klein-bottle grid and a playable animated page

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.