oneshotlm
Compare all models on this prompt →

Conway's Game of Life · claude-sonnet-5.5

Output generated Cost / run $0.0333 Runtime 20.4s

Prompt for this run

Run Conway's Game of Life on a full-screen canvas grid with click-and-drag to toggle cells, plus play/pause, step, randomize, and clear controls.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelclaude-sonnet-5.5
vendorAnthropic · Claude
harnesspi 0.87.1 · browser iteration
generated2026-10-05

METRICS

runtime20.4s
tokens in9.0k
tokens out2.2k
cached4.5k
cost / run$0.0333
Transcript · 6 messages
system

user

Run Conway's Game of Life on a full-screen canvas grid with click-and-drag to toggle cells, plus play/pause, step, randomize, and clear controls.

assistant
→ write /tmp/job-a5qC6b/index.html (3170 bytes)
→ browser {"action":"screenshot"}
toolResult

Successfully wrote to /tmp/job-a5qC6b/index.html

toolResult

Frame 1, +0ms

[Browser image supplied to model]

{"console":["warning: An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing."],"dom":"Pause\nStep\nRandomize\nClear\nSpeed \nGen 2","images":"attached"}

assistant

I built the Game of Life in `/tmp/job-a5qC6b/index.html`. I only checked that it loads and runs: the screenshot showed a random pattern filling the screen and the generation counter going up. I didn't test the click-and-drag or the buttons, and I didn't check the console beyond one sandbox-iframe warning. - **Canvas:** the grid fills the window with 12px cells. The edges wrap around, and resizing the window keeps the cells you already have. - **Drawing:** click or drag to toggle cells. The first cell you press decides whether the drag draws or erases. - **Controls:** Pause/Play, Step (which also pauses), Randomize, Clear, and a speed slider. The generation count is shown in the toolbar, and the spacebar also toggles play and pause. It starts running as soon as it opens, with about 25% of cells alive.