Sudoku & Techniques

2026-09-13

Last edited: 2026-09-14

I made a Sudoku game! Check it out here.

Why make a Sudoku game? There are free ones online after all

The way I controlled the difficulty is by separating techniques into categories. E.g. a difficult puzzle requires the use of at least 1 difficult technique (and I try to get at least 2 difficult techniques).

In the rest of this post, I'll show examples of all the techniques that my Sudoku games might require. There are more, and hopefully I'll come back and add more to the game and to this post!

None of these techniques are new. As reference, I mainly used learn-sudoku.com and sudokuwiki.org, but there are many other similarly helpful sites.

Easy Techniques

Naked single

Naked singles are the easiest. If a cell has only one possible candidate, then fill it in!

Hidden single

Hidden singles are just as simple, but harder to spot. If in a given row, column, or box, there is only one cell that could possibly be a value, then that cell must be that value.

Medium Techniques

Locked candidates

If you can show that the candidates for a value within a region (box/row/column) are entirely within a second region (box/row/column), you can remove the candidates for that value that are in the second region but not the first.

In this first example, the first region is a box, and the second region is a column.

Box vs row.

Row vs box.

Column vs box.

Naked pair

In a naked pair, 2 cells within a region have the same 2 candidates. This means those 2 values must be in those 2 cells, and the rest of the region cannot contain either value.

Note that this generalizes - if the set of candidates for n cells within a region is only of size n, then all other cells in that region cannot have any of those n values. But I marked naked triplets and above as hard techniques.

Hidden pair

Similarly, in a hidden pair, 2 cells within a region are the only possibilities for 2 candidates. So we can clear the other candidates from those cells.

Also similarly, this generalizes to e.g. hidden triplets, which I marked as a difficult technique.

Hard Techniques

Naked triple

Very similar to the naked double, but we need 3 cells limited to a total of 3 candidates.

Note that in the below example, the box could also be seen as having a hidden quadruple! (2, 3, 6, 9)

Hidden triple

Similar to hidden pair, but with 3 cells and 3 candidates.

Note that the below example could also be seen as a naked quadruple! (1, 2, 3, 8 in the column; or 1, 2, 8, 9 in the box)

X-wing

In the x-wing, you can determine that one value has to occur in a specific overlap area.

E.g. in the example below:

So, in the 2 columns of interest, 1 can only occur in the x-wing rows.

Note that (1) exists in all 4 corners of the x-wing. I.e. the x-wing pattern is like:

x y | ... | ... | x y
... | ... | ... | ...
... | ... | ... | ...
x z | ... | ... | x z

or

x y | ... | ... | x z
... | ... | ... | ...
... | ... | ... | ...
x y | ... | ... | x z

XY-wing

XY-wing is similar to the X-wing, but we can only remove the value from cells that can see both corners.

y z | ... | ... | x y
... | ... | ... | ...
... | ... | ... | ...
x z | ... | ... | <>

Note that xy-wing can be used on boxes too!

XYZ-wing

As the techniques get more complicated I find it harder to put into words.

The setup is you have a cell with 3 candidates (XYZ) which can see a cell that has XZ and a cell that has YZ. The XZ cell and the YZ cell can't see each other - i.e. the 3 cells are not within a single row/box/column. Anything that can see all 3 cells cannot have Z.

x y z | ... | y z | ...
... | ... | ... | ...
<> | ... | ... | ...
x z | ... | ... | ...

Swordfish

Here, we find 3 rows (or 3 columns) where a value only has 2 candidates in each of the 3 rows. Additionally, each row must have 1 overlapping column with each of the other rows.

x ... | ... | x ... | ...
... | ... | ... | ...
... | ... | ... | ...

... | ... | x ... | x ...
... | ... | ... | ...
... | ... | ... | ...

x ... | ... | ... | x ...

In this case, we can remove x as a candidate from all the other cells in the 3 columns. This is because there are 2 ways for the x placements to play out, either:

x | ... | ... | ...
... | ... | ... | ...
... | ... | ... | ...

... | ... | x | ...
... | ... | ... | ...
... | ... | ... | ...

... | ... | ... | x

or

... | ... | x | ...
... | ... | ... | ...
... | ... | ... | ...

... | ... | ... | x
... | ... | ... | ...
... | ... | ... | ...

x | ... | ... | ...

So, all the other cells in the 3 columns cannot have x!