oneshotlm
Compare all models on this prompt →

Maze generator & solver · mercury-2

Output generated Cost / run $0.0033 Runtime 9.7s

Prompt for this run

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 ↗

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

METRICS

runtime9.7s
tokens in6.2k
tokens out3.5k
cached3.9k
cost / run$0.0033
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!