Skip to content
Games with logic
100%

Sudoku: a reason for every move

Fill the empty cells without repeating digits in rows, columns or boxes. This is about possible positions, not arithmetic.

Theory

01

What can go in a cell

This board uses digits 1 to 4. Each appears once in every row, column and square box. Thick lines separate boxes. Given digits stay fixed.

Choose an empty cell, then a digit: which neighbours rule it out?

This inspects a possibility without entering a digit. Highlighted neighbours explain a restriction. No restriction does not yet prove the digit belongs here.

The second cell of the first row already contains 2. The selected cell cannot also contain it.

02

One candidate, one answer

Candidates are digits not yet ruled out by the known restrictions. If a cell has just one candidate left, there is no other choice. This is a naked single.

Compare the small digits. The explanation shows why only one answer remains.

03

One place for a digit

Now look across a whole row, column or box. A cell may have several candidates, yet be the only place for one digit in that unit. This is a hidden single.

The second row needs a 2. Find its only remaining position.

This is a technique demonstration: the deduction matters here, rather than a unique solution to the whole board.

04

Removing a candidate is a move too

If every position for a digit in a row lies in one box, one of those cells must contain it. The other cells in that box cannot use that digit. The same reasoning also works from a box into a row or column.

Watch which small candidates disappear when you apply the step.

This is a technique demonstration: the deduction matters here, rather than a unique solution to the whole board.

From candidates to patterns

The next techniques do not guess an answer. They prove which small candidates can be removed. That can reveal a single.

Two digits in two cells

Two cells in one row allow only 1 and 2. Their order is unknown, but the pair reserves both cells. Remove 1 and 2 from the other cells in that row. The same works in a column or box.

X-Wing

555555

In each of two rows, 5 has exactly two positions, in the same two columns. The two 5s occupy opposite corners, so the rest of those columns cannot contain 5. Rows and columns can exchange roles.

These are candidate patterns, not complete Sudoku puzzles. During play, a hint finds these patterns on your current board and marks the actual cells.

Different sizes, visible rules

A 6 × 6 board uses 1–6 with 2 × 3 boxes; a 9 × 9 board uses 1–9 with 3 × 3 boxes. Rows and columns work the same way. Variants add restrictions to the ordinary rules rather than replacing them.

Each marked diagonal also contains each digit exactly once.

Choose a cell and inspect a digit: which rule excludes it? This is a fragment for studying a constraint.

The main diagonal already contains 1. It cannot contain another 1, even in a different box.

Diagonal
Each marked diagonal also contains each digit exactly once.
Anti-knight
Equal digits cannot be a chess knight’s move apart: two cells in one direction and one to the side.
Nonconsecutive
Cells sharing an edge cannot contain consecutive digits, such as 3 and 4.
Thermo
Digits strictly increase from the round bulb to the thermometer tip. They need not increase by one.
Killer cages
Digits in each dashed cage add to its clue without repeats. Normal row, column and box rules still apply.

A four-cell thermometer on a 1–4 board must read 1, 2, 3, 4. Two distinct digits adding to 3 can only be 1 and 2. These deductions also restrict candidates, and a hint must name the rule it used.

Choose a board and rules

Finding a solution and explaining a move differ

A learner needs a deduction they can follow. A fast solver may try a candidate, continue filling cells and backtrack after a contradiction. A digit found that way does not explain how to spot it on the board.

Constraints and search
Remove impossible values. If choices remain, try a cell with the fewest candidates. A contradiction closes that search branch.
Algorithm X / Dancing Links
Each possible entry covers four requirements: its cell, digit in its row, digit in its column and digit in its box. Choose entries that cover every requirement exactly once.
SAT / CP
Another approach encodes the rules as logical or integer constraints for a general solver. This helps model complex rule sets, but does not by itself create a clear hint.

Hints here use singles, intersections, pairs and X-Wing. If those techniques are insufficient, we say so. The separate solver checks for zero, one or multiple solutions; a search limit is not presented as a proved result.

Further reading
Back to top
Privacy