oneshotlm
Compare all models on this prompt →

Conway's Game of Life · glm-5.2

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 ↗
transcript · 4 messages
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
thinking
Let me create a Conway's Game of Life web app in a single index.html file.
write /workspace/index.html (11135 bytes)
toolResult

Successfully wrote 11135 bytes to /workspace/index.html

assistant

Done. I created `/workspace/index.html` — a fully self-contained Conway's Game of Life app. **Features:** - **Full-screen canvas grid** that auto-resizes to the viewport (device-pixel-ratio aware for crisp rendering) - **Click-and-drag to toggle cells** — click flips the clicked cell, and dragging paints that same value (so you can draw/erase strokes naturally) - **Play/Pause** button (also `Space`) - **Step** button advances one generation (also `S`) - **Randomize** fills ~30% density (also `R`) - **Clear** empties the board (also `C`) - **Speed slider** (1–60 generations/sec) - Live stats (generation count + live cell count) and toroidal wrapping at edges **Implementation notes:** - Grid stored in a `Uint8Array`; the next generation is computed into a scratch buffer and swapped (no allocation per step), with an unrolled neighbor count and modulo wrap. - Resizing preserves the overlapping region of the existing pattern. - Seeded with two gliders so the canvas isn't empty on load. Open `index.html` in a browser to run it — no network or external resources needed.

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

modelglm-5.2
vendorZ.ai · GLM
harnesspi-agent
generated2026-07-08

EVALUATION

3/5 working

Game of Life renders with glider pattern, drag draws cells, play/pause toggles via space, but grid is sparse and mostly empty.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.0%
on click0.0%
on drag0.7%
on wheel0.0%
on enter + space1.8%
on arrow keys0.5%
on w/a/s/d0.8%
frame spread12.7 / 255
console errors0
js errors none

METRICS

runtime91.8s
tokens in3.6k
tokens out3.7k
cached2.8k
cost / run$0.0152