oneshotlm
Compare all models on this prompt →

Maze generator & solver · muse-spark-1.2

Output generated Cost / run $0.0813 Runtime 45.4s

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

modelmuse-spark-1.2
vendorMeta
harnesspi-agent
generated2026-08-13

METRICS

runtime45.4s
tokens in17k
tokens out15k
cached3.6k
cost / run$0.0813
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
→ write index.html (47047 bytes)
toolResult

Successfully wrote 47047 bytes to index.html

assistant

Built `index.html` — single-file, offline maze visualizer: **Generation:** Recursive Backtracker (DFS stack) carving walls on `<canvas>`, seeded (reproducible), perfect maze with optional braided loops and paint-to-edit walls. **Solving:** Toggle **A*** (priority queue + Manhattan heuristic, `f=g+h`) vs **BFS** (queue). Animates *frontier* (yellow), *visited* (cyan), *current* (blue pulse) via `requestAnimationFrame` with adjustable speed, pause/step/instant. Path rendered as glowing orange spline with length stats, progress bar, and coverage %. **Interactions:** Size slider (7–41), random seed, animate-carving toggle, shuffle start/goal (Shift+click / Alt+click on canvas, drag to knock walls), keyboard `Space` solve/pause, `G` new maze. No external resources — all CSS/JS inline.