[Haskell-cafe] Code Review: Sudoku solver

Chris Kuklewicz haskell at list.mightyreason.com
Wed Apr 5 09:09:02 EDT 2006

Henning Thielemann wrote:
> On Mon, 3 Apr 2006, Jared Updike wrote:
>> or ambiguously) with your Sudoku solver? A rough mesaure of the
>> difficulty of the unsolved puzzle could be how long the solver took to
>> solve it (number of steps) (and the number of possible solutions)? Are
>> puzzles with multiple solutions usually considered harder or easier?
>> Are these considered proper puzzles?
> It's an interesting test to run a Sudoku solver on an empty array. :-)

I am cleaning up my old (aka inexperienced) solver based on Knuth's dancing
links to put on the wiki.  The code is very different than most Haskell
solutions, since it revolves around a mutable data structure (which is not an

It "solves" an empty array in 81 steps with no backtracking.   It will produce a
list of all the solutions of an empty board quite efficiently.

Cleaning up my "logic" based solver will take longer.


More information about the Haskell-Cafe mailing list