Maze generator & solver · qwen3.5-122b-a10b
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.
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
The user wants me to create a single-page web app that: 1. Generates a random maze using the recursive backtracker algorithm 2. Animates an A* or BFS solver finding the path from start to finish I'll create a self-contained index.html file with all CSS and JS inline, no external resources needed. Let me build this step by step: 1. Canvas for rendering the maze 2. Recursive backtracker algorithm for maze generation 3. BFS or A* algorithm for solving 4. Animation for the solving process I'll use A* as it's more efficient and visually interesting.
/tmp/ws/index.html (15438 bytes)Successfully wrote 15438 bytes to /tmp/ws/index.html
thinking
I've created a self-contained single-page web app that: 1. Generates a random maze using the recursive backtracker algorithm 2. Animates an A* solver finding the path from start to finish 3. Has all CSS and JS inline with no external resources The app includes: - A 21x21 grid maze (odd dimensions work best for recursive backtracker) - Visual legend showing what each color means - Statistics panel showing grid size, cells explored, path length, and status - Three buttons: Generate New Maze, Solve with A*, and Reset Path - Smooth animation of the A* algorithm exploring cells - Color-coded visualization of walls, paths, start, end, explored cells, and solution Let me verify the file was created correctly.
{"command":"ls -la /tmp/ws/index.html"}-rw-r--r--. 1 node node 15440 Aug 1 20:19 /tmp/ws/index.html
thinking
The file was created successfully. Let me provide a summary to the user.
Done! I've created `index.html` with: **Maze Generation (Recursive Backtracker):** - 21x21 grid using the recursive backtracker algorithm - Creates perfect mazes (no loops, all cells reachable) - Visualizes walls and paths **A* Solver:** - Manhattan distance heuristic - Animated exploration showing frontier in yellow - Solution path highlighted in green - Real-time stats update during solving **Features:** - Generate New Maze - creates a fresh random maze - Solve with A* - animates the solver finding the optimal path - Reset Path - clears solution while keeping the maze - Statistics panel shows cells explored and path length - Color-coded legend for all elements - Modern dark theme with gradient buttons Open `index.html` in any browser to see it in action.
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
EVALUATION
Maze generated correctly but none of the tested inputs triggered the A* solve; solving button was never clicked by probe.
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.