Swordfish: The Three-Line Pattern That Solves the Hardest Sudoku

Swordfish is X-Wing taken one size up: instead of two rows sharing two columns, three rows share three columns. It is the rarest technique we ship — across the whole 11,039-puzzle library, a Swordfish is needed just 60 times — and it is the hardest move this site will ask you to make.

It places nothing. It deletes a digit from a handful of cells, and that is enough to finish a puzzle that was previously stuck.

Swordfish

The three-line version of X-Wing.
6
2
3
9
4
5
1
8
7
1
7
3
8
9
2
6
9
8
7
6
1
2
3
4
5
3
8
2
9
4
1
4
1
8
7
3
9
2
2
9
1
4
8
3
8
9
1
5
2
6
7
3
4
3
2
4
9
7
1
8
3
8
1
2
9

How to spot it

For one digit, find three rows where all its positions fall inside the same three columns (or the other way round).

What to do

The digit must occupy those three columns in those three rows, so remove it from the rest of those columns. Rarer than X-Wing and a big step up in difficulty.

How to spot it

Take one digit. Choose a direction:

  • Rows. Find three rows in which that digit has two or three possible cells — and all of those cells fall inside the same three columns.
  • Columns. Find three columns in which the digit’s possible cells all fall inside the same three rows.

One row with four possible places breaks the pattern. And unlike X-Wing, you are not looking for exactly two positions per line: three positions each is fine, and common.

That is also why Swordfish is so easy to miss. The three rows do not look alike. One might have the digit in two cells, the next in three, the third in two.

A real example. Take this position and hunt for the digit 2:

       1 2 3   4 5 6   7 8 9
     +-------+-------+-------+
  1  | . 4 . | . . . | . 8 6 |
  2  | . 6 3 | . 9 8 | 4 5 7 |
  3  | . 5 8 | 4 6 . | . 9 3 |
     +-------+-------+-------+
  4  | . . . | 8 1 . | 6 2 5 |
  5  | . 1 5 | 6 . 9 | 8 7 4 |
  6  | . 8 . | 7 5 . | 9 3 1 |
     +-------+-------+-------+
  7  | . . . | . 8 1 | . 4 2 |
  8  | 5 . 4 | . . 6 | . 1 8 |
  9  | 8 2 1 | . 4 . | . 6 9 |
     +-------+-------+-------+

Check the three rows 2, 5 and 8 (call them the band) and count where a 2 can go in each:

  • Row 2 — givens 6, 3, 9, 8, 4, 5, 7. The 2 fits only in r2c1 and r2c4.
  • Row 5 — givens 1, 5, 6, 9, 8, 7, 4. The 2 fits only in r5c1 and r5c5.
  • Row 8 — given 5, 4, 6, 1, 8. The 2 fits only in r8c4 and r8c5.

Every one of those positions is inside columns 1, 4 or 5. Nothing lands in columns 2, 3, 6, 7, 8 or 9.

What to do with it

Each of the three rows needs a 2, and each of them must put it inside columns 1, 4 or 5. That is three 2s to place, into three columns. Which means columns 1, 4 and 5 use up their 2 inside this band — no matter how the three rows share them out.

Put the same thing as arithmetic, because that is what makes it undeniable:

row2 can go in2s this row contributes
r2c1, c4one
r5c1, c5one
r8c4, c5one
columns involved1, 4, 5three 2s in total

Columns 1, 4 and 5 each need exactly one 2. The three rows can only place their 2s inside those three columns, and three rows contribute exactly three 2s — so all three of the columns’ 2s are inside the band, whatever the arrangement. Nothing is left over for the rest of those columns.

So delete the 2 candidate from every other cell in columns 1, 4 and 5:

  • r1c1 (column 1, row 1)
  • r3c1 (row 3)
  • r6c1 (row 6)
  • r1c4 and r1c5 (row 1)

In this board those deletions are what clear the way — the puzzle is very close to finished at this point, and the remaining cells fall to techniques you already know.

Why it is the last technique you need

Our engine grades every puzzle by the hardest technique it requires, and it refuses to publish a puzzle it cannot finish with the nine techniques on this site. Swordfish is level 9 — the top of the ladder. If you can find a Swordfish, there is no sudoku in our bank you cannot finish without guessing.

Which is also why Swordfish is rare: a puzzle needing one is a puzzle most sudoku sites cannot grade honestly, and most “evil” difficulty labels are decided by how empty the grid looks instead.

If you cannot find one

Swordfish hunting has a cost, so be systematic rather than staring. Run the same scan as X-Wing, twice: for each digit, list the rows where it has three or fewer positions, then look for three of those rows whose columns overlap into three. If nothing turns up, go back and re-check the earlier techniques — in a puzzle that needs a Swordfish, an X-Wing or a locked candidate is very often hiding in a unit you have not revisited since the board changed.

Common mistakes

Expecting three candidates in every base line. Two of the three rows (or columns) may hold only two positions. What has to be true is that all candidates in the three base lines fall inside the same three cover lines.

Assuming the lines must be adjacent. Any three rows (or columns) will do. Swordfish are often found on rows 2, 5 and 8, which is why they are so hard to spot by eye.

Eliminating in the base lines instead of the cover lines. The digit must occupy one cell per base line, which forces three occupied cells across the cover lines — so the digit leaves every other cell of the cover lines. Removing it from the base rows is the mistake.

Calling a two-line pattern a swordfish. Two base lines is an x-wing. A four-line version exists (jellyfish) and is beyond what this site grades.

Mixing digits. Every candidate in the pattern must be for the same digit. This is the single most common way a “swordfish” turns out to be nothing.

Telling it apart from an x-wing

An x-wing is a rectangle: two lines, two cover lines, four corners. A swordfish is three lines covering three lines, so between six and nine candidate cells — and the shape is usually irregular, not a rectangle. If drawing the candidates gives you a clean rectangle, it is an x-wing; if you need three rows before the columns close up, it is a swordfish.

When neither fits, look for the fish with a different digit rather than a bigger fish with this one.

Top of the ladder. Everything this site grades above Expert is built from the nine moves you have now seen; the daily puzzle is a good place to keep them sharp. Previous step: XY-Wing. All Thirteen, in order: the strategy hub.

New to the notation? This page writes a cell as r3c8 — row 3, column 8 — and the notation page explains the rest of the shorthand.

Practise it: Swordfish drill — every position in the index is verified to need a Swordfish next. Related: X-Wing · XY-Wing.