How It WorksPublished 7 min read

Sudoku X-Wing and Swordfish Explained: How to Spot Them and Which Candidates You Can Remove

In advanced sudoku puzzles where even Naked Pairs and Naked Triples don't get you any further, the key is often the X-Wing, a technique that looks across the whole grid at a single digit. This guide explains why the X-Wing works using a real position, gives a step-by-step way to find one, extends it to the 3-row, 3-column Swordfish, and covers what to do when you can't find either.

What is an X-Wing?

The X-Wing is a technique that focuses on just one digit. When, in two columns, that digit's candidates appear only in the same two rows, the four candidate cells form the corners of a rectangle. You can then remove that digit from every other cell in those two rows. In Japan it is called "igeta riron", because the pattern looks like the crossing points of the character 井. The transposed version (the candidates in two rows appear only in the same two columns) works the same way.

A real example

Below are the candidates for 8 in columns 5 and 9 only, taken partway through an advanced puzzle. In both columns, 8 can only go in rows 3 and 7.

RowColumn 5Column 9
R13 (filled)8 not possible
R29 (filled)3 (filled)
R3Candidate 8Candidate 8
R4–R68 not possible8 not possible
R7Candidate 8Candidate 8
R86 (filled)2 (filled)
R97 (filled)4 (filled)

The 8s in columns 5 and 9 use up one place each in rows 3 and 7. That means you can remove 8 from the other cells in row 7 that had it as a candidate: R7C1, R7C3 and R7C8 (row 3 had no other candidates for 8). In the final solution, R3C9 and R7C5 were 8, which are indeed the two diagonal corners.

How to find an X-Wing

  1. 1

    Write all candidates in every empty cell correctly

    An X-Wing compares the positions of candidates, so if even one candidate is missing you will either miss it or remove something by mistake. Make sure your candidates reflect every elimination so far.

  2. 2

    Pick one digit and look for columns (rows) where it has exactly two candidates

    Go through 1–9 one at a time. Digits that already appear 5–6 times on the grid have fewer candidates and form patterns more easily, so check them first.

  3. 3

    Look for a pair with the same two positions

    If two or more columns have exactly two candidates, compare their row numbers. If they match, such as "rows 3 and 7", you have an X-Wing.

  4. 4

    Check whether anything can be removed

    Even if you find an X-Wing, it removes nothing unless the same digit is a candidate elsewhere in those two rows (columns). It only matters when there is something to remove.

If you can't find one in the columns, do the same with the rows. The key point is that the direction you search in (columns or rows with two candidates) is the opposite of the direction you remove from (rows or columns).

Swordfish: extending the X-Wing to 3 rows and 3 columns

The Swordfish extends the X-Wing to three rows (columns). If, in three rows, a digit's candidates appear in 2–3 places each and all of them together fit in the same three columns, you can remove that digit from the other cells in those three columns. Each row doesn't need three candidates; two each is fine.

Column 2Column 3Column 8
Row 2—Candidate 4Candidate 4
Row 5Candidate 4Candidate 4—
Row 8Candidate 4—Candidate 4

This is the pattern from a real position. In rows 2, 5 and 8, 4 can only go somewhere in columns 2, 3 and 8. The three rows' 4s use up one place in each of the three columns, so all the candidates for 4 in the other rows of columns 2, 3 and 8 (7 cells in this position) could be removed at once.

Common X-Wing mistakes

The X-Wing is powerful once you can see the shape, but getting even one condition wrong makes you remove candidates you shouldn't. A wrongly removed candidate shows up many moves later as "a cell with no possible digit", and tracking down the cause is painful. Check these points before removing anything.

MistakeWhy it's wrongHow to check
Using a column with three candidatesThe digit could still go in the third place, so you can't say the two rows are used upCount that each of the two columns has exactly two candidates
The two columns' rows are off by oneIt isn't a rectangle, so it doesn't work (if a third row is involved, it might be a Swordfish)Check that the four cells share the same two rows and the same two columns
Removing from the columns you searchedYou can only remove from the two rows (columns) in the opposite direction to the one you countedIf you counted in columns, remove from rows; if you counted in rows, remove from columns
Mixing candidates of different digitsAn X-Wing is built from one digit onlyChoose one digit and look only at its candidates
Outdated candidate notesYou build the pattern from candidates that should already be goneRewrite all candidates for the current grid before searching

When solving on paper, circling only the candidates of the digit you're looking at in a coloured pen makes the four-cell rectangle stand out, so it's easier to find and you make fewer mistakes. In Sudoku Next-Move Hints, turning on Show candidates fills in every empty cell's candidates automatically, so you can practise spotting the shape without worrying about missed or stale notes. When a hint shows an X-Wing, the four cells forming the pattern are highlighted and the cells with removable candidates are marked in red.

How often will you need it?

When we created 40 Advanced puzzles with Sudoku Next-Move Hints and solved them to the end, the X-Wing was used in 12 out of about 2,400 steps in total. You need it roughly once every few puzzles, and almost all steps are Hidden Singles. Even across 40 puzzles hard enough to require guessing, the Swordfish appeared only once.

  • First make sure you haven't missed any basic techniques or Naked Pairs and Naked Triples
  • If you are still stuck, do one lap of 1–9 looking for an X-Wing
  • If there is no X-Wing or Swordfish, the puzzle may need a trial placement

FAQ

Is "igeta riron" the same as the X-Wing?
Yes, it is the same technique. In Japan it is called igeta riron because the candidates look like the character 井, and in English it is called the X-Wing.
I found an X-Wing but no digit gets placed.
The X-Wing removes candidates, so it often doesn't place a digit right away. After removing them, check whether any new Hidden Singles or Naked Singles have appeared in the affected rows, columns and boxes.
Does a Swordfish need three candidates in each row?
No. It works as long as each of the three rows has 2–3 candidates and all of them together fit in three columns. Three rows with two candidates each also form a Swordfish.
Should I look for X-Wings in rows or in columns?
Both. There is the pattern "find two columns with two candidates each and remove from rows" and the pattern "find two rows with two candidates each and remove from columns". If you can't find one in one direction, search in the other too.
How can I tell whether a puzzle needs an X-Wing?
You can't tell just by looking at it. If you enter the puzzle in Sudoku Next-Move Hints, its difficulty is rated: Advanced means it needs a Hidden Pair, a Naked Triple or an X-Wing, and Expert means it needs a Swordfish. If you ask for a hint when stuck, it shows the name of the technique needed at that point.

Tools in this article

Related articles

How It Works14 min read

Normal Resting Heart Rate: Averages by Age and Sex, Causes of a High or Low Pulse, and How to Measure It Correctly

Your smartwatch or a checkup says "resting heart rate 72", but is that normal, high or low? The normal adult range is usually given as 60–100 beats per minute, yet 60 and 95 say quite different things about your body, and children and endurance athletes have different ranges altogether. This guide sorts the average and normal resting heart rate by age (infants, toddlers, school-age children, adults), by sex and by fitness level, then covers how to measure it properly first thing in the morning and the error built into a 15-second count, how a wrist count, a phone camera and a smartwatch differ, what can make it high or low and when to see a doctor, how to lower it, and how to use it to set Karvonen target heart rates. The age ranges and heart rate zone figures use the same reference values and formulas as the Heart Rate Monitor tool.

Read article →