Puzzle solving library, written in Rust.
abb4cebce3
magicsquare_3x3: 873 -> 63 guesses. magicsquare_4x4: 13475456 -> 539910 guesses (all solutions). sendmoremoney_carry: 154 -> 6 guesses. sendmoremoney_naive: 633681 -> 4 guesses. zebra: 453 -> no guesswork! |
||
---|---|---|
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