oneshotlm
Compare all models on this prompt →

Boids flocking · muse-spark-1.2

Output generated Cost / run $0.0689 Runtime 47.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

modelmuse-spark-1.2
vendorMeta
harnesspi-agent
generated2026-08-13

METRICS

runtime47.2s
tokens in25k
tokens out12k
cached11k
cost / run$0.0689
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
→ write index.html (29291 bytes)
toolResult

Successfully wrote 29291 bytes to index.html

assistant
→ bash {"command":"ls -lh index.html && wc -l index.html"}
toolResult

-rw-r--r--. 1 node node 29K Aug 13 01:24 index.html 722 index.html

assistant

Flocking simulation written to `index.html` — single self-contained file, no external resources. **Features:** - 120 boids (20–220 slider) as velocity-oriented triangles with heading-colored bloom - Full Reynolds flocking: **Separation / Alignment / Cohesion** with independent weights, perception radius, and separation distance sliders - **Smooth steering:** acceleration integration, speed limiting, `maxForce` (agility) capping per behavior, toroidal neighbor distance - **Mouse predator:** cursor projects a radial "flee" field (tunable flee strength + radius); boids apply exponential evasion force — move to scatter, click to burst new boids outward - Wrap / bounce edges, motion-trail fade, neighbor-link overlay, scatter/add/reset controls - Keyboard: `Space` pause, `R` reset, `S` scatter