oneshotlm
Compare all models on this prompt →

Maze generator & solver · qwen3.5-plus-02-15

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 · 4 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 either A* or BFS to solve the maze from start to finish
3. Everything should be in one self-contained index.html file with inline CSS and JS
4. No external resources or CDNs

Let me create this file with:
- A canvas element for rendering
- CSS for styling
- JavaScript for:
  - Maze generation using recursive backtracker
  - Pathfinding animation (I'll use A* as it's more interesting)
  - Visual feedback for the solving process
write /tmp/ws/index.html (19673 bytes)
toolResult

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

assistant
thinking
I've created a complete self-contained maze generator and solver web app in a single `index.html` file. Here's what it includes:

**Features:**
1. **Maze Generation**: Uses the recursive backtracker algorithm to generate a random perfect maze
2. **Three Solving Algorithms**:
   - **A* Search**: Uses Manhattan distance heuristic for efficient pathfinding
   - **BFS (Breadth-First Search)**: Guarantees the shortest path
   - **DFS (Depth-First Search)**: Explores deeply before backtracking
3. **Animated Visualization**: Watch the algorithm explore the maze in real-time
4. **Interactive Controls**: Generate, Solve, and Reset buttons
5. **Color-coded Legend**: Shows what each color represents

**Visual Elements:**
- Purple walls (#533483)
- Dark blue paths (#0f3460)
- Red start point (#e94560)
- Teal end point (#00d9a5)
- Semi-transparent red for visited cells
- Yellow for the final solution path

The app runs entirely in the browser with no external dependencies.

Done! I've created `index.html` - a self-contained maze generator and solver web app with: **Features:** - **Recursive Backtracker** algorithm for maze generation - **3 solving algorithms**: A* Search (with Manhattan heuristic), BFS, and DFS - **Real-time animation** showing the search progress - **Interactive controls**: Generate, Solve, Reset buttons - **Algorithm selector** dropdown to choose between A*, BFS, or DFS **Visual Design:** - Dark gradient theme with purple walls - Color-coded legend (start, end, walls, visited, solution) - Smooth animations showing the algorithm exploring cells - Status messages showing progress Open `index.html` in a 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-plus-02-15
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

1/5 broken

Canvas remains empty in all frames; no maze is ever generated, requiring an untried click on Generate Maze button.

off-prompt

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 spread14.5 / 255
console errors0
js errors none

METRICS

runtime71.5s
tokens in8.3k
tokens out5.6k
cached0
cost / run$0.0108