# Checkers Jumping **Swap N red and N blue checkers on a linear board** --- ## Overview Checkers Jumping is a one-dimensional constraint-satisfaction puzzle that tests sequential reasoning and planning capabilities. The puzzle consists of a linear arrangement of N red checkers (R), N blue checkers (B), and a single empty space (_), forming a board of length 2N + 1. ### Difficulty Rating: ⭐⭐⭐ (Hard - Quadratic Growth) --- ## 📊 Statistics | Metric | Value | |--------|-------| | **Total Puzzles** | 5,700 | | **Total Moves** | 242,494 | | **Training Puzzles (N=1-7)** | 2,700 | | **Test Puzzles (N=8-10)** | 3,000 | | **Difficulty Parameter** | N (checkers per color) | | **Board Length** | 2N + 1 (includes one empty space) | | **Solution Length** | L(N) = **(N+1)² - 1** (quadratic) | | **Transition Locality** | O(N) - directional constraints | --- ## 🎯 Puzzle Rules ### Objective Transform the board from the **initial configuration** (N red checkers, empty space, N blue checkers) to the **goal configuration** where the red and blue groups have swapped positions. ### Initial Configuration (Standard) ``` [R1, R2, ..., RN, _, B1, B2, ..., BN] ``` ### Goal Configuration ``` [B1, B2, ..., BN, _, R1, R2, ..., RN] ``` ### Movement Rules 1. **Slide Movement**: A checker can slide forward into an adjacent empty space 2. **Jump Movement**: A checker can jump forward over exactly one checker of the opposite color to land in an empty space 3. **Directional Constraint**: Checkers cannot move backward toward their starting side - Standard: Red checkers move **right**, blue checkers move **left** - Variant: Direction depends on starting configuration ### Why Checkers Jumping is Challenging 1. **Quadratic Solution Length**: L(N) = (N+1)² - 1 - N=2: 8 moves - N=5: 35 moves - N=7: 63 moves - N=10: **120 moves** 2. **Dead-End Configurations**: Many move sequences lead to unsolvable states - Requires lookahead to avoid traps - Greedy strategies fail 3. **Constrained Move Grammar**: Jump rule only works when specific checker colors are adjacent - Appears in few valid configurations during solving --- ## 📋 State Representation States are represented as **lists of length 2N+1**, where each element is: - `RX`: Red checker X - `BX`: Blue checker X - `_`: Empty space ### Format ```python ['R1', 'B1', '_', 'R2', 'B2'] ``` This represents a board with 2 red and 2 blue checkers: - Position 0: Red checker 1 - Position 1: Blue checker 1 - Position 2: Empty space - Position 3: Red checker 2 - Position 4: Blue checker 2 ### Move Representation ```python ['B1', 1, 2] ``` This represents: **Move blue checker B1 from position 1 to position 2** Format: `[checker_id, source_position, destination_position]` --- ## 🖼️ Example Puzzle ![Checkers Jumping Example](https://github.com/gowravmannem/Recurrent-Reasoning-on-Puzzles/blob/main/assets/checkers_jumping.png?raw=true) ### Example Trajectory (N=2) **Initial State**: `['R1', 'R2', '_', 'B1', 'B2']` **Goal State**: `['B1', 'B2', '_', 'R1', 'R2']` **Blue Direction**: Right (moving from left side) **Optimal Solution Length**: 8 moves ((2+1)² - 1 = 8) **Partial solution (first 4 moves):** | Step | Current State | Next State | Move | Type | |------|--------------|-----------|------|------| | 0 | `['R1','R2','_','B1','B2']` | `['R1','_','R2','B1','B2']` | `['R2',1,2]` | Slide right | | 1 | `['R1','_','R2','B1','B2']` | `['R1','B1','R2','_','B2']` | `['B1',3,1]` | Jump over R2 | | 2 | `['R1','B1','R2','_','B2']` | `['R1','B1','R2','B2','_']` | `['B2',4,3]` | Slide left | | 3 | `['R1','B1','R2','B2','_']` | `['R1','B1','_','B2','R2']` | `['R2',2,4]` | Jump over B2 | | ... | ... | ... | ... | ... | --- ## 📁 CSV Column Descriptions ### Columns | Column | Type | Description | |--------|------|-------------| | `N` | int | Number of checkers per color (difficulty parameter) | | `start_state` | string | Initial board configuration | | `goal_state` | string | Target board configuration | | `blue_direction` | string | Direction blue checkers move ('Right' or 'Left') | | `current_state` | string | Board state before this move | | `next_state` | string | Board state after applying this move | | `move` | string | Action taken: `[checker_id, source_pos, dest_pos]` | ### Data Format Each row represents one **move** in a solution trajectory. **Example CSV rows:** ```csv N,start_state,goal_state,blue_direction,current_state,next_state,move 2,"['R1','R2','_','B1','B2']","['B1','B2','_','R1','R2']",Right,"['R1','R2','_','B1','B2']","['R1','_','R2','B1','B2']","['R2',1,2]" 2,"['R1','R2','_','B1','B2']","['B1','B2','_','R1','R2']",Right,"['R1','_','R2','B1','B2']","['R1','B1','R2','_','B2']","['B1',3,1]" ``` --- ## 💡 Usage Tips ### For Model Training ⚠️ **Warning**: Checkers Jumping is very difficult for sequence models. Potential approaches: 1. **Add lookahead signals**: Explicitly mark moves that lead to dead-ends 2. **State value estimation**: Train a critic to estimate "solvability" from state 3. **Search augmentation**: Use beam search with constraint checking 4. **Curriculum with filtering**: Only train on near-optimal paths, filter dead-ends ### For Evaluation ```python from datasets import load_dataset # Load Checkers Jumping dataset = load_dataset("gmannem/RecurrReason", "checkers_jumping") def evaluate_checkers(model, example): """ Evaluation must detect dead-end configurations. """ current = example['start_state'] goal = example['goal_state'] blue_dir = example['blue_direction'] visited = set() steps = 0 max_steps = 2 * ((example['N'] + 1)**2 - 1) while steps < max_steps: next_state = model.predict(current, goal) # Check move validity if not is_valid_move(current, next_state, blue_dir): return "INVALID_MOVE", steps # Check for loops if next_state in visited: return "LOOP", steps # Check if dead-end (unsolvable from this state) if is_dead_end(next_state, goal): return "DEAD_END", steps if next_state == goal: return "SUCCESS", steps visited.add(next_state) current = next_state steps += 1 return "TIMEOUT", steps def is_valid_move(current, next_state, blue_dir): """ Verify: 1. Only one checker moved 2. Moved in allowed direction (based on color and blue_dir) 3. Either slid 1 position or jumped over opposite color """ # Implementation depends on detailed rule checking pass def is_dead_end(state, goal): """ BFS from state to check if goal is reachable. Expensive but necessary for true evaluation. """ # Run BFS search pass ``` --- ## 📚 References **Main Paper:** ```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} } ``` **Original Puzzle Introduction:** ```bibtex @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} } ``` --- [← Back to Main README](README.md)