https://github.com/regb/cafedoku
Sudoku solver based on the CafeSat solver
https://github.com/regb/cafedoku
Last synced: 8 months ago
JSON representation
Sudoku solver based on the CafeSat solver
- Host: GitHub
- URL: https://github.com/regb/cafedoku
- Owner: regb
- Created: 2014-12-09T14:46:36.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-26T09:32:08.000Z (almost 11 years ago)
- Last Synced: 2025-01-15T05:44:41.105Z (over 1 year ago)
- Language: Scala
- Size: 148 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cafedoku
========
Cafedoku is a [sudoku](http://en.wikipedia.org/wiki/Sudoku) solver written in
Scala and based on the [CafeSat](https://github.com/regb/scabolic) SAT solver.
CafeDoku is a very simple project, with limited ambitions, mostly to experiment
with CafeSat as a Scala library.
The core solving part is in [`Solver`](/src/main/scala/cafedoku/Solver.scala) and
consists of about 10 lines of code. It illustrates how to elegantly solve sudoku
problems by encoding to SAT and how to use CafeSat to solve the SAT instance.
Usage
-----
You can build Cafedoku using `sbt`:
sbt cafedoku
sbt will then generate a `target/cafedoku` script that you can use to run Cafedoku in
command line mode:
./target/cafedoku INPUT
`INPUT` is a data file representing a sudoku problem. You can find examples
in the `examples/` directory. Try:
./target/cafedoku examples/sudoku1.dat