input stringlengths 60 510 | output stringlengths 5 718 |
|---|---|
Map:
#######
#.....#
#.###.#
#.P...#
#####D#
#.....#
####### | RIGHT,RIGHT,RIGHT,DOWN |
Map:
#######
#.#..P#
#.###.#
#....D#
#####.#
#.....#
####### | DOWN,DOWN |
Map:
#######
#...#.#
#..##P#
#.#...#
#.###.#
#..D..#
####### | DOWN,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#...#.#
#.#.#P#
#.#...#
#####.#
#....D#
####### | DOWN,DOWN,DOWN |
Map:
#######
#...#.#
#.#.#D#
#.#...#
###.#.#
#....P#
####### | UP,UP,UP |
Map:
#######
#.#.P.#
#D###.#
#...#.#
#.#.#.#
#.#...#
####### | RIGHT,DOWN,DOWN,DOWN,DOWN,LEFT,LEFT,UP,UP,LEFT,LEFT,UP |
Map:
#######
#.#.#.#
#.#.#.#
#.#.#.#
#.#.#P#
#D....#
####### | DOWN,LEFT,LEFT,LEFT,LEFT |
Map:
#######
#.#D..#
#P#.#.#
#.#.#.#
#...#.#
#...#.#
####### | DOWN,DOWN,RIGHT,RIGHT,UP,UP,UP |
Map:
#######
#...#.#
#D#.#.#
#.#.#.#
#.###.#
#....P#
####### | LEFT,LEFT,LEFT,LEFT,UP,UP,UP |
Map:
#######
#..P..#
#.###.#
#.#.#.#
#.#..D#
#.#...#
####### | RIGHT,RIGHT,DOWN,DOWN,DOWN |
Map:
#######
#...#.#
###.#D#
#...#.#
#P###.#
#.....#
####### | DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,UP |
Map:
#######
#.P.#.#
#.###.#
#.#...#
#.###.#
#...D.#
####### | LEFT,DOWN,DOWN,DOWN,DOWN,RIGHT,RIGHT,RIGHT |
Map:
#######
#D....#
#####.#
#...#.#
#P###.#
#.....#
####### | DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,UP,UP,LEFT,LEFT,LEFT,LEFT |
Map:
#######
#.....#
#.##..#
#P#...#
#.#####
#D....#
####### | DOWN,DOWN |
Map:
#######
#P#...#
#.###.#
#..D..#
#.#.#.#
#.....#
####### | DOWN,DOWN,RIGHT,RIGHT |
Map:
#######
#...#.#
#.###.#
#D#...#
#.###.#
#P....#
####### | UP,UP |
Map:
#######
#.....#
###.#.#
#...#.#
###D#.#
#...P.#
####### | LEFT,UP |
Map:
#######
#.....#
#####.#
#...#.#
#.D##.#
#..P..#
####### | LEFT,UP |
Map:
#######
#.P...#
#.##.D#
#.#.#.#
#.#.#.#
#...#.#
####### | RIGHT,RIGHT,DOWN,RIGHT |
Map:
#######
#.....#
###.#.#
#.#.#P#
#.###.#
#...D.#
####### | DOWN,DOWN,LEFT |
Map:
#######
#.....#
#.###.#
#.#P#.#
#.#.#.#
#..D#.#
####### | DOWN,DOWN |
Map:
#######
#..D..#
#####.#
#P....#
#####.#
#.....#
####### | RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,LEFT,LEFT |
Map:
#######
#.D...#
#.#####
#.#...#
#.###.#
#.P...#
####### | LEFT,UP,UP,UP,UP,RIGHT |
Map:
#######
#.....#
#####P#
#...#.#
###.#.#
#....D#
####### | DOWN,DOWN,DOWN |
Map:
#######
#...#P#
#.###.#
#.#...#
#D#.#.#
#...#.#
####### | DOWN,DOWN,LEFT,LEFT,DOWN,DOWN,LEFT,LEFT,UP |
Map:
#######
#.#...#
#.###.#
#...#.#
#.#.#D#
#P#...#
####### | UP,UP,RIGHT,RIGHT,DOWN,DOWN,RIGHT,RIGHT,UP |
Map:
#######
#.#.#.#
#.#D#.#
#.#.#.#
#.#.#.#
#P....#
####### | RIGHT,RIGHT,UP,UP,UP |
Map:
#######
#...D.#
#####.#
#.....#
#.P####
#.....#
####### | UP,RIGHT,RIGHT,RIGHT,UP,UP,LEFT |
Map:
#######
#...#D#
#.###.#
#.#...#
#.#..P#
#...#.#
####### | UP,UP,UP |
Map:
#######
#P...D#
#.###.#
#.....#
#####.#
#.....#
####### | RIGHT,RIGHT,RIGHT,RIGHT |
Map:
#######
#.#...#
#.###.#
#D..#.#
#.#.#P#
#.....#
####### | DOWN,LEFT,LEFT,UP,UP,LEFT,LEFT |
Map:
#######
#.....#
#.###.#
#.#.#.#
###...#
#P...D#
####### | RIGHT,RIGHT,RIGHT,RIGHT |
Map:
#######
#...#.#
#.#.#P#
#.#.#.#
#.##..#
#..D..#
####### | DOWN,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#...#.#
###.#.#
#.#.#.#
#.#D#P#
#.....#
####### | DOWN,LEFT,LEFT,UP |
Map:
#######
#.....#
###.#.#
#.#.#.#
#D#...#
#..P..#
####### | LEFT,LEFT,UP |
Map:
#######
#...#.#
#.#.#D#
#.#.P.#
#####.#
#.....#
####### | RIGHT,UP |
Map:
#######
#.#..P#
#.###.#
#.#...#
#.#..D#
#.....#
####### | DOWN,DOWN,DOWN |
Map:
#######
#P..#.#
###.#.#
#D..#.#
#.###.#
#.....#
####### | RIGHT,RIGHT,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#.....#
#####.#
#..P#.#
#.#.#.#
#D....#
####### | DOWN,DOWN,LEFT,LEFT |
Map:
#######
#....P#
###.#.#
#...#.#
#D..#.#
#.#...#
####### | LEFT,LEFT,DOWN,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#.#.#.#
#.#.#.#
#...#.#
#.###.#
#.D..P#
####### | LEFT,LEFT,LEFT |
Map:
#######
#...#.#
#.#.#.#
#.#.#.#
###.#P#
#...D.#
####### | DOWN,LEFT |
Map:
#######
#.#.#.#
#.#D#.#
#P#...#
#.###.#
#.....#
####### | DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,LEFT,LEFT,UP |
Map:
#######
#..D..#
###.#.#
#P#.#.#
#.#.#.#
#...#.#
####### | DOWN,DOWN,RIGHT,RIGHT,UP,UP,UP,UP |
Map:
#######
#..D..#
#####.#
#.#...#
#P#.#.#
#.....#
####### | DOWN,RIGHT,RIGHT,UP,UP,RIGHT,RIGHT,UP,UP,LEFT,LEFT |
Map:
#######
#...#.#
#.##..#
#.#...#
#.###P#
#...D.#
####### | DOWN,LEFT |
Map:
#######
#.....#
#####.#
#..D#.#
###.#.#
#P....#
####### | RIGHT,RIGHT,UP,UP |
Map:
#######
#...#.#
##..#.#
#.#.D.#
#.###.#
#..P..#
####### | RIGHT,RIGHT,UP,UP,LEFT |
Map:
#######
#.#...#
#.###.#
#D....#
#####P#
#.....#
####### | UP,LEFT,LEFT,LEFT,LEFT |
Map:
#######
#.....#
#.#####
#.#...#
#.###P#
#D....#
####### | DOWN,LEFT,LEFT,LEFT,LEFT |
Map:
#######
#.....#
#.###.#
#D#.#P#
#.#.#.#
#...#.#
####### | UP,UP,LEFT,LEFT,LEFT,LEFT,DOWN,DOWN |
Map:
#######
#...#.#
#.###.#
#.D.#.#
###.#.#
#....P#
####### | LEFT,LEFT,UP,UP,LEFT |
Map:
#######
#...#.#
#.###.#
#.....#
###.#.#
#.P..D#
####### | RIGHT,RIGHT,RIGHT |
Map:
#######
#.#...#
#.###.#
#..P..#
#.#.#.#
#.#D..#
####### | DOWN,DOWN |
Map:
#######
#.....#
#.###.#
#.#D..#
#.#####
#..P..#
####### | LEFT,LEFT,UP,UP,UP,UP,RIGHT,RIGHT,RIGHT,RIGHT,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#.....#
#####.#
#.#...#
#.#D#.#
#P..#.#
####### | RIGHT,RIGHT,UP |
Map:
#######
#.#.#.#
#.#.#.#
#D#.#.#
#.#.#.#
#....P#
####### | LEFT,LEFT,LEFT,LEFT,UP,UP |
Map:
#######
#.....#
#####D#
#...#.#
###.#.#
#.P...#
####### | RIGHT,RIGHT,RIGHT,UP,UP,UP |
Map:
#######
#.....#
#D.##.#
#.#P#.#
###.#.#
#.....#
####### | DOWN,DOWN,RIGHT,RIGHT,UP,UP,UP,UP,LEFT,LEFT,LEFT,DOWN,LEFT |
Map:
#######
#.....#
#####.#
#.....#
###.#P#
#..D..#
####### | DOWN,LEFT,LEFT |
Map:
#######
#.P.#D#
#.###.#
#.#...#
#.###.#
#.....#
####### | LEFT,DOWN,DOWN,DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,UP,UP |
Map:
#######
#..P..#
#.###.#
#.#D..#
#.#.###
#.....#
####### | RIGHT,RIGHT,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#.....#
#.###.#
#.#.D.#
#.#.#.#
#.P.#.#
####### | RIGHT,UP,UP,RIGHT |
Map:
#######
#.#.#P#
#.#.#.#
#.D.#.#
#.###.#
#.....#
####### | DOWN,DOWN,DOWN,DOWN,LEFT,LEFT,LEFT,LEFT,UP,UP,RIGHT |
Map:
#######
#.D...#
#####.#
#.#...#
#.#.###
#P....#
####### | RIGHT,RIGHT,UP,UP,RIGHT,RIGHT,UP,UP,LEFT,LEFT,LEFT |
Map:
#######
#.....#
#.##.D#
#.P...#
#####.#
#.....#
####### | RIGHT,RIGHT,UP,RIGHT |
Map:
#######
#.#.#.#
#.#.#D#
#...#.#
#.###.#
#...P.#
####### | RIGHT,UP,UP,UP |
Map:
#######
#P#...#
#.#.#.#
#.....#
###...#
#....D#
####### | DOWN,DOWN,RIGHT,RIGHT,DOWN,DOWN,RIGHT,RIGHT |
Map:
#######
#.P.#.#
#.#D#.#
#.#.#.#
#.###.#
#.....#
####### | RIGHT,DOWN |
Map:
#######
#.#...#
#.###.#
#...#D#
#.#.#.#
#P#...#
####### | UP,UP,RIGHT,RIGHT,DOWN,DOWN,RIGHT,RIGHT,UP,UP |
Map:
#######
#.#..D#
#.#.#.#
#P#.#.#
#.###.#
#.....#
####### | DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP,UP,UP,UP |
Map:
#######
#D....#
#.###.#
#...#.#
##.##.#
#..P..#
####### | LEFT,UP,UP,LEFT,UP,UP |
Map:
#######
#...P.#
#####.#
#...#.#
###.#.#
#D....#
####### | RIGHT,DOWN,DOWN,DOWN,DOWN,LEFT,LEFT,LEFT,LEFT |
Map:
#######
#P..#.#
###.#.#
#.#...#
#.##.D#
#.....#
####### | RIGHT,RIGHT,DOWN,DOWN,RIGHT,DOWN,RIGHT |
Map:
#######
#.#..D#
#.###.#
#.#...#
#.#.###
#...P.#
####### | LEFT,UP,UP,RIGHT,RIGHT,UP,UP |
Map:
#######
#.....#
#####.#
#...#.#
#.#.#.#
#P.D..#
####### | RIGHT,RIGHT |
Map:
#######
#.....#
#.###.#
#.#D..#
###.#P#
#.....#
####### | UP,LEFT,LEFT |
Map:
#######
#...P.#
#.#####
#.#...#
#.###.#
#....D#
####### | LEFT,LEFT,LEFT,DOWN,DOWN,DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT |
Map:
#######
#.P.#.#
###.#.#
#.#.#.#
#D#.#.#
#.....#
####### | RIGHT,DOWN,DOWN,DOWN,DOWN,LEFT,LEFT,UP |
Map:
#######
#.....#
#####.#
#.#P..#
#.#.###
#..D..#
####### | DOWN,DOWN |
Map:
#######
#...#.#
###.#P#
#.#...#
#.###.#
#....D#
####### | DOWN,DOWN,DOWN |
Map:
#######
#.#...#
#P#.#.#
#.#.#.#
#.###D#
#.....#
####### | DOWN,DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT,UP |
Map:
#######
#...D.#
##.##.#
#..P#.#
#.###.#
#.....#
####### | LEFT,UP,UP,RIGHT,RIGHT |
Map:
#######
#...#.#
#.###.#
#.D.#P#
###.#.#
#.....#
####### | DOWN,DOWN,LEFT,LEFT,UP,UP,LEFT |
Map:
#######
#...#.#
###.#.#
#.#.P.#
#.###.#
#...D.#
####### | RIGHT,DOWN,DOWN,LEFT |
Map:
#######
#.D...#
###.#.#
#...#P#
#.###.#
#.....#
####### | UP,UP,LEFT,LEFT,LEFT |
Map:
#######
#..P#D#
###...#
#.#.#.#
#.#.#.#
#.....#
####### | DOWN,RIGHT,RIGHT,UP |
Map:
#######
#P#.#.#
#...#.#
#...#.#
#.###.#
#..D..#
####### | DOWN,DOWN,DOWN,DOWN,RIGHT,RIGHT |
Map:
#######
#...D.#
#.###.#
#.#...#
#.#####
#...P.#
####### | LEFT,LEFT,LEFT,UP,UP,UP,UP,RIGHT,RIGHT,RIGHT |
Map:
#######
#.....#
#.###P#
#.#D#.#
###.#.#
#.....#
####### | DOWN,DOWN,DOWN,LEFT,LEFT,UP,UP |
Map:
#######
#...P.#
###.#.#
#.#.#.#
#.###.#
#..D..#
####### | RIGHT,DOWN,DOWN,DOWN,DOWN,LEFT,LEFT |
Map:
#######
#..D#.#
#.#.#.#
#.#.P.#
#.###.#
#.....#
####### | LEFT,UP,UP |
Map:
#######
#.P..D#
#####.#
#.....#
#####.#
#.....#
####### | RIGHT,RIGHT,RIGHT |
Map:
#######
#.#..P#
#.###.#
#.#...#
#.#.#.#
#.D.#.#
####### | DOWN,DOWN,LEFT,LEFT,DOWN,DOWN,LEFT |
Map:
#######
#.D...#
##.##.#
#..P#.#
###.#.#
#.....#
####### | LEFT,UP,UP |
Map:
#######
#...#.#
#.#P#D#
#.#.#.#
#..##.#
#.....#
####### | UP,LEFT,LEFT,DOWN,DOWN,DOWN,RIGHT,DOWN,RIGHT,RIGHT,RIGHT,UP,UP,UP |
Map:
#######
#.....#
#.#####
#.#P..#
#.###.#
#...D.#
####### | RIGHT,RIGHT,DOWN,DOWN,LEFT |
Map:
#######
#....D#
#####.#
#.#P..#
#.#.###
#.....#
####### | RIGHT,RIGHT,UP,UP |
Map:
#######
#D....#
#..##.#
#.#...#
#.###.#
#.P...#
####### | LEFT,UP,UP,UP,UP |
Map:
#######
#....P#
#.###.#
#..D#.#
#.#.#.#
#.#...#
####### | DOWN,DOWN,DOWN,DOWN,LEFT,LEFT,UP,UP |
π§© Maze Navigation Dataset
A comprehensive dataset of 899 maze-solving examples generated using three different maze generation algorithms, designed for training and evaluating LLM navigation capabilities.
π Dataset Overview
- Total Mazes: 899 examples
- Algorithms: 3 different maze generation techniques (~300 examples each)
- Map Sizes: 3 different sizes per algorithm
- 5x5 inner grid (7x7 with walls)
- 10x10 inner grid (12x12 with walls)
- 20x20 inner grid (22x22 with walls)
- Format: JSONL (JSON Lines)
- Task: Navigation from Player (P) to Destination (D)
Map Elements
#: Wall (impassable)P: Player start positionD: Destination (goal).: Walkable tile (empty space)
Example 5x5 Map
#######
#P....#
#.###.#
#.#...#
#.#.#.#
#...#D#
#######
Note: Map dimensions (5x5, 10x10, 20x20) refer to the inner walkable grid, excluding the outer perimeter walls. A 5x5 inner grid becomes a 7x7 grid with walls.
π² Generation Algorithms
1. Recursive Backtracker (DFS-based)
Description: Creates "perfect" mazes with no loops or isolated sections. Each pair of cells has exactly one path between them.
Characteristics:
- Long, winding corridors
- Many dead ends
- Spindly, organic branching
- High path complexity
Use Case: Testing LLM's ability to handle complex, maze-like navigation with many decision points.
2. Prim's Algorithm (MST-based)
Description: Also creates perfect mazes but with a different structural feel.
Characteristics:
- Blockier, denser layout
- More interconnected "room-like" areas
- Wider passages
- Bulbous cavern structures
Use Case: Testing LLM's spatial reasoning with more open, room-based layouts.
3. Cellular Automata
Description: Generates organic, natural-looking cave systems using Game of Life-like rules.
Algorithm:
- Initialize with random wall distribution (~45%)
- Apply cellular automata rules for 5-8 iterations
- Ensure single connected component via flood fill
- Smooth edges with additional iterations
Characteristics:
- Organic, irregular shapes
- Natural cavern feel
- Open areas with scattered obstacles
- Less predictable structure
Use Case: Testing LLM's adaptability to non-traditional, organic layouts.
π Output Formats
Fine-tuning Dataset (mazes.jsonl)
Each line is a JSON object:
{"input": "Map:\n#######\n#P....#\n#.....#\n#.....#\n#....D#\n#######", "output": "DOWN,DOWN,DOWN,RIGHT,RIGHT,RIGHT,RIGHT"}
The output contains comma-separated directional commands:
UP: Move northDOWN: Move southLEFT: Move westRIGHT: Move east
π Dataset Statistics
| Algorithm | Small (7x7) | Medium (12x12) | Large (22x22) | Total |
|---|---|---|---|---|
| Recursive Backtracker | ~100 | ~100 | ~100 | ~300 |
| Prim's Algorithm | ~100 | ~100 | ~100 | ~300 |
| Cellular Automata | ~100 | ~100 | ~100 | ~300 |
| Total | ~300 | ~300 | ~300 | 900 |
π Usage Examples
Loading the Dataset
import json
mazes = []
with open('mazes.jsonl', 'r') as f:
for line in f:
mazes.append(json.loads(line))
print(f"Loaded {len(mazes)} maze examples")
Example Training Format
# Example maze entry
example = mazes[0]
print("Input:")
print(example['input'])
print("\nExpected Output:")
print(example['output'])
Parsing Map Data
def parse_maze(input_text):
lines = input_text.split('\n')[1:] # Skip "Map:" header
grid = [list(line) for line in lines]
# Find start and end positions
start_pos = None
end_pos = None
for i, row in enumerate(grid):
for j, cell in enumerate(row):
if cell == 'P':
start_pos = (i, j)
elif cell == 'D':
end_pos = (i, j)
return grid, start_pos, end_pos
π― Use Cases
1. LLM Fine-tuning
Train language models to navigate mazes and understand spatial reasoning.
2. Path Planning Evaluation
Benchmark different algorithms on maze navigation tasks.
3. Spatial Intelligence Research
Study how models handle different types of spatial layouts.
4. Multi-step Reasoning
Evaluate models' ability to plan sequences of actions to reach goals.
π Quality Assurance
- All mazes are solvable with exactly one optimal path
- Consistent formatting across all examples
- Balanced distribution across algorithms and sizes
- Verified solutions through automated validation
π Notes
- Solutions represent the shortest path from P to D
- All paths avoid walls (#) and only use walkable spaces (.)
- Movement is restricted to 4-directional (no diagonal moves)
- Each maze has a unique solution path
π€ Model Training Tips
- Use the input as a prompt:
"Map:\n{maze_grid}" - Expected output format:
"UP,DOWN,LEFT,RIGHT"sequences - Consider fine-tuning on smaller mazes first, then scaling up
- Balance training across different algorithm types for robustness
Dataset generated for maze navigation research and LLM spatial reasoning evaluation.
- Downloads last month
- 13