https://github.com/flopp/alcazar-gen
SAT-based generator for Alcazar puzzles
https://github.com/flopp/alcazar-gen
generator minisat puzzle sat-solver
Last synced: about 1 year ago
JSON representation
SAT-based generator for Alcazar puzzles
- Host: GitHub
- URL: https://github.com/flopp/alcazar-gen
- Owner: flopp
- License: mit
- Created: 2015-10-07T17:58:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-07T04:12:30.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T12:08:12.639Z (about 1 year ago)
- Topics: generator, minisat, puzzle, sat-solver
- Language: C++
- Homepage:
- Size: 93.8 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alcazar-gen
A SAT-based generator for [Alcazar](http://www.theincrediblecompany.com/alcazar-1/) puzzles.
## Building
1. Install `cmake` and `boost`.
2. Run `make` to compile alcazar-gen
3. done
## Usage
Run `bin/alcazar-gen WIDTH HEIGHT` to generate an Alcazar puzzle with the dimensions `WIDTH x HEIGHT`.
Warning: generating puzzles with size > 5x5 may take a considerable amount of time.
```
Usage: bin/alcazar-gen [OPTIONS]... [WIDTH HEIGHT]
Allowed options:
--help Display this help message
--seed arg Set random seed
--solve Solve generated puzzle
--template arg Generate puzzle using the specified template file
```
## Template Files
You may either specify `WIDTH` and `HEIGHT` or a template file via the option `--template`.
A template file for a `WxH` sized puzzle contains `(2*H+1)` lines with `(2*W+1)` of the following characters:
- `+`: an intersection of wall (just for decoration purposes)
- `.`: a field (just for decoration purposes)
- `|` or `-`: a fixed closed wall position (the generated puzzle will have a wall in this position)
- `/`: a fixed open wall position (the generated puzzle will *not* have a wall in this position)
- `?`: a possible wall position (the generated puzzle may have a wall in this position)
See the file(s) in the `templates` directory for examples.