oneshotlm
Compare all models on this prompt →

Snake · gpt-5.4-nano

Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

assistant
thinking
**Planning a simple snake game**

I'm thinking I need to create a single index.html file that includes all necessary CSS and JavaScript without relying on any external resources. I'll implement a grid system for the snake game using a canvas. It’ll use requestAnimationFrame or an interval for animation, and I'll incorporate arrow key controls while preventing the snake from reversing. Also, I want to include a restart option to ensure it's playable. Let's get started on writing this!
write index.html (15139 bytes)
toolResult

Successfully wrote 15139 bytes to index.html

assistant

Created **`index.html`** with a fully playable **Snake** game on a canvas: - **Arrow-key controls** (can’t reverse direction) - **Growing tail** when eating food - **Food spawning** on empty tiles - **Score + length + speed** HUD - **Game-over screen** + **Restart** (also restart by pressing an arrow key) Open `index.html` in your browser to play.

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

modelgpt-5.4-nano
vendorOpenAI
harnesspi-agent
generated2026-07-22

EVALUATION

3/5 working

Snake game starts on arrow keys, shows snake, food, and a Game Over/Restart screen with score.

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.8%
on wheel0.0%
on enter + space12.7%
on arrow keys7.0%
on w/a/s/d0.0%
frame spread18 / 255
console errors0
js errors none

METRICS

runtime54.3s
tokens in7.2k
tokens out5.8k
cached0
cost / run$0.0086