oneshotlm
Compare all models on this prompt →

Boids flocking · gpt-oss-120b

Create a full-screen flocking simulation of boids using separation, alignment, and cohesion, drawn as oriented triangles that steer smoothly and flee from the mouse cursor.

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

Create a full-screen flocking simulation of boids using separation, alignment, and cohesion, drawn as oriented triangles that steer smoothly and flee from the mouse cursor.

assistant
thinking
We need to create a self-contained index.html with full-screen flocking simulation. Use JavaScript canvas, no external libraries. Simulate boids with behaviors: separation, alignment, cohesion, and also flee from mouse cursor. Draw oriented triangles representing each boid. Should be full-screen responsive. Provide CSS in style tag. Use a script with animation loop.

Steps: Write HTML skeleton with canvas that fills screen, script that sets up canvas size to window.innerWidth/innerHeight, handles resize. Boid class with position, velocity, acceleration. Parameters: max speed, max force. Functions for steering: separation, alignment, cohesion. Also flee (steer away from mouse if within some radius). The boid's update applies acceleration to velocity, limit speed, position wraps around edges.

Drawing: oriented triangle: points based on heading of velocity. Use context.save/translate/rotate.

Make sure to requestAnimationFrame.

Write the file index.html.

Proceed to write directly using write tool.
write index.html (7500 bytes)
toolResult

Successfully wrote 7500 bytes to index.html

assistant

The full‑screen boids flocking simulation is now ready in a single self‑contained file: **File created:** `index.html` You can open this file in a browser; it will display an animated flock of oriented triangular boids that exhibit separation, alignment, cohesion, and smoothly flee from the mouse cursor—all without any external resources.

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

modelgpt-oss-120b
vendorOpenAI
harnesspi-agent
generated2026-07-22

EVALUATION

3/5 working

Boids flock and animate continuously as small yellow triangles, but flocking clusters look loose and mouse interaction isn't clearly visible.

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 motion5.0%
on click5.2%
on drag5.1%
on wheel4.9%
on enter + space4.9%
on arrow keys5.2%
on w/a/s/d5.4%
frame spread8.1 / 255
console errors0
js errors none

METRICS

runtime50.6s
tokens in4.7k
tokens out2.3k
cached0
cost / run$0.0006