An implementation of Norvig's sudoku solver in Erlang
Find a file
2013-02-09 21:51:20 +02:00
priv Move input files to priv dir 2013-02-04 16:25:57 +02:00
src Allow the binary result of file:read_file to be solved 2013-02-09 21:51:20 +02:00
.gitignore .gitignore 2013-02-04 16:27:10 +02:00
README.txt README update 2013-02-05 13:45:37 +02:00
rebar Add rebar 2013-02-04 16:19:48 +02:00
rebar.config Allow the binary result of file:read_file to be solved 2013-02-09 21:51:20 +02:00
sudoku Move unit tests into sudoku module to get rid of export_all 2013-02-05 13:38:20 +02:00

This is an Erlang version of a sudoku solver, mostly based on the
solution by Peter Norvig.
For comparison, see my slightly modified version of Norvig's Python code:
https://github.com/apauley/sudoku-by-norvig

To try it out, simply compile and run the sudoku script:
$ ./rebar compile
$ ./sudoku

The solution for file.txt will be saved as file.out in your current directory.

You will need to have Erlang installed with escript in your path.

To only run the tests:
$ ./sudoku runtests

To solve the sample files without running tests:
$ ./sudoku solve

To solve a specific file (e.g. hardest.txt):
$ ./sudoku solve hardest.txt