oneshotlm
Compare all models on this prompt →

Snake · llama-4-scout

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

⚠ 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 Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

assistant

[write(index.html, content="<html><head><title>Snake Game</title><style>canvas { border: 1px solid black; }</style></head><body><canvas id='canvas' width='400' height='400'></canvas><script>const canvas = document.getElementById('canvas');const ctx = canvas.getContext('2d');let snake = [{x: 200, y: 200}, {x: 190, y: 200}, {x: 180, y: 200}];let direction = 'right';let food = {x: Math.floor(Math.random() * 40) * 10, y: Math.floor(Math.random() * 40) * 10};let score = 0;document.addEventListener('keydown', (e) => {if (e.key === 'ArrowUp' && direction !== 'down') direction = 'up';if (e.key === 'ArrowDown' && direction !== 'up') direction = 'down';if (e.key === 'ArrowLeft' && direction !== 'right') direction = 'left';if (e.key === 'ArrowRight' && direction !== 'left') direction = 'right';});function draw() {ctx.clearRect(0, 0, canvas.width, canvas.height);snake.forEach((part) => {ctx.fillStyle = 'green';ctx.fillRect(part.x, part.y, 10, 10);});ctx.fillStyle = 'red';ctx.fillRect(food.x, food.y, 10, 10);ctx.fillStyle = 'black';ctx.font = '24px Arial';ctx.fillText(`Score: ${score}`, 10, 30);}function update() {const head = snake[0];let newHead;switch (direction) {case 'up':newHead = {x: head.x, y: head.y - 10};break;case 'down':newHead = {x: head.x, y: head.y + 10};break;case 'left':newHead = {x: head.x - 10, y: head.y};break;case 'right':newHead = {x: head.x + 10, y: head.y};break;}snake.unshift(newHead);if (snake[0].x === food.x && snake[0].y === food.y) {score++;food = {x: Math.floor(Math.random() * 40) * 10, y: Math.floor(Math.random() * 40) * 10};} else {snake.pop();}if (snake[0].x < 0 || snake[0].x >= canvas.width || snake[0].y < 0 || snake[0].y >= canvas.height || snake.slice(1).some((part) => part.x === snake[0].x && part.y === snake[0].y)) {alert(`Game Over! Your score: ${score}`);score = 0;snake = [{x: 200, y: 200}, {x: 190, y: 200}, {x: 180, y: 200}];direction = 'right';food = {x: Math.floor(Math.random() * 40) * 10, y: Math.floor(Math.random() * 40) * 10};}}setInterval(() => {update();draw();}, 100);</script></body></html>")]

TAKE IT TO CODE

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

RUN

modelllama-4-scout
vendorMeta · Llama
harnesspi-agent
generated2026-08-01

METRICS

runtime7.9s
tokens in1.5k
tokens out516
cached0
cost / run$0.0003