Learn to Solve Sudoku the Dreamagic Way is a Dream Machine Site The Dream Machine --- The Imagination of the World Wide Web |

There will soon also be pages...in the tutorial section...that take you through complete puzzle solving for puzzles of various levels of difficulty, using this program.

*
Finally, there is a discussion of how you can use the lessons learned while running this program when you attempt to solve puzzles offline.*
At the simplest level, this program is just an automated way of entering numbers into a Sudoku puzzle. The rules are that when completed, each row, column and box in the puzzle will have been filled with each of the digits one through nine. Furthermore, a properly designed Sudoku puzzle...and all ours are designed properly...will allow ONE and ONLY ONE correct solution. After you have selected a level of difficulty and a layout size, you can go directly to the puzzle and start solving it, the same way you would if you encountered that puzzle in the newspaper. There are several ways to enter numbers in the puzzle. You can select one from the column on the right, or you can hit a number on the keyboard...or you can even simply hit that number within the puzzle itself. In any of those cases, the number will reverse field...from black on white to white on black...until you either decide not to use it or you enter it into the puzzle. If you do change your mind about using it, simply select the number a second time and the reverse field will vanish as and it has become deselected. All the controls in this program work that way, as toggles. Hit it once, you select that control. Hit it again and it is deselected.

If you decide to play the number into the puzzle, select an empty square with the mouse and click on it. If that square is "permitted"...that is, it doesn't already appear in the same row, column or box…that square you have selected. It will briefly show a reverse field number, then it will turn that number illustrated in black on white. If you make a mistake or change your mind about the placement in the puzzle, the backspace key will erase the move. So, if you are already an experienced Sudoku solver, you can begin immediately.

By the way, the program will prevent you from making an obvious error. That is, it will not allow you to enter a number into a square where it obviously will be incorrect. We use the word *obviously* becuase the prgram WILL allow you to place numbers into squares that will lead to dead ends later, just not those...say...where that number has already exists in the same row, column or box. Sometimes, it will not be immediately obvious why the program disallows a particular number, but that will be part of your learning process.

The program has also been designed to teach you strategy, based upon the experience of expert Sudoku solvers. It offers a number of very helpful hints at each stage of the solving process. For example, a good first step in solving any Sudoku puzzle, is to locate those squares where only a single number will fit. This can happen in two ways that sound much alike, but aren't quite the same. In one case, adjacent rows and columns already contain that number and narrow it down to a single remaining square into which that number could possibly be placed. In the other case, a logical process of elimination says that only a particular number can be placed in a particular square. In the first case, the process of elimination concerns which box could possibly contain a particular number. In the second, only one number will fit into a particular square.

Confused? To illustrate how this works, you can use the function keys to provide hints within the puzzle itself. For example, hitting the F1 key…or clicking on the corresponding image at the puzzle's right edge…will fill every square that satisfies either process of elimination with that number on a bright red background. It will not place that number into the puzzle. Rather it merely informs you which number SHOULD go there. Selecting F2 will produce only a single example. If you want to figure why a particular number has been chosen for a square, use that function. It will give you time to figure out why it is true that only that number will fit into that particular square.

In any case, good puzzle solving strategy dictates that you select and fill all of this type of square before doing anything else, since they are the easiest to locate. If you do not deselect the function...for example consider that you have chosen F2 and have then filled the red square with the indicated number. In that case, you will continue to see other red squares appear until every possible *singleton* on the board has been filled. If you continue hitting F2 without filling in any of the red quares, every other time you hit it, a new red square will appear. After a while, you will no longer require the help of either F1 or F2. Your eyes and mind will quickly locate those types of squares and allow you to fill them. In that case, when you think you have found them all, you can still use these functions to verify that you have indeed found all possible singletons.

Another function, F5, will also assist you in finding these, but it does it a differnet way. The F5 function key will locate and show all this type of lonely square, but display it as a small number in the square. If you still need help finding these singletons, leave the F2 or F5 functions selected, since new singletons may appear whenever you fill any other square for any reason.

When no more of these lonely types of squares appear, you have completed the easy part of solving the puzzle. To this point, if you have correctly identified all singletons, then you can not possibly have made any errors. By the way, the easier puzzles can often be completely solved by merely locating all singletons, one after another.

After you get used to locating the *lonely* squares in this way, you can turn off the F1, F2 and F5 functions, using them only to *check* to see that you haven't overlooked any possibilities. From that point on, with the harder puzzles, you need to use a *what if?* strategy similar to the lookahead method employed in chess and other completely determined games.

That is, you need to look at the squares where only TWO numbers can possibly be entered, then try to decide which of them stands the best chance of being the correct choice. How do you do this? There is no simple way. In most cases, you will simply have to guess and give it a try. As you gain experience solving more difficult puzzles, you will find that your guesses get better and better. A good guessing strategy at the outset is to pick that number which, in your estimation, will lead to the most squares being easily filled. Choosing the number that produces more singletons is a way to assess this. The program will give you an opportunity to backtrack in case your guess turns out to have been incorrect. That is, it will automatically create a *breakpoint* when you choose one of only two possibilities, which will allow you to easily return to that point and try the other...correct...number.

Of course, if you have terrific visualization abilities, you may be able to play *what if?*, filling in subsequent squares in your mind until you either solve the puzzle or hit a dead end, where no further plays are possible. However, even a chess grandmaster, someone who has already mastered the art of looking ahead, will probably not be able to do this in most situations involving lookaheads of more than three or four moves. However, it often turns out that a contradiction arises after only three or four *imaginary* moves, so that the decision of which number is correct will be obvious.

The F6 function key will give you some help, by locating every unfilled square on the board which allows only two...or one...possible numbers. An important fact is that if any row, column or box has the two squares with indentical two-number possibilities, those two numbers can not be placed into any of the other empty squares in that row, column or box. We should also mention that if any two columns, rows or boxes have the same two numbers possible in them at the same position, then you have made a mistake already and must backtrack.

Why is this true? Well, a proper Sudoku puzzle has only one unique solution. If the situation described in the last paragraph occurs, it means, at the very least, that if you continue, you will find, at least *TWO* solutions, since the numbers can be chosen for those four squares in any order. If you find this confusing, the page explaining the use of the F6 key, will explain all of this more thoroughly with illustrations. Also, in further discussions, we will refer to these pairs as *doubletons*, which will be explained more in the next paragraph.

The F8 and F9 keys work, in tandem, much the same way as the F1 and F2 keys. Instead of locating *singletons*, they find *doubletons*. That is, they locate pairs of squares on the board in a single row, column or box which are the only squares into which the highlit number...black on a bright green background...can be placed. As with *singletons*, the distinction between these two situations is subtle. It is enough to point out that a *two* refers to a square into which one of two numbers can be placed, while a *doubleton* refers to the number which can occupy one of two squares. The first refers to location, the second to value.

The F8 key will locate all *doubletons* or *ones* on the board. Since it is possible that the same square might contain one item from two different doubletons, there is no convenient way to illustrate this situation except to use the same numerical method used in the displays for the F5, F6, and F7 keys.

The F9 key, on the other hand…and which is usually much more useful and less confusing…will step through the available doubleton pairs one at a time, highlighting them in a bright green field. Unlike the F2 display of just one *singleton*, you do not have to fill in either of the two squares in order to alter the display, just keep hitting the F9 key repeatedly…the first hit will light up the display, the second will turn it off…and subsequent hits will step through all the possible *doubletons* until you get back to where you started. Again, any confusion about this issue is best illustrated by going to the F9 page, or simply trying it out on an actual puzzle.

But what of the other keys? We have left out F3, F4, F7, F10, F11 and F12. The reason is that they provide other types of hints or perform functions unrelated to directly solving the puzzle. For example, the F4 key provides, for every row, column or box, a list of which numbers are still missing from that row, column or box. This display can give very valuable hints on how to proceed. For example, it will quickly point out which of these items has the fewest remaining possibilities, suggesting your attention to those items next. The F3 key, on the other hand, will only point out those items which have five or fewer remaining possibilities, which is generally more helpful and less confusing, since it narrows down the task at hand…what to do next. Either hit these keys in an actual puzzle, or choose the linked pages to F3 and F4 to see the layout of the display. Except for the boxes in the middle row of boxes, it is quite straightforward. The middle row of boxes are illustrated, from the top to the bottom ovals, for the three central boxes, from left to right. Once again, the best way to see this is to try out an actual display or go to the F3 and F4 pages.

The F7 key does something similar to the F5 and F6 keys, but instead of showing just *ones* or *twos*, shows ALL possible numbers that might be entered into a particular square. Like F4, it gives a very broad picture of the remaining possibilities and is mostly interesting when you are entering an offline puzzle into the display using the F12 key. If you leave the F7 function on while you enter the numbers, you will see very quickly how each number alters the remaining possibilities.

F12 allows just that. However, it blanks the board and obliterates whatever puzzle you were working on. Clicking it again, restores that puzzle. When you enter an offline puzzle, the solution to that puzzle,…usually illustrated by hitting the F10 key, will not be available.

As mentioned above, the F10 key gives a *cheat*, allowing you, at any time, to see the complete solution to the puzzle.

Finally, we have the F11 key. It allows you to set a *breakpoint* at any time during the solution of the puzzle. We mentioned earlier that such a breakpoint is automatically set whenever you choose one of only two possibilities, but F11 allows you to choose your own extra breakpoints at any point, usually when there are more than two possibilities. To return to the last previous breakpoint, hit the backslash key. To return to the beginning of the puzzle, hit the delete key. Of course, as mentioned at the outset, you can backtrack one move at a time with the backspace key.

This concludes our overview of the main functionality of this program. We remind you that further...more detailed...explanations and illustrations are available by using the many links on this page.