oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3.5-plus-02-15

Output generated Cost / run $0.0065 Runtime 45.0s

Prompt for this run

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 ↗

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-plus-02-15
vendorQwen
harnesspi-agent
generated2026-08-01

METRICS

runtime45.0s
tokens in6.1k
tokens out3.1k
cached0
cost / run$0.0065
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
The user wants me to create a single-page web app with a flocking simulation (boids algorithm). I need to implement:

1. Boids with three main rules: separation, alignment, and cohesion
2. Draw boids as oriented triangles
3. Smooth steering behavior
4. Flee from mouse cursor
5. Full-screen canvas
6. All in one self-contained index.html file with inline CSS and JS

Let me create this file with the classic boids algorithm implementation.
→ write /tmp/ws/index.html (11547 bytes)
toolResult

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

assistant
thinking
Done!

Done! I've created `/tmp/ws/index.html` - a full-screen boids flocking simulation with: - **200 boids** drawn as oriented triangles - **Three flocking behaviors**: separation (avoid crowding), alignment (match direction), and cohesion (stay together) - **Mouse flee behavior** - boids scatter when the cursor gets close (with a visible radius indicator) - **Smooth steering** using Reynolds' steering behaviors with force limiting - **Color-coded by speed** - faster boids shift toward cyan - **Wrap-around edges** - boids that exit one side appear on the opposite - **Motion trails** from the semi-transparent background clear Open the file in a browser to see the simulation in action. Move your mouse around to watch the boids flee!