oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3.5-122b-a10b

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 · 6 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
The user wants me to create a boids simulation in a single HTML file. This is a classic flocking algorithm that includes:

1. Separation - avoid crowding neighbors
2. Alignment - steer towards average heading of neighbors
3. Cohesion - steer towards average position of neighbors
4. Mouse flee - avoid the mouse cursor

I'll create a complete self-contained HTML file with:
- Canvas for rendering
- Boid class with position, velocity, acceleration
- Flocking behaviors (separation, alignment, cohesion)
- Mouse interaction for fleeing
- Triangles drawn as oriented boids

Let me write this out.
write index.html (13314 bytes)
toolResult

Successfully wrote 13314 bytes to index.html

assistant
thinking
I've created a complete boids flocking simulation in a single HTML file. Let me verify it was written correctly by checking the file exists.
bash {"command":"ls -la index.html"}
toolResult

-rw-r--r--. 1 node node 13314 Aug 1 19:46 index.html

assistant
thinking
The file was created successfully. Let me provide a summary of what the simulation includes.

Done! The `index.html` file contains a complete boids flocking simulation with: - **150 boids** drawn as oriented triangles that follow their velocity direction - **Separation**: Boids steer away from nearby neighbors to avoid crowding - **Alignment**: Boids match their heading with nearby flockmates - **Cohesion**: Boids steer toward the average position of neighbors - **Mouse flee**: Boids flee from the mouse cursor when it gets close - **Smooth steering**: Forces are limited for natural, smooth movement - **Boundary handling**: Boids gently turn back when reaching edges - **Click to add**: Click anywhere to spawn new boids - **Trails effect**: Subtle motion trails for visual appeal

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.5-122b-a10b
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

2/5 partial

Boids counter shows 150 but only a couple tiny triangles are visible drifting on a mostly empty dark background.

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.1%
on click0.2%
on drag0.1%
on wheel0.0%
on enter + space0.1%
on arrow keys0.1%
on w/a/s/d0.1%
frame spread2.9 / 255
console errors0
js errors none

METRICS

runtime27.5s
tokens in11k
tokens out3.5k
cached0
cost / run$0.0102