oneshotlm
Compare all models on this prompt →

Conway's Game of Life · llama-4-scout

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.

⚠ 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

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

a simple implementation of Conway's Game of Life in a single HTML file. This code includes a full-screen canvas grid, click-and-drag functionality to toggle cells, and play/pause, step, randomize, and clear controls. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> ="viewport" content="width=device-width, initial-scale=1"> <title>Conway's Game of Life</title> <style> body { margin: 0; background-color: #f0f0f0; } #canvas { 1px solid black; } #controls { position: absolute; top: 10px; left10px; background-color: #fff; padding: 10px; border: 1px solid #ddd; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } button { margin-bottom: 10px; } </style> </head> <body> <canvas id="canvas"></canvas> <div id="controls"> <button id="play-pause">Play</button> <button id="step">Step</button> <button id="randomize">Randomize</button> id="clear">Clear</button> </div> <script> const canvas = document.getElementById('canvas'); = canvas.getContext('2d'); const playPauseButton = document.getElementById('play-pause'); const stepButton = document.getElementById('step'); const randomizeButton = document.getElementById('randomize'); const clearButton = document.getElementById('clear'); let grid = let intervalId = null; let isRunning = false; cellSize = 10; // Initialize canvas and grid function { canvas.width = window.innerWidth; canvas.height = window.innerHeight; ctx.fillStyle = 'black'; ctx.fillRect(0, 0, canvas.width, canvas.height); const cols = Math.floor(canvas.width / cellSize); const Math.floor(canvas.height / cellSize); for (let i = 0; i < rows; i++) { grid[i] = []; for (let j = 0; j < cols; j++) { grid[i][j] = 0; } } } // Draw grid function draw() { ctx.clearRect(0, 0, canvas.width, canvas.height); for (let i = 0 < grid.length; i++) { for (let j = 0; j < grid[i].length; j++) { if (grid[i][j] === 1) { ctx.fillStyle = 'black'; Rect(j * cellSize, i * cellSize, cellSize, cellSize); } } } } // Count live neighbors function countLiveNeighbors(i, j) { let count = 0; for (let x = -1; x <= 1; x++) { for (let y = -1; y <= 1; y++) { if (x === 0 && y === 0) continue; const col = (j + y + grid[0].length) % grid[0].length; const row = (i + x + grid.length) % grid.length; count += grid[row][col]; } } return count; } // function nextGeneration() { const newGrid = [] (let i = 0; i < grid.length; i++) { newGrid[i] = [] (let j = 0; j < grid[i].length; j++) { const liveNeighborsLiveNeighbors(i, j); if (grid[i][j] === 1 && (liveNeighbors < 2 || liveNeighbors > 3)) { newGrid[i][j] = 0; } else if (grid[i][j] === 0 && liveNeighbors === 3) { newGrid[i][j] = 1; } else { newGrid[i][j] = grid[i][j]; } } } grid = newGrid; } // Event listeners canvas.addEventListener', (e) => { const col = Math.floor(e.client cellSize); const row = Math.floor(e.clientY / cellSize); grid[row][col] = 1 - grid[row][col]; draw(); }); canvas.addEventListener('mousemove', (e) => { if (e.buttons === 1) { mouse button const col = Math.floor(e.clientX / cellSize); const row = Math.floor(e.clientY / cellSize); grid[row][col] = 1 - grid[row][col]; draw(); } }); playPauseButton.addEventListener('click', () => { if (isRunning) { clearInterval(intervalId); isRunning = false; playPauseButton.textContent = ' } else { = setInterval(() => { nextGeneration(); draw(); }, 100); isRunning = true; playPauseButton.textContent = 'Pause'; } }); stepButton.addEventListener('click', () => { nextGeneration(); draw(); }); randomizeButton.addEventListener('click', () => { for (let i = 0; i < grid.length; i++) { let j = 0; j < grid[i].length++) { grid[i][j] = Math.random() < 0.5 ? 0; } draw(); }); Button.addEventListener('click', () => { for (let i = 0; i < grid.length; i++) { for (let j = 0; j < grid[i].length; j++) { grid[i][j] = 0; } } }); init(); draw(); </script> > </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

runtime12.1s
tokens in1.5k
tokens out1.4k
cached0
cost / run$0.0006