On 27-Mar-2015 15:09, Dave Angel wrote:
On 03/27/2015 09:56 AM, Marko Rauhamaa wrote:
"Frank Millman" <fr...@chagford.com>:
So what I am talking about is called a "satisfactory" puzzle, which is
a subset of a "proper" puzzle.
That is impossible to define, though, because some people are mental
acrobats and can do a lot of deep analysis in their heads. What's
satisfactory to you may not be satisfactory to me.
Besides, looking for "satisfactory" patterns can involve a truckload of
trial and error.
I know, let's use "regular expressions" <g>
If you are interested, I have written a python (wxPython GUI) for solving Sudoku
problems. It even has a "hint" mode that can be used to lead you to a solution.
I have tested it on the world's hardest Sudoku (published by a Finish
mathematician) and it solves it very fast. I have also written another version
that finds ALL the solutions to any Sudoku problem (that has a solution) using
an LP approach --- this is non-trivial. However, I have not been able to give a
strict mathematical proof that it does indeed find all solutions.
If you wish to really understand the mathematics behind Sudoku then I suggest
the book "Taking Sudoku Seriously" by Jason Rosenhouse and Laura Taalman (Oxford
University Press, 2011). Unfortunately, they do not consider the LP approach in
this book (an oversight IMHO).
--V. Stokes
--
https://mail.python.org/mailman/listinfo/python-list