Program usage

Download sudokuNxM_098

 

You find the Delphi sourcecode on GitHub.

1. Solving a puzzle

1. Select the number of rows and columns of the block first. Then load the puzzle definition from a text-file. You also can directly paste the definition into the main window using ctrl-v if you have copied the puzzle definition from somewhere else (ctrl-c usually works).

The program understands several text formats. The standard format is one line of text for each Sudoku-row, the entries separated by spaces and "0" or "." for an empty cell.

 

2. Select the methods you want to apply to solve the puzzle. Using the SAT solver (which is not mandatory) needs the file "org.sat4j.core.jar" in the same directory as the program. If the SAT solver does not work make sure that the 64-bit java.exe is contained in your path environment variable (for my machine it is for example "C:\Program Files\Java\jdk1.8.0_73\bin").

3.Press the "Solve puzzle button". With the "Verbose" checkbox checked, the steps of the solving process are displayed. Eventually you can check if a different solution exists once the puzzle is solved.

The SudokuX, SudokuP andSudokuW and NC+ checkboxes may be used to solve (and eventually generate) variations of the Sudoku puzzle. A SudokuX additionaly must have different values in both diagonals. In a SudokuP puzzle additionaly the entries which have the same relative position in each box must have different values. A SudokuW 9x9 puzzle is usually called Windoku.
The NC+ (nonconsecutive pairs) disallows consecutive numbers (cyclically, so 9 and 1 are consecutive in a standard sudoku) for adjacent cells vertically or horizontally. A good source for more information on these variations can be found in this forum.

2. Generating a puzzle

1. "True Random Grid" generates a grid with the selected blocksize by random swaps of cells until the puzzle is valid. It is useful for sizes up to a blocksize of about 8x8. For larger puzzles you can use "Default Grid" and "Shuffle Grid" to generate a valid grid.

 

2. Use "Use basic methods" to remove as many cell entries as possible with a greedy algorithm. If you want the resulting puzzle to have a certain symmetry check the corresponding radiobuttons and checkboxes. The Used Methods have a major influence on the result. After the reduction process the puzzle will be uniquely solvable by the used methods.

For further reduction click "Use SAT method". After a complete reduction with this method the resulting puzzle is guaranteed to be minimal (no more givens can be removed). Use "Single Step" if the SAT method should try to remove only one given.

So for a very easy puzzle for example check only "Hidden singles" and klick "Use basic methods". Using the SAT method leads to more difficult puzzles.

If you want to save the puzzle mark the puzzle in the main window (with left mouse click and shift left mouse click for example), copy it with ctrl-c, paste it with ctrl-v into a textfile and save the file.

< Home > < Details of the SAT solver >

© 2019  Herbert Kociemba