Hi all
Let me state up front that I did not write the Solver program itself. It is
a Python program written by David Eppstein, a professor of Computer Science
at the University of Califoria, Irvine. To quote a post from Tim Roberts a
while back, from which I found out about this program, "More than just
solving the puzzles, his script actually prints out the individual steps
that lead to the solution, one by one, in readable English. I've used it
several times just to get a hint at the next step in a solution. It can
also create new puzzles."
I was chatting about Sudoku to a friend the other day, and he said he was
sure that some puzzles have no solution. I told him that I had a program
that would solve any valid puzzle, and he was eager for a copy. Although the
Python program is brilliant, it only has a command line interface, and you
have to type in the grid in a long string. I thought it would be fun to
write a wxPython front-end for it. Here is my attempt.
If you place sudoku_solver.py and sudoku.zip in the same directory, it
should just work. I have tested it on Windows Server 2003, Python 2.5,
wxPython 2.8.9.1, and on Fedora 10, Python 2.6.1, wxPython 2.8.9.1.
My next task is to package it using Gui2exe, to make it easy to install on
my friend's computer. I thought I would post what I have done so far, to see
if I get any feedback. It is just a toy, but it would be nice to get it
working as smoothly as possible.
If you don't have a puzzle handy, there is one included in the program, but
commented out. Just uncomment the lines, and run it.
Any comments will be appreciated.
Frank Millman
P.S. The attachments are about 36k - I hope I am not exceeding the
acceptable limit.
sudoku_solver.py (10.6 KB)
sudoku.zip (25.4 KB)