May I please draw your attention to a new sudoku solver and tutor. This one is fully in javascript, and fully interactive, so any of the available strategies can be tried in any order. It can solve any sudoku I have come across (including 'golden nugget', 'easter monster', etc) using the same hierarchy of techniques. These techniques, in my opinion at least, are fully logic based.
The program offers basic techniques up to ‘fish’, then offers a collection of advanced techniques. There is a full implementation of POM (a much neglected technique) and ALSs. Several varieties of chains are enabled.
The program can be accessed at http://www.philsfolly.net.au
It has what I believe are new approaches to solving the harder puzzles. For the very hard ones that aren’t solved using ‘normal’ techniques, I have developed 3 techniques based on
1. Single digits – any candidate digit can be either true or false
2. Units – the candidates in a unit (ie row, column or box) can have many combinations of the 9 digits, but only one is true
3. Patterns – A given digit may have many (even thousands) of possible patterns, but only the one in the solved puzzle is true, all the others are false
In each of these 3 cases, if the digit (or digits) is hypothesized to be true, and the logical consequences of doing this are examined, then a contradiction may be discovered. The methodology for finding contradictions is fully explained in the help items.
Single digits:
1. If the hypothesis that a digit is true is correct, then no contradiction will occur
2. If the hypothesis that a digit is true is incorrect, then
a. If there is no contradiction, no conclusion can be made
b. If there is a contradiction, then the hypothesis that the digit is true must be incorrect, and the digit can be eliminated
Units:
For a chosen unit, all valid combinations are obtained. All nine digits for a given combination are hypothesized to be true, and if a contradiction results then that combination is removed from the total. At the end of the process, the remaining combinations are transformed back into the unit, which may or may not have reduced number of candidates.
Patterns:
For a chosen digit, all patterns are generated, and tested as above one at a time, and if a pattern causes a contradiction that pattern is removed from the total. After all patterns have been tested, the remainder are transformed into a 9x9 grid and compared to the actual Sudoku. If there is a cell that all remaining patterns include, then that cell can have the value of the chosen digit. If there are cell(s) which none or the remaining patterns pass through, then the digit can be removed from these cells. (This is the same process used in the POM analysis employed earlier in the program).
The Killer Method
If the above are not enough (as is the case in the very hardest puzzles) some something extra is needed. If one generates an array of all instances of a digit occurring twice in a unit (ie pairs), then one can make one of the pair true, then a second single digit true, and see if there is a contradiction. If there is, then can make the other of the pair true, and the same second digit true, and if there is again a contradiction, then the second digit must be false and can be eliminated. This is because one of the pair has to be true, so the contradiction must be due to the second number. This process can be enabled for triples and even quads. (in very hard puzzles there aren’t many pairs, so triples are initially needed).
This same approach has been enabled for both unit and patterns. The patterns approach seems the most powerful, and most difficult patterns can be solved using this alone by repeated application. The progress of these methods is fully outputted into a text box so the logic can be examined.
This is early days, and the program may have bugs or produce errors. I would be grateful if you took into account that I am an amateur programmer, and not be too harsh with criticism. BTW, please don’t use IE. Chrome is at least 10 times faster and much preferred, Firefox almost as good. Safari is hopeless.