|
Welcome to my Sudoku page
Since I first studied Sudoku in May 2005 I think I've finally got a handle on this puzzle. My original
intention was to prove to myself that a small number of simple strategies existed that could solve
every sudoku. How wrong I was. Sudoku has enormous depth and while this solver has grown up enough
to crack 99.9% of puzzles there are many weird and wonderful examples that defeat it. The main
reason to keep this solver in development is to analyse these difficult ones. To that end I've added
new graphical tools and features which I hope you'll enjoy.
Version 1.30 is a major update since I've found a way to include all the advanced strategies in
my off-line C++ solver that were simply not possible to program in Javascript. Much still remains
in javascript but its mostly user interface stuff now.
I am continuing to document the various strategies myself and many other people have invented.
These are available here.
But in many cases progress has out stripped the documentation and I can only provide links to
the best resources. I've tried to give credit where credit is due and please update me if I have
missed anyone or need to make a correction.
I am now working independently on puzzle creation.
For further Sudoku strategy information I recommend the forums on
sudoku.org.uk
and sudoku.com.
All feedback, comments, arguements, bug reports and strategy ideas are welcome. There is a new
FEEDBACK form with a column displaying comments and questions.
Many thanks to all the people who have done so and helped improve this solver.
Original version 1.01 28th May 2005
-
Full version history here
New in version 1.63 (March 3rd 2010)
3D Medusa and much improved forcing chains. A new system of symbolising chains.
New in version 1.50 (May 25th 2008)
I have added a grading button to this solver. Many people have asked for a grade check
to see if their puzzles are accurately graded. Note that different publishers will have
very different methods of grading, some good, some poor. For more information on my
grading I have a paper on this topic.
Detection of X-Cycles has been improved, thanks to Thomas Kimble for the examples. Other
minor accumulated improvements as well.
Many people have written to me to comment about multiple solutions for a given Sudoku. There
are no logical tricks the solver can use to detect this other than not complete correctly.
The only way to check this is to perform a brute force analysis which tests every possible
legal placement of a number. Computers are good at this and we now have a new yellow button
called "Solution Count". Try this on any Sudoku to check if it has a unique solution.
|
|
Detailed help
Use Clear to empty the board before entering your own puzzle.
Save will remember the current state of the board so you can
Re-load it again (even if you close your browser - you must allow cookie for this to work).
Re-Start
applies only to the example puzzles in the list. The current list contains an example puzzle
that tests each strategy.
Take Step first displays the possibles or candidates for each
unknown cell. These are the numbers that do not contradict any known or solved square. Once these
are displayed Take Step will step through other tests
and then loop until it can go no further. The first few tests are the most
productive and the solver will often loop between them. If any are successful and the board
is changed in any way it will go back to the start and "Check for Solved Squares". The
reason for this step is to make it easier to spot what's changed.
Many of the strategies have knock-on effects which mean that they can't be run back-to-back - it's
essential that we return to the basic steps. We go back because we want the easiest solve route.
>
The first seven tests are the simplest and are required for any sudoku. After that you are allowed
to choose which strategies the solver will use. Tick and un-tick the check boxes.
>
The order of these advanced strategies - and my inclusion of them in categories 'tough', 'diabolical'
and 'extreme' are my personal choice after close study and are roughly in order of complexity. While
the logic is different for each you should be aware that there is considerable overlap in their
power to solve in certain situations. For example, X-Cycles are a subset of Alternating Inference Chains.
If you turn off X-Cycles the same elimination might turn up under AICs. Since March 2010 I have re-worked
most chaining strategies to find the best and shortest chains - not necessarily the first one it happens to find.
More about what 'best' will be posted as a document.
>
All strategies in the list have links to documentation, but its worth describing what the first tests do:
- Show Possibles: For each unknown square we eliminate all
possibles where those numbers are known in each row, column and box. This may reveal a single
candidate in which case we have a solution for that cell.
- Test 1: If a possible number
occurs once in a row or column we can eliminate other candidates and make this the solution to the square.
- Test 2: If a possible number occurs once in a box (3 by 3 cell)
we can eliminate other candidates and make this the solution to the square. Same test as Test 1 but for boxes.
- Test 3: In this test we check for 'naked'
Pairs and Triples.
For example, if we have two pairs, eg 3-4 and 3-4 in the same row, column or box, then both 3 and 4 must
occupy those squares (in what ever order). 3 and 4 can then be eliminated from
the rest of the row, column or box.
- Test 4: This test is for Hidden Pairs,
Hidden Triples
- Test 5: Naked and Hidden Quads - much rarer but simply extends Pairs and Triples.
- Test 6: See pointing pairs and triples for
a full explanation. This test help us eliminate numbers in rows and columns outside the box.
- Test 7: Box/Line Reduction.
We check the box against the rows and columns that intersect it for each number.
If this solver comes up with an error - or it can't be solved, first use the
Solution Count button to prove it has only one solution.
This uses a fast brute-force algorithm to check for all possible solutions. If it's valid,
please use the Email button to send it to andrew@scanraid.com. I'd be very interested to study
examples that can't be solved on this page.
|