oneshotlm
Compare all models on this prompt →

Boids flocking · minimax-m2.1

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 a flocking simulation (boids) with:
1. Separation, alignment, and cohesion behaviors
2. Oriented triangles for the boids
3. Smooth steering
4. Mouse flee behavior

Let me create a single HTML file with all the code. I'll implement the classic Reynolds boids algorithm with the three rules plus mouse avoidance.
write /tmp/ws/index.html (18183 bytes)
toolResult

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

assistant
thinking
I've created the boids flocking simulation. Let me verify it was created properly.
bash {"command":"ls -la /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 18183 Aug 1 19:46 /tmp/ws/index.html

assistant
thinking
The file has been created successfully. It's a self-contained HTML file with:

1. Boids flocking simulation with three classic rules:
   - Separation (avoid crowding neighbors)
   - Alignment (steer towards average heading of neighbors)
   - Cohesion (steer towards average position of neighbors)

2. Additional mouse flee behavior - boids flee from the cursor

3. Visual features:
   - Oriented triangles that point in their direction of travel
   - Colorful boids with a gradient and glow effect
   - Trail effects showing recent movement
   - Dark background with subtle grid
   - Motion blur effect

4. Interactive controls:
   - Sliders to adjust all four behavior weights in real-time
   - Stats showing number of boids
   - Hint about mouse interaction
   - Touch support for mobile devices

5. Screen wrapping - boids wrap around screen edges

All code is in one self-contained file with no external dependencies.

Created a full-screen boids flocking simulation with: - **Three flocking rules**: Separation, alignment, and cohesion (all adjustable via sliders) - **Mouse flee behavior**: Boids scatter when you move the cursor near them - **Oriented triangles**: Each boid is drawn as a triangle pointing in its direction of travel - **Smooth steering**: Using Reynolds' steering behaviors with velocity limiting - **Visual polish**: Colorful boids with gradient fills, glow effects, and motion trails - **Interactive controls**: Real-time sliders to tweak all behavior weights - **Screen wrapping**: Boids wrap around screen edges seamlessly - **Touch support**: Works on mobile devices Open `index.html` in a browser to see the simulation. Move your mouse to scare the boids!

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

modelminimax-m2.1
vendorMiniMax
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Colorful boid triangles flock smoothly and flee the mouse cursor with visible trails; sliders present but keyboard has little extra effect.

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 motion20.8%
on click20.1%
on drag21.8%
on wheel21.3%
on enter + space20.7%
on arrow keys20.5%
on w/a/s/d21.2%
frame spread23.4 / 255
console errors0
js errors none

METRICS

runtime36.7s
tokens in1.0k
tokens out4.7k
cached12k
cost / run$0.0063