## About
This folder is for generating Norinori puzzle questions and answers.

To generate the puzzles, you can run the `./run.sh` command.

## Folder Structure
- `./scripts/norinori.py`: the core logic for generating Norinori puzzles.
- `./scripts/norinori_prompt.py`: the prompt templates for generating Norinori puzzle questions.
- `./scripts/norinori_verifier.py`: the verifier for validating Norinori puzzle solutions.
- `./run.sh`: a script for generating Norinori puzzles with various configurations.

## Game Rules
Norinori is a logic puzzle where:
1. The grid is divided into regions of various shapes.
2. The goal is to place dominoes (1×2 or 2×1 rectangles) on the grid.
3. Each region must have exactly two cells covered by dominoes.
4. Dominoes can cross region boundaries.
5. Dominoes cannot share edges (i.e., cannot be orthogonally adjacent), but they can touch diagonally.
6. Cells marked with 'X' are shadow cells that do not belong to any region, but must be part of a domino.

## Parameters
The puzzle generator supports the following parameters:
- `n`: Size of the grid (n×n) (default: 5)
- `min_regions`: Minimum number of regions to divide the grid into (default: 3)
- `max_regions`: Maximum number of regions to divide the grid into (default: 5)
- `shadow_ratio`: Percentage of cells to be marked as shadow cells (default: 0.1)
- `n_samples`: Number of puzzles to generate (default: 100)
- `max_attempts`: Maximum attempts to generate a valid puzzle (default: 1000)

