mirror of
https://github.com/hanzoai/synth.git
synced 2026-10-30 18:20:12 +00:00
1.5 KiB
1.5 KiB
About
This folder is for generating Minesweeper puzzle questions and answers.
To generate the puzzles, you can run the ./run.sh command.
Folder Structure
./scripts/minesweeper.py: the core logic for generating Minesweeper puzzles../scripts/minesweeper_prompt.py: the prompt templates for generating Minesweeper puzzle questions../scripts/minesweeper_verifier.py: the verifier for validating Minesweeper puzzle solutions../run.sh: a script for generating Minesweeper puzzles with various configurations.
Game Rules
Minesweeper is a logic puzzle where:
- The puzzle consists of an n×n grid with some cells containing hidden mines.
- Some cells are revealed, showing a number that indicates how many mines are present in the 8 adjacent cells (horizontally, vertically, and diagonally).
- Cells marked with "X" are unrevealed and may contain mines.
- The goal is to identify all cells that must contain mines based on the revealed numbers using logical deduction.
- Only one-step logical deduction is required (no guessing or complex multi-step reasoning).
Parameters
The puzzle generator supports the following parameters:
n: Size of the grid (n×n) (default: 8)mine_den: Density of mines in the grid (default: 0.2)reveal_frac: Fraction of non-mine cells to be initially revealed (default: 0.4)num_of_data: Number of puzzles to generate (default: 100)max_attempts: Maximum attempts to generate a valid puzzle (default: 1000)