oneshotlm
Compare all models on this prompt →

Boids flocking · nova-2-lite-v1

Output generated Cost / run $0.0110 Runtime 22.9s

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

modelnova-2-lite-v1
vendorAmazon · Nova
harnesspi-agent
generated2026-08-01

METRICS

runtime22.9s
tokens in6.9k
tokens out3.6k
cached0
cost / run$0.0110
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
[REDACTED].
→ write index.html (12426 bytes)
toolResult

Successfully wrote 12426 bytes to index.html

assistant
thinking
[REDACTED].

I've created a complete flocking simulation with all the requested features! The `index.html` file contains: 1. **Full-screen canvas** that adapts to window size 2. **Boid class** implementing: - Separation (avoiding nearby boids) - Alignment (matching velocity of neighbors) - Cohesion (staying close to neighbors) - Flee behavior from mouse cursor 3. **Oriented triangles** drawn as boids with eyes 4. **Smooth steering** through acceleration and velocity calculations 5. **Edge wrapping** to keep boids in view 6. **Overlay instructions** for the user The simulation uses pure HTML5 Canvas with no external dependencies. Just open the `index.html` file in any modern browser to see the boids flocking, separating, aligning, and fleeing from your mouse cursor! The boids are light blue triangles with black eyes, and they respond realistically to each other and to the mouse position. The physics parameters (speeds, distances, forces) are tuned for smooth, natural-looking movement.