1.2 KiB
Sudoku Solver
Figured it would be fun to try making a sudoku solver. I haven't read
any prior art as of yet, though I might at some point to improve
this. I found this
dataset to use for
testing and benchmarking; it contains 9 million puzzles. I haven't
included the dataset in this repository as it's quite big (around 1.4
GiB), but you can download the archive from the above link and place
the extracted sudoku.csv
in the root of this repo and it should
work.
Building
The program is built with make(1)
:
make # or 'make sudoku'
Preparation of Puzzles File
I did some pre-processing of the downloaded sudoku.csv
file to
reduce the workload of the solver, extracting just the puzzles (the
CSV contains the solutions too) and removing the newlines.
make puzzles
Preparation of Results File
The results file must exist and be of the right size in order for the program to run successfully.
make results
Running
The program can be ran through the Makefile, which will ensure the binary is built and the puzzles and results files have been prepared:
make run
Or it can of course be ran directly:
./sudoku