oneshotlm
Compare all models on this prompt →

Maze generator & solver · mercury-2

Generate a random maze with the recursive-backtracker algorithm on a canvas, then animate an A-star or BFS solver finding the path from start to finish.

⛨ sandboxed Open in new tab ↗
transcript · 6 messages
user

Generate a random maze with the recursive-backtracker algorithm on a canvas, then animate an A-star or BFS solver finding the path from start to finish.

assistant
write []
toolResult

Validation failed for tool "write": - root: must be object Received arguments: []

assistant
write index.html (4376 bytes)
toolResult

Successfully wrote 4376 bytes to index.html

assistant

The maze generator and solver have been created in a single self‑contained file. **File:** `index.html` (saved in the current directory) You can open this file in a web browser. It will: 1. Generate a random maze using the recursive‑backtracker algorithm. 2. Draw the maze on a canvas. 3. Animate a BFS (you can swap in A* if desired) solving the maze from the green start cell to the red goal cell. All CSS and JavaScript are embedded directly in the HTML, with no external resources required. Enjoy!

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

modelmercury-2
vendorInception
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Maze generates and solver animates a BFS/A* fill from start toward goal, but keyboard/mouse inputs don't affect it.

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 motion0.1%
on click4.3%
on drag1.7%
on wheel0.0%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread83.7 / 255
console errors0
js errors none

METRICS

runtime9.7s
tokens in6.2k
tokens out3.5k
cached3.9k
cost / run$0.0033