# Sudoku Solver

The goal of a Su Doku problem is to complete the published grid so that no number appears more than once in any row, column or 3x3 subgrid. To set up the solver, simply type the numbers printed into the corresponding squares in the grid below.

(The Tab and Shift-Tab keys allow the grid to be navigated without use of the mouse).

Solve - There are three solve buttons:
Solve completes the grid (provided that a solution exists).
Unsolve resets any squares on the grid filled by a previous press of the Solve button.
Reset resets the entire grid.

Evaluate - checks to see whether the current incomplete grid has a unique solution.

Labelling Format - allows the user to switch between the 'Numeric from 1' format used by the majority of sources and the 'Alphanumeric from 0' format used by the 4x4 puzzles.

The Clipboard - Copy transfers the current grid into a separate clipboard window (the system clipboard cannot be used for security reasons) in the format selected in the drop-down box on the far right of the row. The two supported formats are Plain Text and Library Book. Once Copy has been pressed, simply select the displayed grid in the clipboard window, press Ctrl-Insert to copy it, then press Shift-Insert from within some other document, such as a new e-mail message. The grid will look its best rendered in a monospaced font such as Courier. Paste performs the opposite operation, i.e. it transfers a grid from the clipboard window (which must have been previously opened by a press of the Copy button) to the solver. (Only the Plain Text format is supported by the Paste operation). Suppose you have received an e-mail that contains a Su Doku puzzle in the approved clipboard format. Select the grid from within the document, then press Ctrl-Insert in order to copy the grid to the system clipboard. Press Shift-Insert within the clipboard window to copy the text there, then press the Paste button to copy the grid from the clipboard window into the solver.

Resize - Although classical Su Doku puzzles use a 3x3 grid of boxes, the Su Doku Solver supports the alternative box grids that are sometimes seen. Use the Resize button to change the grid size. Be aware that the grid might not display properly if you use this function.

Compose - composes a fresh puzzle. The new puzzle is certain to be symmetrical, have a unique solution and feature the requested number of filled cells. Note that complicated puzzles (in the case of the classic 3x3 Su Doku puzzle, 'complicated' usually means with less than 24 filled cells) might take a considerable time to generate. Press Break in order to interrupt the procedure.

Patterns - The Patterns section dictates which patterns should be detected during the Solve phase. The numbers to the right refer (except in the case of Guess) to the total number of candidate move eliminations performed due to the discovery of each type of pattern. In the case of Guess, the figure is the total number of guesses performed.

Reasoning - The text box at the bottom displays the reasoning that has been used to solve the puzzle. Click part-way through the reasoning in order to view partial solutions.