oneshotlm
Compare all models on this prompt →

Conway's Game of Life · kat-coder-pro-v2

Output generated Cost / run $0.0071 Runtime 51.3s

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

modelkat-coder-pro-v2
vendorKwaipilot
harnesspi-agent
generated2026-07-31

METRICS

runtime51.3s
tokens in13k
tokens out3.8k
cached5.3k
cost / run$0.0071
Transcript · 6 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

I'll create a full-screen Conway's Game of Life with interactive controls. Let me build this as a single self-contained HTML file.

→ write /workspace/index.html (12975 bytes)
toolResult

Successfully wrote 12975 bytes to /workspace/index.html

assistant
→ bash {"command":"ls -la /workspace/index.html"}
toolResult

-rw-r--r-- 1 node node 12991 Jul 31 08:48 /workspace/index.html

assistant

Done! I've created a full-screen Conway's Game of Life web app with the following features: **Interactive Canvas:** - Full-screen grid with cells rendered in vibrant HSL colors that shift over time - Click and drag to toggle cells (paint alive cells or erase dead cells) - Touch support for mobile devices **Controls:** - **Play/Pause** - Start/stop the simulation - **Step** - Advance one generation at a time - **Random** - Generate a random starting pattern (30% fill) - **Clear** - Reset the grid - **Speed slider** - Adjust simulation speed from 1 to 60 generations per second **Info Display:** - Shows current generation count - Shows live population count - Shows current simulation speed **Technical Details:** - Uses toroidal grid (edges wrap around) - Efficient double-buffered grid updates - Smooth animation using requestAnimationFrame - Responsive design that adapts to any screen size - No external dependencies - completely self-contained The app starts with a random pattern and is ready to run. Open `index.html` in a browser to start exploring Conway's Game of Life!