oneshotlm
Compare all models on this prompt →

Boids flocking · gpt-5.4-nano

Output generated Cost / run $0.0088 Runtime 48.6s

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

modelgpt-5.4-nano
vendorOpenAI
harnesspi-agent
generated2026-07-22

METRICS

runtime48.6s
tokens in7.9k
tokens out5.8k
cached0
cost / run$0.0088
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
**Creating boids simulation**

I need to create an index.html file that sets up a full-screen canvas for my boids simulation. I want the boids to have triangles oriented by their velocity, so they'll look sleek and dynamic. I'll implement smooth steering using flocking rules and a mouse flee force that has a falloff. I'll make sure to use requestAnimationFrame for smooth animations and adjust for resizing. Plus, I'm keeping it simple by using no external resources. Let's write the full code!
→ write index.html (17574 bytes)
toolResult

Successfully wrote 17574 bytes to index.html

assistant

Created a full-screen boids flocking simulation in **`index.html`** (single self-contained file). It uses **separation, alignment, and cohesion** steering, renders each boid as an **oriented triangle** pointing along its velocity, and **flees from the mouse cursor smoothly**. Controls: - Press **F** to toggle flee - Press **R** to reset Open `index.html` in a browser to run it.