oneshotlm
Compare all models on this prompt →

Maze generator & solver · nova-2-lite-v1

Output generated Cost / run $0.0113 Runtime 18.3s

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

modelnova-2-lite-v1
vendorAmazon · Nova
harnesspi-agent
generated2026-08-01

METRICS

runtime18.3s
tokens in7.3k
tokens out3.6k
cached0
cost / run$0.0113
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
[REDACTED].
→ write index.html (13966 bytes)
toolResult

Successfully wrote 13966 bytes to index.html

assistant
thinking
[REDACTED].

I've created a self-contained single-page web application in `index.html` that: 1. Generates mazes using the recursive backtracker algorithm 2. Solves the maze using Breadth-First Search (BFS) with animation 3. Features: - Generate new mazes button - Solve maze button - Clear solution button - Visual path highlighting - Animated solving process - Start (green) and end (red) points The application runs entirely in the browser with no external dependencies. To use it: 1. Open `index.html` in any modern web browser 2. Click "Generate New Maze" to create a new maze 3. Click "Solve Maze" to see the BFS algorithm find a path 4. Click "Clear Solution" to reset the display The maze is 15x15 cells with a cell size of 20px, making for a 600x600 pixel canvas. The solving animation shows visited cells in light blue and the final path in orange.