The dataset could not be loaded because the splits use different data file formats, which is not supported. Read more about the splits configuration. Click for more details.
Error code: FileFormatMismatchBetweenSplitsError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
17x17 Maze with Diverse Paths (1.3M, 16 paths/maze)
This is v2 of the 17x17 maze SFT corpus used in the MaxRL paper. It is
designed to make judge_maze_continuous non-trivially different from the binary
reward by ensuring path lengths span a wide range per maze, instead of always
being shortest.
Why a v2 dataset?
In the original guanning-ai/maze_17x17_1m, every training trajectory is the
BFS-shortest path through a perfect Prim-generated maze. As a result, training
under a binary "did you reach the goal?" reward already produces near-optimal
trajectories, and the continuous reward R = max(0, (UB-L)/(UB-L*)) ends up
essentially redundant. We confirmed this empirically: the two rewards yielded
nearly identical RL outcomes.
This release fixes that by:
- Knocking out walls. Every maze starts as a perfect Prim maze and then has
K ∈ [5%, 30%]of its inter-cell walls knocked out (uniformly at random per maze). Loops appear, so a single maze admits many distinct simple paths from start to goal. - Stratified path harvesting. Per maze we DFS for simple paths of length
< UB = 60, with goal-distance pruning. Paths are bucketed by length, kept via reservoir sampling (so the 4 paths per length-bucket are an unbiased uniform sample, not just whatever DFS happened to find first). - Diversity-aware selection. From the harvest pool we pick
N = 16paths that (i) are spread across rewardR ∈ (0, 1]and (ii) minimize cell-overlap (greedy farthest-point in cell-set space). The 16 paths cover different regions of the maze.
The result is a global continuous-reward distribution that is approximately uniform on (0, 1], and per-prompt reward variance that is non-negligible.
Dataset summary statistics
- Mazes: 1,299,992 kept / 1,300,000 attempted
- SFT-style (path, prompt) pairs: 19,914,711 of target 20,800,000
- Average paths per maze: 15.32 (target 16)
- L* (BFS optimal): min=28, mean=28.3, max=48
- Path length L: min=28, mean=43.6, max=58
- Continuous reward: mean=0.518, std=0.283 (uniform on (0,1] would give ≈0.5 / 0.289 — close match)
- Reward fraction at 0: 0.000; at 1: 0.054
- Per-prompt reward std: median=0.282, mean=0.249
- Per-prompt reward range (max - min): median=0.875
Format
Maze grid: 17×17, walls = 1, paths = 0. Start fixed at (1, 1), goal at (15, 15). Token vocabulary follows the original maze SFT pipeline:
<bos> GRID_START <grid tokens> GRID_END PATH_START <action tokens> DONE <eos>
where grid tokens are WALL, PATH, START, GOAL, NEWLINE and action
tokens are UP, DOWN, LEFT, RIGHT. The continuous reward used for both
filtering and downstream RL evaluation is
R(L, L*) = max(0, (UB - L) / (UB - L*)) with UB = 60.
Files
| File | Rows | Description |
|---|---|---|
main_1.3M.jsonl |
1,299,992 | Raw build output, 16 paths per maze, full metadata. |
train_random.json |
1,299,736 | SFT-ready, 1 randomly-chosen path per maze. |
train_shortest.json |
1,299,736 | SFT-ready, the lowest-L (≈shortest) path per maze. |
test.json |
256 | 256 held-out mazes, shortest path as ground truth. |
train_random.json and train_shortest.json use the same 1.3M-256 prompts in
the same row order (just with different per-prompt path picks), so SFT runs
on the two files with the same seed see prompts in the same order — making them
a clean apples-to-apples comparison of "diverse paths" vs "shortest only".
Schema
*.json files (SFT format):
{
"sequence": "<bos> GRID_START WALL ... GRID_END PATH_START UP DOWN ... DONE <eos>",
"optimal_path_length": 28, // BFS shortest L*
"path_length": 30, // L of the path in this row
"reward_continuous": 0.938, // (UB - L) / (UB - L*)
"prompt_id": 12345, // unique maze id (== seed)
"sample_id": 0, // index within the maze's 16 paths
"ub": 60, // UB used for reward
"k_frac": 0.21 // wall-knockout fraction for this maze
}
main_1.3M.jsonl (one prompt per line, contains all 16 paths):
{
"prompt_id": 0,
"grid": [[1,1,1,...], ...], // 17×17 ints, 1 = wall
"L_star": 28,
"k_frac": 0.21,
"n_knockouts": 11,
"ub": 60,
"n_samples": 16,
"harvest_pool_size": 56,
"L_std": 9.13,
"L_min": 28, "L_max": 58,
"samples": [
{ "sample_id": 0, "L": 30, "reward_continuous": 0.938, "actions": [0,1,2,...] },
...
]
}
Action ids: 0 = UP, 1 = DOWN, 2 = LEFT, 3 = RIGHT.
Reproducing
The build, conversion, and SFT runs that produced this release live in the
maze_v2/ directory of stablegradients/GOS-17X17-Maze:
# Build the raw dataset (~2h on 128 CPU workers).
python maze_v2/src/build_dataset.py \
--m 1300000 --n 16 --ub 60 --workers 128 \
--out maze_v2/out/main_1.3M.jsonl
# Split + convert to SFT JSON.
python maze_v2/src/to_sft_json.py \
--in_path maze_v2/out/main_1.3M.jsonl \
--out_train maze_v2/out/sft_data/train_random.json \
--out_test maze_v2/out/sft_data/test.json \
--test_prompts 256 --mode random --seed 0
python maze_v2/src/to_sft_json.py \
--in_path maze_v2/out/main_1.3M.jsonl \
--out_train maze_v2/out/sft_data/train_shortest.json \
--out_test maze_v2/out/sft_data/test.json \
--test_prompts 256 --mode shortest --seed 0
Citation
@misc{tajwar2026maximumlikelihoodreinforcementlearning,
title={Maximum Likelihood Reinforcement Learning},
author={Tajwar, Fahim and Zeng, Guanning and Zhou, Yueer and Song, Yuda and Arora, Daman and Jiang, Yiding and Schneider, Jeff and Salakhutdinov, Ruslan and Feng, Haiwen and Zanette, Andrea},
year={2026},
eprint={2602.02710},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2602.02710}
}
- Downloads last month
- 68