Sudoku
A scratch pad and a game panel appears in this game.  The data is keyed in the scratch pad, using numbers, letters or blanks.  Both 9 x 9 and 16 x 16 puzzles are acceptable.
Pressing on the "Get Tab" command will transfer this information into a puzzle grid.

At any stage beyond this point the grid may be saved in a file by pressing the "Save on File" command.  This feature is useful if the solution is to be continued later, in which event the "Retrieve File" button would bring it back.

The program uses the following logical algorithm to solve the puzzle:

1. Find all possible values for each position by determining what is not already given in its row, column and cell.
2. If a position has a set of possible values and one of these possible values does not exist in any of the sets within its row, column and cell, then that is the value of the position.  For instance if a position has possible values of 1,7,9 and none of the other positions have possible values that include 7, then that position must have the value 7.
3. If a position has 2 possible values and another position within its set has the same 2 possible values, then no other position in that set can have either of those 2 possible values.

If after using these logical algorithms, the puzzle has not been completely solved, then the program uses a series of trial and error choices to fill in the missing blanks.

One may solve the puzzle as far as possible manually.  If so, up to 20 previous steps are kept in memory and one can go back that many steps to try solving it with a different set of values.  The program provides aids by displaying after each step up to 4 possible values for each undefined position.

Pressing the "Find Possible Choices" button will find the value of as many positions by using step 1 in the above 3 algorithms.  By selecting the single step option, only one value is shown at a time.

Pressing the "Solve by Logic" button will find values by using the remaining 2 algorithms.

Pressing the "Solve by Guess" uses the trial and error method repetitively until a solution is found.



Previous