oneshotlm
Compare all models on this prompt →

Boids flocking · glm-5.3

Output generated Cost / run $0.0129 Runtime 24.8s

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

modelglm-5.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

METRICS

runtime24.8s
tokens in4.9k
tokens out2.1k
cached2.8k
cost / run$0.0129
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
→ write index.html (5886 bytes)
toolResult

Successfully wrote 5886 bytes to index.html

assistant

Done — `index.html` in the current directory contains the full simulation: - **220 boids** drawn as oriented triangles (nose pointing along velocity), colored by hue and speed - **Classic Reynolds rules**: separation (inverse-distance weighted), alignment, and cohesion, each applied through smooth limited steering forces - **Mouse flee**: boids panic within a 130px radius, with a force ramping up as you get closer (fear radius drawn as a faint circle) - **Soft edge containment** so flocks turn back from screen edges instead of clipping - Speed clamping (min/max) plus subtle motion trails via semi-transparent frame redraws Open it in any browser — everything is self-contained with no external resources.