mirror of
https://github.com/hanzoai/synth.git
synced 2026-10-30 18:20:12 +00:00
About
This folder is for generating Number Wall puzzle questions and answers.
To generate the puzzles, you can run the ./run.sh command.
Folder Structure
./scripts/number_wall.py: the core logic for generating Number Wall puzzles../scripts/number_wall_prompt.py: the prompt templates for generating Number Wall puzzle questions../scripts/number_wall_verifier.py: the verifier for validating Number Wall puzzle solutions../run.sh: a script for generating Number Wall puzzles with various configurations.
Game Rules
Number Wall is a logic puzzle where:
- The grid must be divided into islands by placing walls (marked as 'A').
- Each island must contain exactly one number.
- The total number of cells in an island (including the number cell) must equal the value of that number.
- All cells within an island must be connected horizontally or vertically.
- Walls (marked as 'A') cannot form 2×2 or larger continuous rectangles.
- All islands must be separated by walls, with no diagonal connections between islands.
Parameters
The puzzle generator supports the following parameters:
n: Size of the grid (default: 5)number_rate: Probability of placing a number in the grid (default: 0.2)num_of_data: Number of puzzles to generate (default: 100)max_attempts: Maximum attempts to generate a valid puzzle (default: 1000)
PASSRATE
Current pass rates with deepseek-reasoner:
- 3×3 grid, number_rate=0.2: 0.6
- 3×3 grid, number_rate=0.25: 0.7
- 4×4 grid, number_rate=0.2: 0.2
- 4×4 grid, number_rate=0.25: 0.2
- 5×5 grid, number_rate=0.15: 0.2
- 5×5 grid, number_rate=0.2: 0.2
- 5×5 grid, number_rate=0.25: 0