Sudoku Solver

I have now realeased a first preview of Version 4.5, see link below. I have added a "Solution Count" button, and a "Minimal" button, to find all minimal (irreducible) puzzles from a large set of clues.

There is also a version with bigger board and digits.

If you like my solver, please donate a few dollars or euros through PayPal. It will encourage me to finish the next version sooner. I will be happy to receive comments (, also my PayPal reference) if you find errors or have suggestions.

Version 4.4   7 September 2008

Mats Anderbok 2008

Quick instructions

Type with numbers (1–9) and spacebar, move with arrow keys and delete with DEL or BACKSPACE. To eliminate individual candidates press DEL or BACKSPACE and then a number. The mouse may also be used to move the cursor. If typing won't work, because the applet is not active, try clicking on something. Shortcut: Press ENTER key to solve/set one cell (only singles).

Choose automatic or manual solving. With automatic on, solving is performed until no more reduction is possible with any of the elimination techniques chosen. With automatic off, pressing the "Solve" button will do only the moves possible in the present state, so you will have to press "Solve" several times to solve the puzzle completely. Shortcuts: Typing 's' is equivalent to the "Solve" button. <SHIFT> 'S' solves repeatedly.

To load, copy a text string from another program and paste it in the text area at the bottom. Digits are interpreted as given numbers, and '.', '_' and '0' as empty cells. Save appends the board to the end af a file. If your browser has security restrictions against saving or printing, you may want to run the applet in an appletviewer or as a standalone application (save the jar file, expand, make sure you have java installed, and write "java Sudoku" on the console).

Print will allow you to copy the board onto paper. Note that the candidates mode is important: if candidates are viewed as small squares, these cells will be empty. Print later stores the board for later printing with up to 6 puzzles on one A4 page.

For more detailed usage information and a method summary, see separate pages. The source code is available here.

A good source for solving methods is The Logic of Sudoku by Andrew C Stuart, for which I have compiled an Errata List.

Version history

These older versions are practically the same as when first published. I have just fixed a couple of bugs and translated from Swedish to English. Source codes are available in respective catalogues. For a complete version history, see my Swedish site

Version 0.0 (2005-06-02) Basic elimination without choices. Took only six hours to write, most of it spent on graphics and keyboard input.

Version 3.1 (2005-11-29) Complete elimination in multiple steps (Ariadne's thread). Includes "Permute" and "Print" buttons.

Version 4.0 (2005-12-23) Starting with advanced methods. Printing in six positions. Solving progress in Java system window.

Version 4.3 (2006-11-10) More advanced methods (xyz wing, nishio, chain). Solving progress also in text area.

Version 4.4 (2008-09-07) Choice between English and Swedish text. New buttons: Save, Load, Redo. New search order (boxes first, then rows and columns).

Plans for 2010:

Version 4.5 (beta, 2009-12-20) Faster solving with bit arithmetic instead of boolean arrays. New generalization of xy wing with pincer cells replaced by sets. More chains, using both bi-value and bi-location. New way to choose candidates for complete elimination. More choices for advanced methods. Counting the number of solutions. Minimal/irreducible button.

Version 5.0  Grading of difficulty in six levels: very easy, easy, medium, hard, very hard, extreme.

Last modifed 2009-12-20