Maze generator & solver · seed-2-1-turbo
Output generated Cost / run $0.0157 Runtime 72.3s
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.
thinking
What I will build is a single-page web app to generate mazes and animate pathfinding.I will build a single-page maze web app step by step with required features.
/tmp/ws/index.html (14129 bytes)Successfully wrote 14129 bytes to /tmp/ws/index.html
thinking
Verify file creation.
{"command":"ls -la /tmp/ws/index.html"}-rw-r--r--. 1 node node 14140 Aug 13 01:30 /tmp/ws/index.html
Created `/tmp/ws/index.html` — a fully self-contained maze generator and solver. **Features:** - **Recursive-backtracker maze generation** with optional animation - **A*** (default) and **BFS** solvers with animated exploration - Configurable maze size (10×10 to 50×50) and animation speed - Visual legend: - Green = start / path - Red = end / walls - Yellow = visited cells during search - Blue = frontier/queue - Stats: visited cells count and final path length - Generate → Solve → Reset workflow with stateful buttons All CSS and JS are inline — no external resources, fully sandboxed.