oneshotlm
Compare all models on this prompt →

Space Invaders · llama-3.1-8b-instruct

Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.

⚠ no runnable output

This one-shot run produced no runnable artifact.

agent produced no index.html

The transcript below shows what the model did — read it to see why the one shot fell short.

transcript · 2 messages
user

Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.

assistant

<write>{"content": "import { JSDOM } from 'jsdom';\nconst dom = new JSDOM(`<!DOCTYPE html><html><head>\n</head><body>\n</body></html>`);\nconst document = dom.window.document;\n\n// Canvas\nconst canvas = document.createElement('canvas');\nconst ctx = canvas.getContext('2d');\ncanvas.width = 800;\ncanvas.height = 600;\ndocument.body.appendChild(canvas);\n\n// Aliens\nclass Alien {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this.width = 30;\n this.height = 30;\n }\n}\nconst aliens = [];\nfor (let i = 0; i < 10; i++) {\n const x = Math.random() * (canvas.width - 30);\n const y = Math.random() * (canvas.height / 2);\n aliens.push(new Alien(x, y));\n}\n\n// Bunkers\nclass Bunker {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this.width = 30;\n this.height = 30;\n }\n}\nconst bunkers = [];\nfor (let i = 0; i < 5; i++) {\n const x = Math.random() * (canvas.width - 30);\n const y = canvas.height / 2 + Math.random() * 100;\n bunkers.push(new Bunker(x, y));\n}\n\n// Ship\nclass Ship {\n constructor() {\n this.x = canvas.width / 2;\n this.y = canvas.height - 50;\n this.width = 30;\n this.height = 30;\n }\n}\nconst ship = new Ship();\n\n// Bullet\nclass Bullet {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this.speed = 5;\n }\n}\nconst bullets = [];\n\n// Score and Lives\nlet score = 0;\nlet lives = 3;\n\n\n\n// Game Loop\nfunction draw() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = 'black';\n for (const alien of aliens) {\n ctx.fillRect(alien.x, alien.y, alien.width, alien.height);\n }\n for (const bunker of bunkers) {\n ctx.fillRect(bunker.x, bunker.y, bunker.width, bunker.height);\n }\n ctx.fillStyle = 'blue';\n ctx.fillRect(ship.x, ship.y, ship.width, ship.height);\n for (const bullet of bullets) {\n ctx.fillStyle = 'red';\n ctx.fillRect(bullet.x, bullet.y, 5, 5);\n }\n ctx.fillStyle = 'white';\n ctx.font = '20px Arial';\n ctx.textAlign = 'left';\n ctx.textBaseline = 'top';\n ctx.fillText('Score: ' + score, 10, 10);\n ctx.fillText('Lives: ' + lives, 10, 40);\n requestAnimationFrame(draw);\n}\n\ndocument.addEventListener('keydown', event => {\n const newX = ship.x + event.key === 'ArrowLeft' ? -10 : event.key === 'ArrowRight' ? 10 : 0;\n if (newX >= 0 && newX <= canvas.width - ship.width) {\n ship.x = newX;\n }\n if (event.key === ' ') {\n bullets.push(new Bullet(ship.x, ship.y));\n }\n});\ndraw();", "canvas"}</write><write>{"content": "", "path": "./index.html"}</write>

TAKE IT TO CODE

This run produced no artifact — reuse the prompt with a different model or your own pi-agent run.

RUN

modelllama-3.1-8b-instruct
vendorMeta · Llama
harnesspi-agent
generated2026-08-01

METRICS

runtime2.7s
tokens in1.7k
tokens out854
cached0
cost / run$0.0002