Sudoku solver
Ian Kelly
ian.g.kelly at gmail.com
Wed Mar 25 15:05:37 EDT 2015
On Wed, Mar 25, 2015 at 12:44 PM, John Ladasky
<john_ladasky at sbcglobal.net> wrote:
> On Wednesday, March 25, 2015 at 4:39:40 AM UTC-7, Marko Rauhamaa wrote:
>
>> I post below a sudoku solver. I eagerly await neater implementations (as
>> well as bug reports).
>
> So, it's a brute-force, recursive solver? The code is nice and short. But I bet it takes a long time to run.
>
> I and a student of mine are working on Sudoku solvers which solve puzzles the way that humans would. Smart, pattern-recognition strategies take less time to run... but, obviously, far more time to turn into code!
I haven't written one myself, but Peter Norvig has a nice example on
the web of a Python sudoku solver using constraint propagation to
limit the search space.
http://norvig.com/sudoku.html
I don't know that I would do it much differently if I were going to
write one myself.
More information about the Python-list
mailing list