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.
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
METRICS
Transcript · 6 messages
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.
/tmp/job-a5qC6b/index.html (3170 bytes){"action":"screenshot"}Successfully wrote to /tmp/job-a5qC6b/index.html
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"}
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.