oneshotlm
Compare all models on this prompt →

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.

⛨ sandboxed Open in new tab ↗
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
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.
write /tmp/ws/index.html (15438 bytes)
toolResult

Successfully wrote 15438 bytes to /tmp/ws/index.html

assistant
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.
bash {"command":"ls -la /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 15440 Aug 1 20:19 /tmp/ws/index.html

assistant
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

modelqwen3.5-122b-a10b
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 partial

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.

idle motion0.0%
on click0.0%
on drag0.0%
on wheel0.0%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread19.6 / 255
console errors0
js errors none

METRICS

runtime30.1s
tokens in13k
tokens out4.4k
cached0
cost / run$0.0127