oneshotlm
Compare all models on this prompt →

Maze generator & solver · ring-2.6-1t

Output generated Cost / run $0.0037 Runtime 35.7s

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.

⛨ sandboxed Open in new tab ↗

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

modelring-2.6-1t
vendorinclusionai
harnesspi-agent
generated2026-08-01

METRICS

runtime35.7s
tokens in8.5k
tokens out5.5k
cached6.7k
cost / run$0.0037
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 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
3. All in one HTML file with inline CSS and JS, no external resources

Let me build this step by step:
- Canvas-based rendering
- Recursive backtracker maze generation
- A* pathfinding with animation
- Clean visual design

I'll write the complete index.html file.

Building a self-contained maze generator and solver with animated A* pathfinding.

→ write /tmp/ws/index.html (14842 bytes)
toolResult

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

assistant
thinking
The file has been written successfully. Let me verify it exists and looks correct.

Done! The file `/tmp/ws/index.html` is ready. Here's what it includes: **Maze Generation** — Recursive backtracker algorithm that carves passages through a grid, visualized step-by-step with a green trail cell. **A* Pathfinding** — Animated solver using Manhattan distance heuristic that shows: - 🟢 **Green** cells = open set (candidates being explored) - 🔵 **Blue** cells = closed set (already evaluated) - 🟢 **Green path** = final shortest route from start (top-left) to end (bottom-right) **Controls:** - **Generate Maze** — Animated maze generation - **Run A*** — Animated A* solver - **Instant Solve** — Immediate path computation (no animation) - **Size slider** — Grid dimension (8×8 to 60×60) - **Speed slider** — Animation speed Fully self-contained — no external dependencies, CDNs, or network requests. Just open the file in any browser.