Sudoku Solver

Maybe somebody will write up how our solver works, with the key functions and their types. Meanwhile we have

  • Grid.hs, a basic representation of a Sudoku grid, together with functions to extract rows, columns, and blocks. (Thanks Andrew)

  • Solve.hs, containing the key functions improve and extend, which we built together.

  • Main.hs which solves a simple Sudoku from Wikipedia.

To run the solver, grab the code, then try

ghc --make -O3 Main
time ./Main

You can get the code (and the whole wiki) by

git clone linux:/r/fun/wiki/wikidata

or something like it.

Things to try

  1. Do something on the command line to turn harder puzzles on and off.

  2. Simplify the code

  3. Make things faster