For those who don't know, Sudoku is a number puzzle consisting of a 9x9 grid divided into 9 3x3 squares. The puzzle starts out with numbers filled in some cells, and the goal is to fill in all the remaining cells such that every row, every column, and every 3x3 grid contains exactly one copy of each digit from 1 to 9.
My little app will let you manually enter in the values of the cells you know, and as each cell is entered it will fill in any other cells it can figure out.
The gray cells were entered in from the start, the black ones were solved by the app.
But the real beauty in this app is that it works beyond manual entry. There are many websites online that let you play Sudoku puzzles on your computer. While there exist several main formats for these, the most common puzzle sites use a similar UI control scheme. And that means this app can automatically load, analyze, solve, and fill-in any of these puzzles with minimal intervention on your part.
The instructions come up in the game, but here's the summary:
1) You can manually enter numbers wherever the cursor is, and move the cursor with the arrow keys or by left-clicking an empty cell.
2) To auto-solve an online puzzle, the following conditions must be met:
a) The puzzle must be a standard 9x9 puzzle; no other sizes will work.
Pressing TAB in the puzzle must move the cursor to the next cell to the right, wrapping to the next row when it reaches the end.
c) Pressing SHIFT+TAB should do the opposite, moving the cursor backwards.
d) Pressing CTRL+A should select the current cell in the puzzle.
If those are satisfied (there's a list of tested compatible sites in the F1 info), then you can simply move the cursor to the first cell in your puzzle and press CTRL+ALT+S and the app will get to work loading your puzzle, then filling in any values it could solve.
3) If you auto-load a difficult puzzle, the app may not be able to solve every cell. In that case, you can manually fill in missing values if you know them, and once the puzzle is complete, you can go back to the online puzzle's first cell and press CTRL+ALT+F to fill in the updated values.
I've screencaptured videos of it being used on multiple websites, but until I get back to my personal computer tomorrow, I can't edit them together. So hold on for a day if you want to see it in action .
This is a demo showing it being used to solve puzzles from several sites and to auto-fill the cells in. I had to speed up the video (or it would have been over 10 minutes, since it takes about 40 seconds per puzzle), so it looks like it skips some cells--but it doesn't. It analyzes every cell and fills in every cell.
Note: the video was recorded before I changed the window size to fit the Sudoku board.
Music by Charlie Shaw via TimEGardner's video: Original Song Video Here
Edited by IceMetalPunk, 27 November 2011 - 11:40 PM.