oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3-coder

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

I'll create a full-screen flocking simulation of boids with all the requested features. Here's the complete solution in a single HTML file:

write index.html (14267 bytes)
toolResult

Successfully wrote 14267 bytes to index.html

assistant

I've created a complete boid flocking simulation with all the requested features: 1. Full-screen canvas that resizes with the window 2. Boids drawn as oriented triangles that smoothly steer 3. Implementation of the three core flocking behaviors: - Separation: boids avoid crowding each other - Alignment: boids steer toward the average heading of neighbors - Cohesion: boids move toward the average position of neighbors 4. Mouse cursor repulsion: boids flee from the mouse when it's nearby 5. Smooth steering with acceleration and velocity 6. Boundary wrapping so boids reappear on opposite edges 7. Colorful boids with individual hues 8. Visual trails for a smoother appearance The simulation uses efficient algorithms to calculate flocking behaviors while maintaining good performance. The boids are drawn as oriented triangles that point in their direction of travel, and they react smoothly to both flocking forces and mouse movement. To use the simulation, simply move your mouse cursor around the screen - the boids will flee from it while maintaining their flocking behavior. The simulation runs at full screen and will automatically adjust to window resizing.

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

modelqwen3-coder
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Colorful triangular boids flock and leave trails, reacting to mouse position with cohesive movement patterns.

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 motion10.3%
on click13.6%
on drag12.5%
on wheel11.6%
on enter + space12.1%
on arrow keys12.1%
on w/a/s/d11.3%
frame spread14.3 / 255
console errors0
js errors none

METRICS

runtime32.2s
tokens in131
tokens out3.0k
cached6.0k
cost / run$0.0037