I think I've learned enough Java to try to write a Sudoku solving applet.
The first step in running the solver will be setting the board. Click on a box to set it's value
(right now, each click increments the value, later I might use a dialog to pick the value, but this is good enough for now)
UPDATE: I added a dialog to set a box value.
UPDATE2: It was a hell of a fight, but I managed to get the GUI to look pretty much how I want. I ended up having to draw the heavy dividing lines manually, so they don't quite re-size right.
UPDATE 3: Added functionality.
UPDATE 4: Changed the look a bit. The boxes now change color when manually set. Adding the advanced techniques is tougher than I thought. I may take some time. After hitting the "Solve" button, the dialog function changes. Instead of setting the box value, it allows you to change the restricted values (blue means value is restricted).
this is just the GUI. the "Solve" button does nothing yet.
The applet goes as far as it can with the very basic algorithm it uses.
It successfully solved the NYT Easy and Medium Sudokus for July 15, 2010.
It wasn't able to completely solve the Difficult one, but I have ideas for more advanced techniques to add, so it shouldn't be long. YAY!!!
Note: it doesn't error check (yet). If you enter an impossible sudoku, it will still try to solve it.
*** Removed. See post dated 7/23/2010 for sudoku solver applet. ***
"I am so smart! S-M-R-T... I mean S-M-A-R-T!"
Praise me! PRAISE ME!
Thursday, July 08, 2010
John went insane today at 9:44 PM