Sudoku solver

Ian Kelly ian.g.kelly at gmail.com
Thu Mar 26 09:15:55 EDT 2015


On Mar 26, 2015 6:31 AM, "Marko Rauhamaa" <marko at pacujo.net> wrote:
>
> "Frank Millman" <frank at chagford.com>:
>
> > Here is another python-based sudoku solver -
> >
> > http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py
> >
> >>From its docstring -
> >
> > "A proper Sudoku puzzle must have a unique solution, and it should be
> > possible to reach that solution by a sequence of logical deductions
> > without trial and error.
>
> I don't think that statement holds water. Trial-and-error is at the
> basis of deduction (reductio ad absurdum). The human solver employs it
> in their head. The question is, what is the difference between
> pen-and-paper and in-your-head for a computer program?

It's an accurate characterization of the sort of puzzles that are typically
presented as sudoku. I don't think that I have used trial and error, in my
head or otherwise, in any sudoku I have ever solved.

> > It solved Marko's original puzzle and Ian's puzzle in less than a
> > second. It could not solve Marko's second one, returning "impossible"
> > immediately.

Perhaps this is why that puzzle was described as being so difficult: it
required steps that human solvers don't usually take.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150326/8574cc17/attachment.html>


More information about the Python-list mailing list