Boids flocking · granite-4.1-8b
Output generated Cost / run $0.0004 Runtime 15.5s
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.
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
METRICS
Transcript · 4 messages
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.
index.html (5172 bytes)Successfully wrote 5172 bytes to index.html
The self‑contained HTML file **index.html** has been created in the current directory ( /tmp/ws ). It contains all the necessary CSS and JavaScript inside `<style>` and `<script>` tags, implements the classic boids algorithm with separation, alignment, cohesion, and adds a mouse‑flee behavior. The boids are rendered as oriented triangles that move smoothly and fill the screen as a flock. You can open **index.html** in any modern browser to view the full‑screen flocking simulation.