Maze generator & solver · grok-4.6
Output generated Cost / run $0.0480 Runtime 60.4s
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 · 4 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.
thinking
The user wants me to create a single-page web app that:
I'll build a self-contained maze app: recursive-backtracker generation on canvas, then an animated A* (with BFS option) from start to finish.
/tmp/ws/index.html (15334 bytes)Successfully wrote 15334 bytes to /tmp/ws/index.html
thinking
The file was written successfully. The user asked for a single-page web app with maze generation using recursive-backtracker and animated A* or BFS solver. I've created that. Let me just confirm the f...
`index.html` is ready — a self-contained maze lab with no external assets. - **Generation:** iterative recursive backtracker (DFS carving) on an odd-sized grid; start is top-left, finish is bottom-right. - **Solve:** A* (Manhattan heuristic + binary heap) or BFS. Search expands on canvas (visited / frontier), then the recovered path is drawn in gold. - **Controls:** maze size, algorithm, animation speed, New maze, Solve. Open `index.html` in a browser to run it.