oneshotlm
Compare all models on this prompt →

Fluid simulation · llama-3.1-8b-instruct

Create a real-time fluid simulation on a full-screen canvas where dragging the mouse pushes swirling colored dye through the fluid.

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

Create a real-time fluid simulation on a full-screen canvas where dragging the mouse pushes swirling colored dye through the fluid.

assistant
bash {"command":"touch /tmp/ws/index.html","timeout":10}
toolResult

(no output)

assistant

{"name": "write", "parameters": {"path": "/tmp/ws/index.html", "content": "<html><head><style>body { margin: 0; background: #f0f0f0; } canvas { width: 100%; height: 100vh; display: block; }</style></head><body><canvas id=\"canvas\"></canvas><script>const canvas = document.getElementById(\"canvas\");const ctx = canvas.getContext(\"2d\");canvas.width = window.innerWidth;canvas.height = window.innerHeight;let particles = [];for (let i = 0; i < 1000; i++) {particles.push({x: Math.random() * canvas.width, y: Math.random() * canvas.height, vx: Math.random() * 2 - 1, vy: Math.random() * 2 - 1, r: Math.random() * 2 + 1, g: Math.random() * 2 + 1, b: Math.random() * 2 + 1});}function draw() {ctx.clearRect(0, 0, canvas.width, canvas.height);for (let i = 0; i < particles.length; i++) {const p = particles[i];ctx.fillStyle = `rgb(${p.r * 255}, ${p.g * 255}, ${p.b * 255})`;ctx.beginPath();ctx.arc(p.x, p.y, p.r, 0, 2 * Math.PI);ctx.fill();p.x += p.vx;p.y += p.vy;if (p.x + p.r > canvas.width || p.x - p.r < 0) p.vx = -p.vx;if (p.y + p.r > canvas.height || p.y - p.r < 0) p.vy = -p.vy;}requestAnimationFrame(draw);}canvas.addEventListener(\"mousedown\", (e) => {const rect = canvas.getBoundingClientRect();const x = e.clientX - rect.left;const y = e.clientY - rect.top;for (let i = 0; i < particles.length; i++) {const p = particles[i];if (Math.hypot(p.x - x, p.y - y) < p.r) {p.vx = (e.clientX - canvas.width / 2) / 10;p.vy = (e.clientY - canvas.height / 2) / 10;}}});draw();</script></body></html>"

write /tmp/ws/index.html (1413 bytes)
toolResult

Successfully wrote 1413 bytes to /tmp/ws/index.html

assistant

No need to call functions. The web app index.html is now present in the current directory /tmp/ws.

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

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

EVALUATION

1/5 broken

Blank noise-textured canvas with no visible fluid simulation and no response to any input.

off-prompt

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

METRICS

runtime8.8s
tokens in5.6k
tokens out1.4k
cached0
cost / run$0.0004