Puzzle solving library, written in Rust.
407a3e7555
This allows one to easily build linear constraint equations by writing equations with the tokens. Note that variables will always take integer values, but coefficients may be generalised to support rationals. |
||
---|---|---|
src | ||
tests | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENCE-MIT.txt | ||
README.md |
Puzzle Solver
About
Solve logic puzzles by simply describing the puzzle's rules as constraints. This is suitable for solving puzzles with integer variables such as Sudoku.
Examples
A few example programs are provided in the tests/
directory:
- Sudoku - https://en.wikipedia.org/wiki/Sudoku
- N-queens problem - https://en.wikipedia.org/wiki/Eight_queens_puzzle
To clone this repository, run:
git clone https://github.com/wangds/puzzle-solver.git
Then build the library and run the test programs using Cargo.
cargo test --test sudoku -- --nocapture
Basic Usage
Add Puzzle Solver as a dependency to your project's Cargo.toml:
[dependencies]
puzzle-solver = "0.1"
Documentation
Author
David Wang