oneshotlm
Compare all models on this prompt →

Boids flocking · step-3.5-flash

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 · 3 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 full-screen flocking simulation of boids with the following characteristics:
1. Full-screen
2. Flocking behavior using separation, alignment, and cohesion
3. Boids drawn as oriented triangles
4. Smooth steering
5. Boids flee from the mouse cursor

I need to create a single index.html file that includes:
- Full-screen canvas
- CSS in a <style> tag
- JavaScript in a <script> tag
- Implementation of boids algorithm with separation, alignment, cohesion
- Mouse interaction (flee behavior)
- Triangles oriented based on velocity
- Smooth steering

Let me think about the implementation:

1. Boid class with:
   - Position (x, y)
   - Velocity (vx, vy)
   - Acceleration (ax, ay)
   - Max speed, max force
   - Methods: flock(boids), update(), render(), edges(), etc.

2. Flocking rules:
   - Separation: steer to avoid crowding neighbors
   - Alignment: steer towards average heading of neighbors
   - Cohesion: steer to move toward average position of neighbors

3. Additional rule:
   - Flee from mouse: steer away from mouse position

4. Main loop:
   - Update all boids
   - Draw all boids as oriented triangles

5. Canvas setup:
   - Full viewport
   - Handle resize

6. Triangle rendering:
   - Calculate angle from velocity
   - Draw triangle pointing in direction of velocity

I'll write this in a single HTML file.
write /tmp/ws/index.html (8831 bytes)
toolResult

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

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

modelstep-3.5-flash
vendorStepFun
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Boids flock and swirl smoothly with trail effects, and click/drag show mouse-avoidance scattering.

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.1%
on click20.1%
on drag20.2%
on wheel21.0%
on enter + space21.0%
on arrow keys20.5%
on w/a/s/d20.4%
frame spread18.9 / 255
console errors0
js errors none

METRICS

runtime600.0s
tokens in1.6k
tokens out2.2k
cached0
cost / run$0.0008