oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3.5-27b

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 ↗
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
thinking
The user wants me to create a full-screen flocking simulation with boids. This is a classic artificial life simulation where individual agents (boids) follow simple rules to create emergent flocking behavior. Let me break down the requirements:

1. **Flocking rules** (Craig Reynolds' original):
   - Separation: Avoid crowding local flockmates
   - Alignment: Steer towards average heading of local flockmates
   - Cohesion: Steer to move toward average position of local flockmates

2. **Visual representation**: Oriented triangles

3. **Behavior**: 
   - Smooth steering
   - Flee from mouse cursor

4. **Technical requirements**:
   - Single self-contained HTML file
   - CSS in <style> tag
   - JS in <script> tag
   - No external resources/CDNs
   - Full-screen

Let me write this as a complete index.html file with embedded CSS and JavaScript.
write /tmp/ws/index.html (13344 bytes)
toolResult

Successfully wrote 13344 bytes to /tmp/ws/index.html

assistant
thinking
I've created the boid flocking simulation. Let me verify it was written correctly by checking the file exists and has content.
bash {"command":"ls -la /tmp/ws/index.html && head -20 /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 13346 Aug 1 19:45 /tmp/ws/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Boid Flocking Simulation</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a1a; }

assistant
thinking
The file has been created successfully. Let me provide a summary of what I built.

Created `/tmp/ws/index.html` - a full-screen boid flocking simulation with: **Flocking Behaviors:** - **Separation** - Boids avoid crowding each other (strongest influence) - **Alignment** - Boids steer toward average heading of neighbors - **Cohesion** - Boids move toward center of nearby flockmates - **Mouse Fleeing** - Boids scatter when cursor approaches **Features:** - 150+ colorful oriented triangle boids with smooth steering - Glowing visual effects on each boid - Trail effect for motion blur - Edge wrapping (boids reappear on opposite side) - Click anywhere to spawn additional boids - Touch support for mobile devices - Fully self-contained - no external dependencies

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

modelqwen3.5-27b
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Colorful boid triangles flock and swirl smoothly, animates continuously; no clear extra reaction to click/drag/keys but self-animates well.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion21.6%
on click22.3%
on drag22.0%
on wheel23.9%
on enter + space24.0%
on arrow keys23.6%
on w/a/s/d23.7%
frame spread20.6 / 255
console errors0
js errors none

METRICS

runtime38.9s
tokens in12k
tokens out3.5k
cached0
cost / run$0.0077