Dataset Viewer
Auto-converted to Parquet Duplicate
puzzle_id
int64
1
549
N
int64
1
7
K
int64
3
3
start_state
stringclasses
361 values
goal_state
stringclasses
365 values
current_state
stringlengths
13
36
next_state
stringlengths
13
36
move
stringclasses
43 values
num_moves
int64
1
13
1
1
3
[[],['A'],[]]
[['A'],[],[]]
[[],['A'],[]]
[['A'],[],[]]
['A',1,0]
1
1
1
3
[[],['A'],[]]
[['A'],[],[]]
[['A'],[],[]]
[['A'],[],[]]
[_,_,_]
1
2
1
3
[[],[],['A']]
[[],['A'],[]]
[[],[],['A']]
[[],['A'],[]]
['A',2,1]
1
2
1
3
[[],[],['A']]
[[],['A'],[]]
[[],['A'],[]]
[[],['A'],[]]
[_,_,_]
1
3
1
3
[[],['A'],[]]
[[],[],['A']]
[[],['A'],[]]
[[],[],['A']]
['A',1,2]
1
3
1
3
[[],['A'],[]]
[[],[],['A']]
[[],[],['A']]
[[],[],['A']]
[_,_,_]
1
4
1
3
[[],[],['A']]
[['A'],[],[]]
[[],[],['A']]
[['A'],[],[]]
['A',2,0]
1
4
1
3
[[],[],['A']]
[['A'],[],[]]
[['A'],[],[]]
[['A'],[],[]]
[_,_,_]
1
5
1
3
[['A'],[],[]]
[[],['A'],[]]
[['A'],[],[]]
[[],['A'],[]]
['A',0,1]
1
5
1
3
[['A'],[],[]]
[[],['A'],[]]
[[],['A'],[]]
[[],['A'],[]]
[_,_,_]
1
6
1
3
[['A'],[],[]]
[[],[],['A']]
[['A'],[],[]]
[[],[],['A']]
['A',0,2]
1
6
1
3
[['A'],[],[]]
[[],[],['A']]
[[],[],['A']]
[[],[],['A']]
[_,_,_]
1
7
2
3
[[],['A'],['B']]
[['B'],[],['A']]
[[],['A'],['B']]
[['B'],['A'],[]]
['B',2,0]
2
7
2
3
[[],['A'],['B']]
[['B'],[],['A']]
[['B'],['A'],[]]
[['B'],[],['A']]
['A',1,2]
2
7
2
3
[[],['A'],['B']]
[['B'],[],['A']]
[['B'],[],['A']]
[['B'],[],['A']]
[_,_,_]
2
8
2
3
[[],['B'],['A']]
[['A'],[],['B']]
[[],['B'],['A']]
[['A'],['B'],[]]
['A',2,0]
2
8
2
3
[[],['B'],['A']]
[['A'],[],['B']]
[['A'],['B'],[]]
[['A'],[],['B']]
['B',1,2]
2
8
2
3
[[],['B'],['A']]
[['A'],[],['B']]
[['A'],[],['B']]
[['A'],[],['B']]
[_,_,_]
2
9
2
3
[['A','B'],[],[]]
[['B'],['A'],[]]
[['A','B'],[],[]]
[['A'],[],['B']]
['B',0,2]
3
9
2
3
[['A','B'],[],[]]
[['B'],['A'],[]]
[['A'],[],['B']]
[[],['A'],['B']]
['A',0,1]
3
9
2
3
[['A','B'],[],[]]
[['B'],['A'],[]]
[[],['A'],['B']]
[['B'],['A'],[]]
['B',2,0]
3
9
2
3
[['A','B'],[],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[_,_,_]
3
10
2
3
[['A','B'],[],[]]
[['A'],['B'],[]]
[['A','B'],[],[]]
[['A'],['B'],[]]
['B',0,1]
1
10
2
3
[['A','B'],[],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
1
11
2
3
[['A'],[],['B']]
[['A'],['B'],[]]
[['A'],[],['B']]
[['A'],['B'],[]]
['B',2,1]
1
11
2
3
[['A'],[],['B']]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
1
12
2
3
[['B'],[],['A']]
[['A'],['B'],[]]
[['B'],[],['A']]
[[],['B'],['A']]
['B',0,1]
2
12
2
3
[['B'],[],['A']]
[['A'],['B'],[]]
[[],['B'],['A']]
[['A'],['B'],[]]
['A',2,0]
2
12
2
3
[['B'],[],['A']]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
2
13
2
3
[['A'],['B'],[]]
[[],['A','B'],[]]
[['A'],['B'],[]]
[['A'],[],['B']]
['B',1,2]
3
13
2
3
[['A'],['B'],[]]
[[],['A','B'],[]]
[['A'],[],['B']]
[[],['A'],['B']]
['A',0,1]
3
13
2
3
[['A'],['B'],[]]
[[],['A','B'],[]]
[[],['A'],['B']]
[[],['A','B'],[]]
['B',2,1]
3
13
2
3
[['A'],['B'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[_,_,_]
3
14
2
3
[[],['A','B'],[]]
[['A'],['B'],[]]
[[],['A','B'],[]]
[[],['A'],['B']]
['B',1,2]
3
14
2
3
[[],['A','B'],[]]
[['A'],['B'],[]]
[[],['A'],['B']]
[['A'],[],['B']]
['A',1,0]
3
14
2
3
[[],['A','B'],[]]
[['A'],['B'],[]]
[['A'],[],['B']]
[['A'],['B'],[]]
['B',2,1]
3
14
2
3
[[],['A','B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
3
15
2
3
[['B'],[],['A']]
[['A'],[],['B']]
[['B'],[],['A']]
[[],['B'],['A']]
['B',0,1]
3
15
2
3
[['B'],[],['A']]
[['A'],[],['B']]
[[],['B'],['A']]
[['A'],['B'],[]]
['A',2,0]
3
15
2
3
[['B'],[],['A']]
[['A'],[],['B']]
[['A'],['B'],[]]
[['A'],[],['B']]
['B',1,2]
3
15
2
3
[['B'],[],['A']]
[['A'],[],['B']]
[['A'],[],['B']]
[['A'],[],['B']]
[_,_,_]
3
16
2
3
[['B'],['A'],[]]
[[],['A'],['B']]
[['B'],['A'],[]]
[[],['A'],['B']]
['B',0,2]
1
16
2
3
[['B'],['A'],[]]
[[],['A'],['B']]
[[],['A'],['B']]
[[],['A'],['B']]
[_,_,_]
1
17
2
3
[[],[],['A','B']]
[[],['A','B'],[]]
[[],[],['A','B']]
[['B'],[],['A']]
['B',2,0]
3
17
2
3
[[],[],['A','B']]
[[],['A','B'],[]]
[['B'],[],['A']]
[['B'],['A'],[]]
['A',2,1]
3
17
2
3
[[],[],['A','B']]
[[],['A','B'],[]]
[['B'],['A'],[]]
[[],['A','B'],[]]
['B',0,1]
3
17
2
3
[[],[],['A','B']]
[[],['A','B'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[_,_,_]
3
18
2
3
[['A','B'],[],[]]
[[],[],['A','B']]
[['A','B'],[],[]]
[['A'],['B'],[]]
['B',0,1]
3
18
2
3
[['A','B'],[],[]]
[[],[],['A','B']]
[['A'],['B'],[]]
[[],['B'],['A']]
['A',0,2]
3
18
2
3
[['A','B'],[],[]]
[[],[],['A','B']]
[[],['B'],['A']]
[[],[],['A','B']]
['B',1,2]
3
18
2
3
[['A','B'],[],[]]
[[],[],['A','B']]
[[],[],['A','B']]
[[],[],['A','B']]
[_,_,_]
3
19
2
3
[['A'],['B'],[]]
[['A','B'],[],[]]
[['A'],['B'],[]]
[['A','B'],[],[]]
['B',1,0]
1
19
2
3
[['A'],['B'],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[_,_,_]
1
20
2
3
[[],[],['A','B']]
[['B'],[],['A']]
[[],[],['A','B']]
[['B'],[],['A']]
['B',2,0]
1
20
2
3
[[],[],['A','B']]
[['B'],[],['A']]
[['B'],[],['A']]
[['B'],[],['A']]
[_,_,_]
1
21
2
3
[['B'],['A'],[]]
[[],['A','B'],[]]
[['B'],['A'],[]]
[[],['A','B'],[]]
['B',0,1]
1
21
2
3
[['B'],['A'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[_,_,_]
1
22
2
3
[['B'],['A'],[]]
[['A','B'],[],[]]
[['B'],['A'],[]]
[[],['A'],['B']]
['B',0,2]
3
22
2
3
[['B'],['A'],[]]
[['A','B'],[],[]]
[[],['A'],['B']]
[['A'],[],['B']]
['A',1,0]
3
22
2
3
[['B'],['A'],[]]
[['A','B'],[],[]]
[['A'],[],['B']]
[['A','B'],[],[]]
['B',2,0]
3
22
2
3
[['B'],['A'],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[_,_,_]
3
23
2
3
[[],['B'],['A']]
[['A'],['B'],[]]
[[],['B'],['A']]
[['A'],['B'],[]]
['A',2,0]
1
23
2
3
[[],['B'],['A']]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
1
24
2
3
[['A','B'],[],[]]
[[],['A','B'],[]]
[['A','B'],[],[]]
[['A'],[],['B']]
['B',0,2]
3
24
2
3
[['A','B'],[],[]]
[[],['A','B'],[]]
[['A'],[],['B']]
[[],['A'],['B']]
['A',0,1]
3
24
2
3
[['A','B'],[],[]]
[[],['A','B'],[]]
[[],['A'],['B']]
[[],['A','B'],[]]
['B',2,1]
3
24
2
3
[['A','B'],[],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[[],['A','B'],[]]
[_,_,_]
3
25
2
3
[[],['A'],['B']]
[['A','B'],[],[]]
[[],['A'],['B']]
[['A'],[],['B']]
['A',1,0]
2
25
2
3
[[],['A'],['B']]
[['A','B'],[],[]]
[['A'],[],['B']]
[['A','B'],[],[]]
['B',2,0]
2
25
2
3
[[],['A'],['B']]
[['A','B'],[],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[_,_,_]
2
26
2
3
[[],['B'],['A']]
[[],['A'],['B']]
[[],['B'],['A']]
[['B'],[],['A']]
['B',1,0]
3
26
2
3
[[],['B'],['A']]
[[],['A'],['B']]
[['B'],[],['A']]
[['B'],['A'],[]]
['A',2,1]
3
26
2
3
[[],['B'],['A']]
[[],['A'],['B']]
[['B'],['A'],[]]
[[],['A'],['B']]
['B',0,2]
3
26
2
3
[[],['B'],['A']]
[[],['A'],['B']]
[[],['A'],['B']]
[[],['A'],['B']]
[_,_,_]
3
27
2
3
[[],['A','B'],[]]
[['A','B'],[],[]]
[[],['A','B'],[]]
[[],['A'],['B']]
['B',1,2]
3
27
2
3
[[],['A','B'],[]]
[['A','B'],[],[]]
[[],['A'],['B']]
[['A'],[],['B']]
['A',1,0]
3
27
2
3
[[],['A','B'],[]]
[['A','B'],[],[]]
[['A'],[],['B']]
[['A','B'],[],[]]
['B',2,0]
3
27
2
3
[[],['A','B'],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[_,_,_]
3
28
2
3
[[],['A','B'],[]]
[[],['A'],['B']]
[[],['A','B'],[]]
[[],['A'],['B']]
['B',1,2]
1
28
2
3
[[],['A','B'],[]]
[[],['A'],['B']]
[[],['A'],['B']]
[[],['A'],['B']]
[_,_,_]
1
29
2
3
[['A'],[],['B']]
[['B'],['A'],[]]
[['A'],[],['B']]
[[],['A'],['B']]
['A',0,1]
2
29
2
3
[['A'],[],['B']]
[['B'],['A'],[]]
[[],['A'],['B']]
[['B'],['A'],[]]
['B',2,0]
2
29
2
3
[['A'],[],['B']]
[['B'],['A'],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[_,_,_]
2
30
2
3
[['A'],[],['B']]
[['A','B'],[],[]]
[['A'],[],['B']]
[['A','B'],[],[]]
['B',2,0]
1
30
2
3
[['A'],[],['B']]
[['A','B'],[],[]]
[['A','B'],[],[]]
[['A','B'],[],[]]
[_,_,_]
1
31
2
3
[['B'],['A'],[]]
[[],[],['A','B']]
[['B'],['A'],[]]
[['B'],[],['A']]
['A',1,2]
2
31
2
3
[['B'],['A'],[]]
[[],[],['A','B']]
[['B'],[],['A']]
[[],[],['A','B']]
['B',0,2]
2
31
2
3
[['B'],['A'],[]]
[[],[],['A','B']]
[[],[],['A','B']]
[[],[],['A','B']]
[_,_,_]
2
32
2
3
[[],[],['A','B']]
[['A'],['B'],[]]
[[],[],['A','B']]
[[],['B'],['A']]
['B',2,1]
2
32
2
3
[[],[],['A','B']]
[['A'],['B'],[]]
[[],['B'],['A']]
[['A'],['B'],[]]
['A',2,0]
2
32
2
3
[[],[],['A','B']]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
2
33
2
3
[['B'],['A'],[]]
[['A'],['B'],[]]
[['B'],['A'],[]]
[[],['A'],['B']]
['B',0,2]
3
33
2
3
[['B'],['A'],[]]
[['A'],['B'],[]]
[[],['A'],['B']]
[['A'],[],['B']]
['A',1,0]
3
33
2
3
[['B'],['A'],[]]
[['A'],['B'],[]]
[['A'],[],['B']]
[['A'],['B'],[]]
['B',2,1]
3
33
2
3
[['B'],['A'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[['A'],['B'],[]]
[_,_,_]
3
34
2
3
[[],['A','B'],[]]
[['B'],['A'],[]]
[[],['A','B'],[]]
[['B'],['A'],[]]
['B',1,0]
1
34
2
3
[[],['A','B'],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[_,_,_]
1
35
2
3
[['B'],[],['A']]
[['B'],['A'],[]]
[['B'],[],['A']]
[['B'],['A'],[]]
['A',2,1]
1
35
2
3
[['B'],[],['A']]
[['B'],['A'],[]]
[['B'],['A'],[]]
[['B'],['A'],[]]
[_,_,_]
1
36
2
3
[['A','B'],[],[]]
[['B'],[],['A']]
[['A','B'],[],[]]
[['A'],['B'],[]]
['B',0,1]
3
End of preview. Expand in Data Studio

RecurrReason: Recurrent Reasoning on Symbolic Puzzles

A difficulty-controlled benchmark for evaluating multi-step reasoning in language models

Paper GitHub License HuggingFace


πŸ“‹ Table of Contents


🎯 Overview

RecurrReason is a benchmark of four recurrent logic puzzles with optimal trajectories and controlled difficulty scaling (N=1 to 10). It tests whether language models can:

  • Find optimal (minimal-length) solutions
  • Produce valid intermediate steps
  • Generalize to harder out-of-distribution instances
Metric Value
Total Puzzles 10,817
Total Moves 285,933
Puzzle Types 4
Difficulty Range N=1 to 10

Current reasoning benchmarks often test only final answer correctness. RecurrReason evaluates:

  • Move validity: Are all intermediate steps legal?
  • Optimality: Is the solution minimal-length?
  • Length generalization: Does performance hold on longer sequences?

πŸ“Š Dataset Structure

Data Splits

Split N Range Purpose
Train N=1-7 In-distribution training data
Test (OOD) N=8-10 Out-of-distribution evaluation

Note: We provide train and test splits. Users can create their own validation split from the training data if needed.

File Structure

RecurrReason/
β”œβ”€β”€ Block World/
β”‚   β”œβ”€β”€ bw_train_1_7.csv
β”‚   └── bw_test_8_10.csv
β”œβ”€β”€ Checkers Jumping/
β”‚   β”œβ”€β”€ cj_train_1_7.csv
β”‚   └── cj_test_8_10.csv
β”œβ”€β”€ Tower of Hanoi/
β”‚   β”œβ”€β”€ toh_train_1_7.csv
β”‚   └── toh_test_8_10.csv
β”œβ”€β”€ River Crossing/
β”‚   β”œβ”€β”€ rc_train_1_7.csv
β”‚   └── rc_test_8_10.csv
└── README.md (this file)

🧩 Puzzles

RecurrReason contains four diverse logic puzzles with different structural properties:

Puzzle Difficulty Solution Length Transition Locality Puzzles Moves
Block World ⭐⭐ O(N) O(1) 849 5,827
Checkers Jumping ⭐⭐⭐ (N+1)Β²βˆ’1 O(N) 5,700 242,494
Tower of Hanoi ⭐⭐⭐⭐⭐ 2^Nβˆ’1 O(N) 60 12,216
River Crossing ⭐⭐⭐⭐ Variable O(N) global 4,208 25,396

Click on each puzzle name for detailed documentation including:

  • Puzzle rules and constraints
  • State representation format
  • Example trajectories
  • Column descriptions

Quick Puzzle Descriptions

Block World - Rearrange blocks in stacks

Goal: Move blocks from initial configuration to target configuration.

Rules:

  • Only top block of a stack can be moved
  • Can place on empty stack or on top of another block

Why interesting: O(1) transition locality makes it learnable and tests dependency reasoning.

β†’ Full documentation

Checkers Jumping - Swap red and blue checkers

Goal: Swap N red and N blue checkers on a 1D board with one empty space between them.

Rules:

  • Red moves only right, blue only left (and vice versa based on starting configuration)
  • Can slide to adjacent empty space or jump over opposite color

Why interesting: Quadratic solution length and tests avoiding dead-end configurations.

β†’ Full documentation

Tower of Hanoi - Transfer disks between pegs

Goal: Move N disks from source peg to target peg across 3 pegs.

Rules:

  • Move one disk at a time
  • Only topmost disk can be moved
  • Larger disk cannot be on top of a smaller disk

Why interesting: Exponential solution length (2^Nβˆ’1). It is a classic recursive problem.

β†’ Full documentation

River Crossing - Transport agents safely

Goal: Transport N actor-agent pairs across river using boat with capacity k.

Rules:

  • Boat holds at most k individuals
  • Actor aα΅’ cannot be with agent Aβ±Ό (jβ‰ i) unless agent Aα΅’ is present

Why interesting: Global O(N) constraint verification and tests constraint satisfaction.

β†’ Full documentation


πŸš€ Quick Start

Installation

pip install datasets

Loading the Dataset

from datasets import load_dataset

# Load a specific puzzle
dataset = load_dataset("gmannem/RecurrReason", "block_world")

# Access splits
train_data = dataset["train"]  # N=1-7
test_data = dataset["test"]    # N=8-10 (OOD)

# Iterate over examples
for example in train_data:
    print(f"Difficulty N={example['N']}")
    print(f"Current state: {example['current_state']}")
    print(f"Next state: {example['next_state']}")
    print(f"Move: {example['move']}")
    print("---")
    break

Loading All Puzzles

from datasets import load_dataset

puzzles = ["block_world", "checkers_jumping", "tower_of_hanoi", "river_crossing"]

datasets = {
    puzzle: load_dataset("gmannem/RecurrReason", puzzle)
    for puzzle in puzzles
}

# Access specific puzzle
bw_train = datasets["block_world"]["train"]

Example: Evaluating a Model

from datasets import load_dataset

# Load test data (OOD, N=8-10)
test_data = load_dataset("gmannem/RecurrReason", "block_world", split="test")

def evaluate_model(model, test_data):
    """
    Evaluate model on RecurrReason benchmark.
    
    Metrics:
    - Success rate: % of puzzles solved correctly
    - Move validity: % of generated moves that are legal
    - Optimality gap: (model_length - optimal_length) / optimal_length
    """
    success_count = 0
    
    for example in test_data:
        # Your model prediction logic here
        predicted_next_state = model.predict(
            current_state=example['current_state'],
            goal_state=example['goal_state']
        )
        
        # Check if prediction matches ground truth
        if predicted_next_state == example['next_state']:
            success_count += 1
    
    success_rate = success_count / len(test_data)
    print(f"Success Rate: {success_rate:.2%}")
    
    return success_rate

πŸ“„ Paper & Code

"Recurrent Reasoning on Symbolic Puzzles with Sequence Models"
Gowrav Mannem, Chowdhury Marzia Mahjabin, Jason Chen, Shivank Garg, Kevin Zhu
ICLR 2026 Workshop on Logical Reasoning of Large Language Models

πŸ”— Read on OpenReview

πŸ“„ PDF

πŸ”— GitHub Repository


πŸ“– Citation

If you use RecurrReason in your research, please cite the following papers. This benchmark extends the puzzles introduced by Shojaee et al. (2025) with BFS-optimal trajectories, permutation augmentations, and systematic difficulty scaling.

@inproceedings{mannem2026recurrent,
  title={Recurrent Reasoning on Symbolic Puzzles with Sequence Models},
  author={Gowrav Mannem and Chowdhury Marzia Mahjabin and Jason Chen and Shivank Garg and Kevin Zhu},
  booktitle={ICLR 2026 Workshop on Logical Reasoning of Large Language Models},
  year={2026},
  url={https://openreview.net/forum?id=ErgAON9dOW}
}
@article{shojaee2025illusion,
  title={The illusion of thinking: Understanding the strengths and limitations of reasoning models via the lens of problem complexity},
  author={Shojaee, Parshin and Mirzadeh, Iman and Alizadeh, Keivan and Horton, Maxwell and Bengio, Samy and Farajtabar, Mehrdad},
  journal={arXiv preprint arXiv:2506.06941},
  year={2025}
}

πŸ“œ License

This dataset is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

You are free to:

  • Share β€” copy and redistribute the dataset
  • Adapt β€” remix, transform, and build upon the dataset
  • For any purpose, even commercially

Under the following terms:

  • Attribution β€” You must give appropriate credit by citing our paper

Full license text: https://creativecommons.org/licenses/by/4.0/


🀝 Contributing

Found an issue or have suggestions? Please:

  1. Open an issue on GitHub
  2. Use the "Discussions" tab on HuggingFace
  3. Contact us at: gowravmannem@gmail.com

**Built with ❀️ for the AI reasoning research community**
Downloads last month
84

Paper for gmannem/RecurrReason