Skip to content

Latest commit

 

History

History
114 lines (81 loc) · 2.42 KB

File metadata and controls

114 lines (81 loc) · 2.42 KB

⚡ Quick Start Guide

1️⃣ Install Dependencies

bun install

2️⃣ Generate Mazes

bun run generate

This creates:

  • data/finetuning_dataset.jsonl (900 maps)
  • data/benchmark_maps.json (90 maps)

Takes ~45 seconds to complete.

3️⃣ Visualize Results

bun run visualize

Opens an interactive web viewer in your browser.

🎮 Visualizer Controls

Action Method
Next maze Click "Next" or press
Previous maze Click "Previous" or press
Random maze Click "🎲 Random"
Show path Click "🟢 Show Path"
Hide path Click "🔴 Hide Path"
Step through path Click "⏭️ Step" (when path shown)
Filter by algorithm Use "Algorithm" dropdown
Filter by size Use "Size" dropdown

🎨 Color Legend

  • 🟦 Blue P = Player start
  • 🟥 Red D = Destination
  • Dark = Walls
  • Light = Walkable
  • 🟧 Orange = Path (when shown)

🧩 Algorithms Explained

Recursive Backtracker (Blue badge)

  • Long winding corridors
  • Many dead ends
  • Complex paths

Prim's Algorithm (Purple badge)

  • Blocky rooms
  • More open areas
  • Interconnected chambers

Cellular Automata (Green badge)

  • Natural caves
  • Organic shapes
  • Large open spaces

📝 Example Commands

# Generate mazes
bun run generate

# View mazes interactively
bun run visualize

# Generate a single maze example
bun run examples/single-maze.ts

# Compare algorithms side-by-side
bun run examples/compare-algorithms.ts

✅ Validation Checklist

Use the visualizer to verify:

  • P (start) is blue and on walkable tile
  • D (destination) is red and on walkable tile
  • Show path connects P to D
  • Path doesn't go through walls
  • Different algorithms look distinct
  • All three sizes (5x5, 10x10, 20x20) work
  • Path length matches step count

🆘 Troubleshooting

"Could not load maze data" → Run bun run generate first

Visualizer won't open → Manually open visualizer.html in any browser

Mazes look wrong → Check the examples to see expected output

📚 More Documentation


That's it! You're ready to generate and visualize mazes for LLM training. 🎉