oneshotlm
Compare all models on this prompt →

Boids flocking · qwen3.6-plus

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 flocking simulation (boids algorithm) with:
1. Separation, alignment, cohesion rules
2. Boids drawn as oriented triangles
3. Smooth steering
4. Mouse cursor avoidance (flee behavior)
5. Full-screen canvas
6. All in one index.html file, no external resources

Let me build this with a canvas-based implementation.
write /tmp/ws/index.html (8743 bytes)
toolResult

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

assistant
thinking
The file has been created successfully. Let me verify it's present and well-formed.
bash {"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 9511 Aug 1 17:33 /tmp/ws/index.html 302 /tmp/ws/index.html

assistant
thinking
The user asked me to build a full-screen flocking simulation. I've already created the index.html file and verified it exists. Let me provide a concise summary of what was built.

`/tmp/ws/index.html` is ready — a single self-contained file with everything inline. Here's what it does: - **400 boids** rendered as oriented triangles on a full-screen canvas - **Three classic flocking rules**: separation (short-range repulsion), alignment (match neighbours' heading), and cohesion (steer toward the flock center) - **Spatial hash grid** for fast O(n) neighbour lookups instead of brute-force O(n²) - **Mouse flee** — boids within a 150px radius are pushed away with inverse-distance force; a soft red glow shows the danger zone - **Soft edge avoidance** keeps the flock on screen with gentle turning, plus hard wrap as a safety net - **Speed-based coloring** — faster boids appear brighter; semi-transparent background redraw creates subtle motion trails - **Touch support** for mobile

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-plus
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Boids flock smoothly with oriented triangle shapes and visibly flee a red glow around the cursor on mouse input.

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 motion26.1%
on click29.2%
on drag30.3%
on wheel29.8%
on enter + space26.9%
on arrow keys27.8%
on w/a/s/d27.1%
frame spread26.1 / 255
console errors0
js errors none

METRICS

runtime62.9s
tokens in11k
tokens out3.5k
cached0
cost / run$0.0104