Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yugr/sudoku
A simple Sudoku solver that I've done to experiment with SAT/SMT solvers.
https://github.com/yugr/sudoku
haskell minisat sudoku
Last synced: about 5 hours ago
JSON representation
A simple Sudoku solver that I've done to experiment with SAT/SMT solvers.
- Host: GitHub
- URL: https://github.com/yugr/sudoku
- Owner: yugr
- License: mit
- Created: 2015-12-05T16:04:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-13T21:02:36.000Z (over 8 years ago)
- Last Synced: 2023-03-08T22:25:49.470Z (over 1 year ago)
- Topics: haskell, minisat, sudoku
- Language: Haskell
- Size: 31.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Overview
A simple Sudoku solver that I've done to experiment with SAT/SMT solvers.
It currently only runs for boards up to 36x36 (k = 6).
For anything bigger, MiniSAT chokes anyway.# Build
THIS WAS ONLY TESTED ON CYGWIN!!!
Install Haskell Platform and do
```
$ make clean all -j4
$ make check
```
To profile, export PROFILE=1 and rebuild.# Investigation TODO
* plot timing graphs (time vs. #constraints, #constraints vs. #vars)
* see how rule order influences MiniSAT timing:
* randomize
* spatial (rules for ij go together)
* find all solutions (plot graph number-of-sols vs. percentage)
* experiment with different encodings:
* Sudoku as a SAT Problem (http://anytime.cs.umass.edu/aimath06/proceedings/P34.pdf)
* A SAT-based Sudoku Solver (https://www.lri.fr/~conchon/mpri/weber.pdf)
* Optimized CNF Encoding for Sudoku Puzzles (http://www.cs.cmu.edu/~hjain/papers/sudoku-as-SAT.pdf)
* see how Haskell people do interfaces to MiniSAT or other external solvers (and how they cope with big CNFs)
* experiment with SMT solvers
* find all solutions# Code TODO
* pass several lists to CNF instead of one (this should speed things up because we won't copy data when concatting rules)
* store temp files to separate folder
* Haskell coding style
* write Haddocks
* run for inputs up to 100x100 (k=10); ideas:
* understand where is all the memory going to
* generate all rules for each cell in one function
* use streams