How the solver works
PsyDoku solves a Sudoku the way a careful person would: it keeps track of every value that could still go in every cell, and uses logical techniques to rule values out until each cell has only one possibility left.
Reading a puzzle page
- The grid. Black numbers were given in the puzzle. Red numbers have been solved.
- Small numbers in a cell are the values still possible there. Tap one to see the puzzle with that value filled in.
- Heavier lines and shading mark the 3×3 blocks, called nonets.
- The highlighted cell is the one solved by the last step, with the reasoning written out next to the grid.
The ten solving levels
Each level adds a technique on top of the ones before it. The solver always tries the easiest technique first, and only moves up a level when nothing easier works.
- Single value. A cell has only one possible value left, or a row or column is missing just one number.
- Nonet row/column check. A nonet is missing a number that fits in only one of its rows or columns, because the other rows or columns already contain that number.
- Only possible value. After the eliminations so far, a cell has only one possible value left.
- Only place in the nonet. Within a nonet, only one cell can still hold a particular value, so it must go there.
- Pointing. A value that can only go in one row or column inside a nonet can't be in that same row or column in the other nonets.
- Claiming. A value that, in a row or column, can only fit inside one nonet can't be in the other rows or columns of that nonet.
- Matching pairs. Two cells in the same row, column or nonet have the same two possible values. Those two values must go in those two cells, so they can't be anywhere else in that row, column or nonet.
- Locked to one nonet. A value in a row or column can fit in only one nonet, because the other nonets already have it. It is removed from the rest of that nonet.
- Row/column inside a nonet. A value possible in only one row or column of a nonet is removed from that row or column in the other nonets.
- Matching sets. A group of cells in a row or column shares the same set of possible values, as many values as cells. Those values are removed from the other cells in that row or column.
If none of the ten levels can make progress, the solver falls back on trial and error: it tries a value in a cell and follows it until it either solves the puzzle or leads to a contradiction. A well-made puzzle has exactly one solution, and the solver checks this too.
How difficulty is ranked
A puzzle's difficulty is the highest level the solver needed to finish it. A level 1 puzzle can be solved by spotting cells with only one possible value. A level 7 puzzle needs matching pairs somewhere along the way. Puzzles that need trial and error are rated above 10, by how many levels of guessing were needed. Because the rank depends on the hardest step, it's only known once the puzzle has been solved.
Ways to solve
- Next step fills in one cell and explains why.
- Fill in the obvious fills everything levels 1 to 5 can solve.
- Solve by logic uses all ten levels, without guessing.
- Solve by trial and error finishes any valid puzzle and checks the solution is unique.
- Normalize rewrites a puzzle in a standard form so equivalent puzzles look the same.
Choose a puzzle to try it.