Sudoku-Land

How to Play Sudoku

Solving

Rules and Terminology

Classic sudoku comes as a 9×9 grid, divided into 9 regions (3×3 sub-grids).

  • Givens: These are the digits already present in the grid at the start of the game.
  • The goal: Fill the empty cells so that every row, every column and every region contains all the digits from 1 to 9 exactly once.
  • A candidate: A digit is called a "candidate" when it could potentially be placed in a cell without breaking the basic rules.

The Solving Process

To crack a puzzle, players generally alternate between three complementary processes: scanning, marking candidates, and analysis.

Phase 1: Scanning

This is the basic step, performed at the start and after every new digit entered. It relies on two techniques:

1. Cross-Hatching

This means mentally eliminating cells within a region by following the rows and columns where the digit already appears. If only one free cell remains in the region for that digit, it's confirmed.

2. Counting and Contingencies

You check which digits are missing for each unit (row, column, region). Expert players also look for contingencies: if a candidate can only go in two or three aligned cells within a region, that candidate can be eliminated from the rest of the corresponding row or column.

Phase 2: Marking Candidates (Pencil Marks)

When visual scanning isn't enough anymore, it becomes necessary to note the possible candidates in each cell.

  • Corner notation: You write small digits in the corners of the cell. This requires either space or a very fine pencil.
  • Dot notation: You place dots whose relative position indicates the digit (e.g. a dot in the top-left corner for 1). This is a compact method, but it demands great precision.

Phase 3: Advanced Analysis

Here, the goal is to eliminate candidates until only one remains per cell.

Eliminating Orphan Candidates

If N cells in a unit collectively contain only the same set of N candidates, those digits cannot appear anywhere else in that unit. For example, if two cells in a row can only hold (2, 5), you can remove 2 and 5 from every other cell's candidates in that row.

The Hypothesis Approach

Used mainly on "diabolical" grids, this method involves testing a digit in a cell that has only two candidates. If it leads to a contradiction, the other candidate must be correct. The Nishio algorithm is a streamlined version of this technique.

Put it into practice
Try these techniques on a real grid!

Tips

This section covers advanced techniques for solving hard grids, from intermediate up to expert level. Choose a method from the menu to learn more.

To see these techniques applied to your own puzzle, enter it in the step-by-step solver: it explains every deduction and links back here for the technique used.

Twins and triples

This technique applies when two or three cells in the same unit (row, column or region) share exactly the same candidates — and only those.

Naked Pairs

If two cells in the same unit can only hold the same two digits (for example 3 and 7), then those two digits are "reserved" for those two cells. You can therefore eliminate them as candidates from every other cell in that unit.

Why? Because whichever of the two cells ends up holding the 3 or the 7, those digits will necessarily be taken up by this pair — so the other cells have no chance of containing them.

Naked Triples

The same reasoning extends to three cells sharing a set of three candidates. The three cells only contain combinations drawn from this set (for example 2, 5 and 8) — one cell may only have two of them, what matters is that the union of the three cells' candidates forms exactly this trio.

You can then eliminate these three digits from every other cell in the unit.

Worked Example

In a row, suppose the notes reveal:

  • Cell A: candidates 4, 9
  • Cell B: candidates 4, 9
  • Other cells: various candidates including 4 and 9

Cells A and B form a naked pair: the 4 and the 9 are reserved for them. Cross out the 4 and the 9 from the notes of every other cell in that row.

Practical Tip

This technique is especially useful on Hard and Expert grids. Make it a habit to check for it right after noting all the candidates of a unit.

Isolated groups

Also called Naked Subsets, isolated groups are the direct generalization of twins and triples to N cells.

The Principle

An isolated group forms when N cells in a unit collectively contain only N different candidates. These N digits are then "locked" into those N cells: no other cell in the unit can hold them.

You can therefore eliminate these N candidates from every other cell in the unit. This is the generalization of twins (N=2) and triples (N=3) to N=4 and beyond.

Worked Example

In a region, four cells hold only the candidates 1, 4, 6 and 9 (spread among them). These four cells form an isolated group: the digits 1, 4, 6 and 9 cannot appear anywhere else in that region. Remove them from the candidate notes of every other cell.

Practical Tip

The larger N is, the rarer and harder to spot the group — but also the more powerful the resulting elimination. In practice, groups of size 4 (quads) are the largest you'll typically encounter in a standard sudoku.

Hidden pairs and triples

Unlike naked pairs and triples, hidden pairs/triples are more discreet: the cells involved also contain other candidates that mask the relationship.

The Hidden Pair

If two digits appear as candidates only in exactly two cells of the same unit, then those two cells can only hold those two digits — even if their notes show other candidates too. You can therefore eliminate every other candidate from those two cells.

The Hidden Triple

Same logic extended to three digits that are candidates in only three cells of a unit. Those three digits are "trapped" in those three cells: any other candidates found there can be crossed out.

Worked Example

In a column, the digits 1 and 8 can only be placed in cells C and F. Even if C holds the candidates (1, 3, 5, 8) and F holds (1, 2, 8), we know 1 and 8 are reserved for them. So we erase the 3, the 5 and the 2 from their respective notes.

Practical Tip

Hidden pairs and triples are trickier to spot because they hide among cells crowded with candidates. Scanning digit by digit within each unit helps detect them.

Mixed groups

Mixed groups (Hidden Subsets) are the hidden counterpart of isolated groups: instead of looking at cells that only contain certain candidates, you look at candidates that only appear in certain cells.

The Principle

A mixed group forms when N digits appear as candidates only in exactly N cells of a unit. These N cells "monopolize" those N digits — even if they also contain other candidates, which can then be eliminated.

Difference From Isolated Groups

  • Isolated group: you start from the cells → their candidates are few and confined to each other.
  • Mixed group: you start from the digits → they only appear in a few cells, which may look "crowded".

Worked Example

In a row, the digits 2, 5 and 7 appear as candidates only in cells B, E and G. These three cells form a mixed group: the 2, the 5 and the 7 are reserved for them. You can therefore erase every other candidate present in B, E and G.

Practical Tip

This technique requires scanning each digit individually within a unit to see how many cells it appears in. A well-kept candidate table is essential so you don't miss these groups, which are often very rewarding in Expert grids.

Region interactions

This technique exploits the relationship between a region (3×3 box) and the rows or columns that cross through it.

The Principle

If within a region, a candidate can only appear in cells aligned on a single row (or column), then that candidate is impossible anywhere else on that row (or column) outside the region.

Conversely, if a candidate has already been eliminated from every cell of a row within a region except one, that digit must occupy that region on that row.

Worked Example

In the top-left region, the digit 6 can only be placed in the two cells of that region's first row. You can therefore eliminate the 6 as a candidate from every other cell on that same row, in the other two regions.

The Two Directions of Application

  • Region → Row/Column: A candidate confined to one row within a region gets eliminated from the rest of that row.
  • Row/Column → Region: A candidate absent from every cell of a row in two regions can only be placed in the third region on that row.

Practical Tip

This technique is very effective starting from Medium level and makes an excellent starting point before tackling more advanced techniques.

The X-Wing method

The X-Wing is an advanced technique built on symmetry between two rows and two columns, letting you eliminate candidates at a distance.

The Principle

If a candidate digit appears in exactly two cells on each of two different rows, and those cells sit in the same two columns, then that digit will necessarily form a rectangle (the "X-Wing").

No matter the exact layout, this digit will occupy two of the four corners of that rectangle — meaning it cannot appear elsewhere in those two columns. You can therefore eliminate it from every other cell in those columns.

Worked Example

The digit 4 is a candidate only in columns 3 and 7 on row 2, and also only in columns 3 and 7 on row 8. These four cells form an X-Wing. You can therefore eliminate the 4 from every other cell in columns 3 and 7.

The Column Version

The technique works identically in the other direction: if the candidate appears in only two cells on each of two columns, and those cells share the same two rows, eliminate that candidate from the rest of those two rows.

Practical Tip

The X-Wing is often the first "big leap" into expert techniques. To spot it, look for a digit that appears exactly twice per row (or column) and check whether those pairs line up vertically (or horizontally).

The Swordfish method

The Swordfish is the natural extension of the X-Wing: where the X-Wing uses 2 rows and 2 columns, the Swordfish uses 3 rows and 3 columns.

The Principle

If a candidate digit appears in two or three cells on each of three different rows, and all those cells sit within the same three columns, then that digit cannot appear elsewhere in those three columns. Eliminate it from every other cell in those columns.

The key condition: the union of the columns involved across the three rows must not exceed 3 distinct columns.

Worked Example

The digit 7 appears only in columns 1, 5 and 8 on row 2; in columns 1 and 8 on row 5; and in columns 5 and 8 on row 9. These three rows cover exactly three columns (1, 5, 8): a Swordfish is formed. You can eliminate the 7 from every other cell in columns 1, 5 and 8.

The Column Version

As with the X-Wing, the technique also applies starting from three columns to eliminate within three rows.

Practical Tip

The Swordfish is hard to spot by eye because it spans a large part of the grid. It's almost exclusively useful on Expert grids. Carefully note all your candidates before looking for it.

X-Chains

X-Chains generalize the X-Wing into a chain of alternating deductions about a single candidate digit.

The Principle

You build a chain of cells linked to each other by a shared candidate. Each link in the chain is either strong (the candidate must be in one or the other of the two linked cells) or weak (the candidate could be in both, but if one is true, the other is false).

By alternating strong and weak links, you build a chain whose two ends have a predictable relationship. If the two ends can both "see" the same third cell, then that candidate can be eliminated from that third cell.

Strong Link vs Weak Link

  • Strong link: within a unit, the candidate appears in only two cells — one of them must necessarily contain it.
  • Weak link: within a unit, the candidate appears in several cells — if one contains it, the others cannot.

Practical Tip

The X-Wing is actually a special case of an X-Chain with two strong links. X-Chains let you go further on irregular configurations that the X-Wing and Swordfish can't handle.

Skyscraper

The Skyscraper is an elegant and relatively accessible technique among the advanced methods. It looks like an "asymmetric" four-cell X-Wing.

The Principle

You look for a candidate digit that appears in only two cells on each of two rows (like an X-Wing), but this time the pairs share only one common column — and the two other cells sit in different columns.

These two "offset" cells (the tips of the skyscraper) can both see one shared third cell. If that's the case, you eliminate the candidate from that third cell: no matter which of the two non-shared columns ends up holding the digit, the cell visible to both will always be excluded.

Worked Example

The digit 3 appears only in columns 2 and 6 on row 1, and in columns 2 and 9 on row 7. Column 2 is common to both rows (that's the "trunk" of the skyscraper). The tips are in column 6 (row 1) and column 9 (row 7). If a cell is visible from both tips, remove candidate 3 from it.

Practical Tip

The Skyscraper is a great complement to the X-Wing for configurations where perfect symmetry doesn't exist. Spot it by looking for two pairs of the same candidate across two rows (or columns) sharing one common column (or row).

The XY-Wing method

The XY-Wing (or Y-Wing) is a three-cell chain deduction technique, more flexible than the X-Wing since it doesn't rely on rectangular symmetry.

The Principle

You start from a pivot cell that holds only two candidates, for example (X, Y). This cell can see two other cells called wings:

  • Wing 1: holds candidates (X, Z)
  • Wing 2: holds candidates (Y, Z)

Whatever the pivot's value (X or Y), one of the two wings will necessarily hold Z. So any cell visible from both wings cannot hold Z — you can eliminate it from its candidates.

Worked Example

The pivot at row 4, column 5 holds (3, 7). Wing 1 at row 4, column 9 holds (3, 5). Wing 2 at row 1, column 5 holds (7, 5). The digit 5 is the shared Z. Any cell visible from both wings — here, the cell at row 1, column 9 — cannot hold the 5.

Conditions for Use

  • The pivot must have exactly 2 candidates.
  • Each wing must have exactly 2 candidates, sharing one digit with the pivot and one common Z digit with the other wing.
  • Each wing must be visible from the pivot (same row, column or region).

Practical Tip

Concentrate first on cells with two candidates — they're your potential pivots. Then look for two other bi-value cells each sharing one candidate with the pivot and one common Z candidate with each other.

XY-Chains

XY-Chains extend the XY-Wing into a chain of arbitrary length, offering much greater elimination power.

The Principle

You build a chain of cells, each holding only two candidates. Two consecutive cells in the chain always share one common candidate (the link). The chain thus alternates between the two candidates of each cell.

The two ends of the chain share one common candidate Z. If a third cell is visible from both ends, it cannot hold Z — whatever the chain's actual configuration, one of the two ends will always hold Z.

Difference From the XY-Wing

The XY-Wing is really an XY-Chain of length 3 (pivot + 2 wings). XY-Chains can extend to 4, 5, 6 cells or more, allowing eliminations across areas of the grid the simple XY-Wing cannot reach.

Practical Tip

XY-Chains are very powerful but require rigorous notation of every candidate. First spot every bi-value cell in the grid, then try to link them into a chain. Solving software can help visualize these chains at first.

Simple coloring

Simple coloring (Simple Coloring) is a visual technique that exploits strong links between cells to deduce a candidate's value through contradiction or convergence.

The Principle

You pick a candidate and identify every strong link involving it (units where it appears in only two cells). You then "color" those cells, alternating two colors — say red and blue — following the strong links.

Cells of the same color form a group: if one of them holds the candidate, all others of the same color hold it too, and every cell of the other color does not.

The Two Types of Elimination

  • Internal contradiction: If two cells of the same color can see each other, that color is impossible — all its cells are eliminated, and the other color is confirmed.
  • External elimination: If a third cell (outside the chain) is visible from both a red cell and a blue cell, it cannot hold the candidate — whichever color turns out to be true, that third cell will always be excluded.

Practical Tip

Simple coloring is especially effective on digits that form many strong links across the grid. It can be visualized directly on the grid with a two-color pencil, making it accessible even without digital assistance.

Been through all 13 techniques? Find them all recapped in the complete method, level by level on the blog.

Extreme level

No Sudoku-Land puzzle needs these techniques: our five levels, from Easy to Evil, can all be solved with the ones in the Tips section. They are used by the step-by-step solver, when a puzzle from elsewhere resists everything else. It ranks them “Extreme”, outside our grading scale.

They are listed in the order the solver tries them: from the easiest to read to the heaviest. They all rest on the same idea — two possibilities lead to the same result, or one possibility leads to a contradiction.

Vocabulary

  • R4C7: the cell in row 4, column 7 (the solver's notation). The solver calls regions “blocks”.
  • Two cells see each other when they share a row, a column or a region: they cannot hold the same digit.
  • Strong link: of two options, at least one is true. A cell with only two candidates, or a digit with only two places in a row, column or region.
  • Weak link: two options cannot both be true. Two candidates of the same cell, or the same digit in two cells that see each other.

Choose a technique from the menu to learn more.

XYZ-Wing

The XYZ-Wing is a cousin of the XY-Wing: this time the pivot has three candidates instead of two.

The Principle

The pivot holds (X, Y, Z). It sees two wings, one (X, Z), the other (Y, Z). If the pivot is X, the first wing is Z; if it is Y, the second one is; otherwise the pivot itself is Z. So Z is always in one of the three cells.

A cell that sees all three at once cannot hold Z. In practice, such cells are always in the pivot's region.

Worked Example

The pivot R2C2 holds (1, 4, 7). It sees R2C8 (1, 7) on its row and R3C1 (4, 7) in its region. The shared Z is 7. R2C1 and R2C3 see all three cells: remove the 7 from their candidates.

Key Point

Less powerful than the XY-Wing (the target must see three cells, not two), but spotted the same way: start from cells with three candidates and look for two bi-value cells they see.

W-Wing

The W-Wing connects two identical cells that don't see each other, through a strong link.

The Principle

Two cells have the same two candidates (X, Y) and don't see each other. Elsewhere, digit X has only two places in a row, column or region, and each of those places sees one of the two cells.

One of the two places holds X, so the cell it sees is not X: it is Y. At least one of the two cells is therefore Y. A cell that sees both cannot hold Y.

Worked Example

R1C2 and R6C7 both hold (5, 8). In column 4, the 5 can only go in R1C4 or R6C4. R1C4 sees R1C2, R6C4 sees R6C7: one of the two cells must be 8. R1C7 and R6C2 see both cells: remove the 8 there.

Key Point

Look for two matching bi-value cells far from each other, then for a digit that bridges them.

Empty Rectangle

The Empty Rectangle combines a region where a digit is trapped in a cross shape with a strong link outside it.

The Principle

In a region, all the possible places of a digit lie on one row and one column that cross. The other cells of the region (the “empty rectangle”) don't hold it.

Outside the region, the digit has only two places in a column, one of them on the cross's row. The cell where the other place's row meets the cross's column cannot hold the digit. The mirror version (strong link on a row) works the same way.

Worked Example

In region 5, the 3 is only possible on row 5 or column 6. In column 2, the 3 can only go in R5C2 or R9C2.

If R9C6 were 3: R9C2 would not be 3 (same row), so R5C2 would be. Row 5 could no longer hold region 5's 3, which would have to be on column 6… already taken by R9C6. Region 5 would have no 3 left: impossible. Remove the 3 from R9C6.

Key Point

Look for regions where a digit has only three or four places forming a cross, then for a strong link starting from one of its arms.

Finned fish

The X-Wing and the Swordfish belong to the “fish” family. Sometimes one is almost there: just one candidate too many, the fin.

The Principle

A digit would form a perfect X-Wing on two rows, except for one or two extra cells, all in the same region: the fins. Either way:

  • either a fin holds the digit;
  • or it doesn't, and the X-Wing is perfect.

Only the cells eliminated in both cases are safe: those in the X-Wing's columns that are also in the fins' region.

Worked Example

On row 2, the 7 is only possible in columns 3 and 8. On row 7, it is possible in columns 3 and 8, but also in R7C9: that's the fin, in region 9.

If R7C9 is 7, R8C8 and R9C8 see it. If not, the X-Wing on columns 3 and 8 removes the 7 from the rest of column 8. Either way, remove the 7 from R8C8 and R9C8.

The Finned Swordfish

Same reasoning on three rows and three columns: if the Swordfish is imperfect because of fins grouped in a single region, eliminate in the cells of the three columns that lie in that region.

Unique Rectangle

This technique uses a property of the puzzle itself: a well-made puzzle has only one solution.

The Principle

Four empty cells form a rectangle over two rows, two columns and two regions. If they could only hold X and Y, the X's and Y's of the four cells could be swapped: every row, column and region would keep its two digits. The puzzle would have two solutions.

So when three of the cells only have (X, Y), the fourth can be neither X nor Y: remove both candidates from it.

Worked Example

R1C1, R1C5 and R3C1 hold (2, 6). R3C5 holds (2, 6, 9). The four cells are in regions 1 and 2. If R3C5 were 2 or 6, the puzzle would have two solutions: so it is 9.

Key Point

Only use it on a puzzle with a single solution. The solver checks this before starting. On a puzzle with several solutions, this deduction can be wrong.

BUG+1

BUG stands for Bivalue Universal Grave. Like the Unique Rectangle, the technique relies on the solution being unique.

The Principle

Picture a puzzle where every empty cell has exactly two candidates, and every digit is a candidate exactly twice in each row, column and region. Such a puzzle never has a single solution: that's the “grave”.

If every empty cell has two candidates except one, which has three, that cell is the only thing keeping the puzzle out of the grave. It takes the digit that appears three times in its row, column and region.

Worked Example

Every empty cell has two candidates, except R5C5 which has (1, 4, 8). In row 5, column 5 and region 5, the 4 is a candidate three times, the 1 and the 8 twice. So place the 4 in R5C5.

Key Point

It shows up at the very end of a puzzle, when almost only bi-value cells remain. Same caveat as the Unique Rectangle: a single solution is required.

AIC chains

The AIC (Alternating Inference Chain) is the general form of X-Chains, XY-Chains, the Skyscraper and the W-Wing. It freely mixes digits and cells.

The Principle

You chain options (one cell, one digit) alternating strong links and weak links (see this section's intro). The chain starts and ends with a strong link.

Assume the first option is false: the strong link makes the next one true, the weak link makes the one after false, and so on to the end, which is true. So at least one of the two ends is true. Any candidate incompatible with both at once is eliminated.

Worked Example

Suppose R1C1 is not 5:

  1. in row 1, the 5 only goes in R1C1 or R1C6, so R1C6 = 5;
  2. so R1C6 ≠ 2 (a cell holds only one digit);
  3. in column 6, the 2 only goes in R1C6 or R8C6, so R8C6 = 2;
  4. so R8C2 ≠ 2 (same row);
  5. R8C2 only has candidates 2 and 5, so R8C2 = 5.

Conclusion: R1C1 = 5 or R8C2 = 5. A cell that sees both, such as R1C2 or R8C1, cannot hold the 5.

Key Point

The solver looks for the shortest chain and shows each link with its reason. Follow it on the grid: it's the best way to learn to spot them.

ALS-XZ

ALS stands for Almost Locked Set. The technique connects two such sets through two shared digits, X and Z.

The Principle

An almost locked set is N cells of the same row, column or region with only N + 1 candidates between them. A cell with two candidates is one. It has one digit too many: if it loses one, all the others are placed in it.

Two sets A and B share digits X and Z. If every possible X of A sees every possible X of B, X cannot be in both. At least one set loses the X, and then holds all its other digits, including Z. So Z is in A or in B: a cell that sees every Z of both sets cannot hold it.

Worked Example

Set A: cell R1C4 (3, 6). Set B: R7C4 (3, 9) and R8C5 (6, 9), two cells of region 8 for three digits. The only 3s are in R1C4 and R7C4, which see each other (column 4): X = 3. Z is the 6, in R1C4 or R8C5. R1C5 and R8C4 see both cells: remove the 6 there.

Key Point

The solver keeps the smallest possible sets (up to 4 cells each) so the explanation stays readable.

Forcing chains

The last resort before trial and error: make an assumption and see where it leads. The difference with a plain guess is that everything is justified, step by step.

The Forcing Chain

Start from a cell with two candidates, or a digit with only two places in a row, column or region. Try each option and chain the singles (naked and hidden). Two possible outcomes:

  • Contradiction: one option leads to a cell with no candidate, or a digit with no place in a unit. That option is false.
  • Same conclusion: both options lead to the same digit in the same cell. That digit is certain.

Worked Example

Cell R3C4 is 2 or 7. If it is 2, three singles later, R6C8 = 5. If it is 7, two singles later, R6C8 = 5 as well. Whatever R3C4 is, place the 5 in R6C8.

The Dynamic Forcing Chain

Same principle, but after the assumption the solver applies every technique of our grading scale (pairs, X-Wing, XY-Chains…), not just singles. The contradiction comes further along, sometimes after 20 to 45 deductions: the solver shows the main ones.

This is how the solver cracks puzzles known as some of the hardest ever, such as AI Escargot (Arto Inkala, 2006), without trial and error. To save time, it shows the conclusion first (“Result of this step”), then the proof.

Key Point

Beyond that, on a few extreme puzzles, no deduction is found within a few seconds: the solver says so and finishes by trial and error (backtracking).

Want to see them at work? Enter a hard puzzle in the step-by-step solver: every “Extreme” step links back here.