oneshotlm
Compare all models on this prompt →

Snake · grok-4.3

Output generated Cost / run $0.0130 Runtime 34.9s

Prompt for this run

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 ↗

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

modelgrok-4.3
vendorxAI · Grok
harnesspi-agent
generated2026-07-22

METRICS

runtime34.9s
tokens in11k
tokens out2.7k
cached7.0k
cost / run$0.0130
Transcript · 8 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
The task is to build a single-page web app for a playable Snake game, all in one self-contained file named index.html. It must include CSS in a <style> tag, JS in a <script> tag, inline, no external r...
→ bash {"command":"ls -la /workspace"}
toolResult

total 4 drwxrwxrwx 2 node node 64 Jul 22 17:34 . drwxr-xr-x 1 root root 4096 Jul 22 17:34 ..

assistant
thinking
The task is to build a single-page web app for a Snake game, all in one index.html file. It must be self-contained, no external resources, no network requests. End with index.html present in the curre...First, I need to create the index.html file with the Snake game code.

I'll write the entire HTML file in my mind.
→ write /workspace/index.html (9353 bytes)
toolResult

Successfully wrote 9353 bytes to /workspace/index.html

assistant
thinking
The file is created. Let me verify it.
→ bash {"command":"ls -la /workspace/index.html && head -20 /workspace/index.html"}
toolResult

-rw-r--r-- 1 node node 9357 Jul 22 17:34 /workspace/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Snake</title> <style> body { margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; background: #111; color: #0f0; font-family: 'Courier New', monospace; } h1 {

assistant
thinking
The file has been created successfully. It's a complete, self-contained Snake game in a single index.html file with:

✅ Done. `index.html` created with a fully playable, self-contained Snake game.