File size: 10,245 Bytes
69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 69aaa96 5266261 4a53451 dfe5510 69aaa96 5266261 69aaa96 5266261 479fd9b 5266261 479fd9b 5266261 e39754d 5266261 b0b1d8f 5266261 479fd9b 5266261 b0b1d8f 5266261 b0b1d8f 5266261 b0b1d8f 5266261 b0b1d8f 5266261 b0b1d8f 5266261 b0b1d8f 5266261 b0b1d8f 5266261 e39754d 5266261 e39754d 5266261 b0b1d8f 5266261 479fd9b 5266261 e39754d 5266261 479fd9b 5266261 b0b1d8f 5266261 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | ---
license: cc-by-4.0
task_categories:
- text-generation
- question-answering
language:
- en
tags:
- reasoning
- planning
- symbolic-reasoning
- algorithmic-reasoning
- benchmark
- length-generalization
size_categories:
- 100K<n<1M
configs:
- config_name: block_world
data_files:
- split: train
path: "Block World/*_train_1_7.csv"
- split: test
path: "Block World/*_test_8_10.csv"
- config_name: checkers_jumping
data_files:
- split: train
path: "Checkers Jumping/*_train_1_7.csv"
- split: test
path: "Checkers Jumping/*_test_8_10.csv"
- config_name: tower_of_hanoi
data_files:
- split: train
path: "Tower of Hanoi/*_train_1_7.csv"
- split: test
path: "Tower of Hanoi/*_test_8_10.csv"
- split: all_1_to_20
path: "Tower of Hanoi/*_all_1_20.csv"
- config_name: river_crossing
data_files:
- split: train
path: "River Crossing/*_train_1_7.csv"
- split: test
path: "River Crossing/*_test_8_10.csv"
pretty_name: RecurrReason
---
<div align="center">
# RecurrReason: Recurrent Reasoning on Symbolic Puzzles
**A difficulty-controlled benchmark for evaluating multi-step reasoning in language models**
[](https://openreview.net/forum?id=ErgAON9dOW)
[](https://github.com/gowravmannem/Recurrent-Reasoning-on-Puzzles)
[](https://creativecommons.org/licenses/by/4.0/)
[](https://huggingface.co/datasets/gmannem/RecurrReason)
</div>
---
## π Table of Contents
- [Overview](#overview)
- [Dataset Structure](#dataset-structure)
- [Puzzles](#puzzles)
- [Quick Start](#quick-start)
- [Citation](#citation)
- [License](#license)
---
## π― 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](BLOCK_WORLD.md)** | ββ | O(N) | O(1) | 849 | 5,827 |
| **[Checkers Jumping](CHECKERS_JUMPING.md)** | βββ | (N+1)Β²β1 | O(N) | 5,700 | 242,494 |
| **[Tower of Hanoi](TOWER_OF_HANOI.md)** | βββββ | 2^Nβ1 | O(N) | 60 | 12,216 |
| **[River Crossing](RIVER_CROSSING.md)** | ββββ | 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
<details>
<summary><b>Block World</b> - Rearrange blocks in stacks</summary>
**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](BLOCK_WORLD.md)
</details>
<details>
<summary><b>Checkers Jumping</b> - Swap red and blue checkers</summary>
**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](CHECKERS_JUMPING.md)
</details>
<details>
<summary><b>Tower of Hanoi</b> - Transfer disks between pegs</summary>
**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](TOWER_OF_HANOI.md)
</details>
<details>
<summary><b>River Crossing</b> - Transport agents safely</summary>
**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](RIVER_CROSSING.md)
</details>
---
## π Quick Start
### Installation
```bash
pip install datasets
```
### Loading the Dataset
```python
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
```python
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
```python
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](https://openreview.net/forum?id=ErgAON9dOW)
π [PDF](https://openreview.net/pdf?id=ErgAON9dOW)
π [GitHub Repository](https://github.com/gowravmannem/Recurrent-Reasoning-on-Puzzles)
---
## π 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.
```bibtex
@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](https://github.com/gowravmannem/Recurrent-Reasoning-on-Puzzles/issues)
2. Use the "Discussions" tab on HuggingFace
3. Contact us at: gowravmannem@gmail.com
---
<div align="center">
**Built with β€οΈ for the AI reasoning research community**
</div> |