oneshotlm
Compare all models on this prompt →

Boids flocking · mimo-v2.5-pro

Output generated Cost / run $0.0042 Runtime 39.2s

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

modelmimo-v2.5-pro
vendorXiaomi · MiMo
harnesspi-agent
generated2026-07-22

METRICS

runtime39.2s
tokens in6.2k
tokens out3.1k
cached2.7k
cost / run$0.0042
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
I'll create a full-screen boids flocking simulation with separation, alignment, and cohesion behaviors, drawn as oriented triangles that flee from the mouse cursor. Let me build this as a single HTML file with all CSS and JS inline.
→ write /workspace/index.html (7968 bytes)
toolResult

Successfully wrote 7968 bytes to /workspace/index.html

assistant
thinking
The file has been created. Let me verify it exists and is complete.

`/workspace/index.html` is ready. Here's what it includes: **Boids flocking simulation:** - **300 boids** rendered as oriented arrow-shaped triangles with per-boid hue variation (cyan-blue spectrum) and subtle glow - **Three classic flocking forces** — separation (avoid crowding), alignment (match neighbors' heading), cohesion (steer toward flock center), each independently weighted - **Smooth steering** — forces are accumulated, clamped to `MAX_FORCE`, and applied as acceleration; speed is bounded with min/max - **Mouse flee** — when the cursor is near, boids within a 160px radius steer away proportionally to distance; a faint red ring shows the influence zone - **Edge wrapping** — boids smoothly reappear on the opposite side **Interactive controls (bottom-left panel):** | Slider | Controls | |--------|----------| | Separation | Repulsion strength from nearby boids | | Alignment | Tendency to match neighbor velocity | | Cohesion | Tendency to steer toward neighbor center | | Speed | Min/max velocity clamp | | Flee | How strongly boids flee the mouse | The simulation is fully self-contained — no external resources, no network calls. Open `index.html` in a browser and move the mouse over the flock to scatter them.