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.
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
METRICS
Transcript · 6 messages
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.
[]Validation failed for tool "write": - root: must be object Received arguments: []
index.html (4376 bytes)Successfully wrote 4376 bytes to index.html
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!