oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3.6-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 a single-page web app with a boids flocking simulation. Let me create a self-contained index.html file with:

1. Full-screen canvas
2. Boids implemented as triangles
3. Three classic rules: separation, alignment, cohesion
4. Mouse flee behavior
5. Smooth steering
6. All CSS and JS inline

Let me write a complete, well-crafted implementation.

write /workspace/index.html (10771 bytes)
toolResult

Successfully wrote 10771 bytes to /workspace/index.html

assistant
thinking
The file is written. Let me verify it exists and is complete.
bash {"command":"wc -l /workspace/index.html && head -3 /workspace/index.html && echo \"...\" && tail -3 /workspace/index.html"}
toolResult

389 /workspace/index.html <!DOCTYPE html> <html lang="en"> <head> ... </script> </body> </html>

assistant
thinking
The file is complete. Let me confirm the key features are all present.

The `index.html` file is ready at `/workspace/index.html`. Here's what it includes: **Flocking Rules:** - **Separation** — boids steer away from nearby neighbors to avoid crowding - **Alignment** — boids steer toward the average heading of neighbors - **Cohesion** — boids steer toward the center of mass of neighbors **Visuals:** - Boids drawn as luminous oriented triangles with glow halos - Motion trails via semi-transparent background fill - Color hue shifts per boid (cyan → purple palette) - Speed-reactive size and brightness **Interactions:** - **Mouse hover** — boids flee from cursor with a smooth falloff force - **Click** — spawns a burst of 40 new boids at cursor position - **Touch support** for mobile - Custom animated cursor indicator with flee radius ring **Performance:** - Spatial grid partitioning for O(n) neighbor lookups - 400 boids by default (no hard cap — click to add more) - Toroidal wrapping with edge avoidance at screen borders

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.6-27b
vendorQwen
harnesspi-agent
generated2026-07-31

EVALUATION

2/5 partial

Boids render as blurry glowing blobs not crisp triangles, and population collapses from ~20 to ~2 within 2 seconds unprompted.

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 motion10.5%
on click4.3%
on drag4.3%
on wheel2.8%
on enter + space2.9%
on arrow keys2.0%
on w/a/s/d0.6%
frame spread33.5 / 255
console errors0
js errors none

METRICS

runtime91.3s
tokens in8.2k
tokens out4.2k
cached4.4k
cost / run$0.0158