oneshotlm
Compare all models on this prompt →

Maze generator & solver · grok-4.6

Output generated Cost / run $0.0480 Runtime 60.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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

METRICS

runtime60.4s
tokens in8.3k
tokens out5.3k
cached256
cost / run$0.0480
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:

I'll build a self-contained maze app: recursive-backtracker generation on canvas, then an animated A* (with BFS option) from start to finish.

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

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

assistant
thinking
The file was written successfully. The user asked for a single-page web app with maze generation using recursive-backtracker and animated A* or BFS solver. I've created that. Let me just confirm the f...

`index.html` is ready — a self-contained maze lab with no external assets. - **Generation:** iterative recursive backtracker (DFS carving) on an odd-sized grid; start is top-left, finish is bottom-right. - **Solve:** A* (Manhattan heuristic + binary heap) or BFS. Search expands on canvas (visited / frontier), then the recovered path is drawn in gold. - **Controls:** maze size, algorithm, animation speed, New maze, Solve. Open `index.html` in a browser to run it.