Skip to content
poozee

Strategy Guides

Sudoku Swordfish Explained: How to Find One, With Real Examples

How the Sudoku Swordfish works, how to find one in your pencil marks, and when it beats an X-Wing, measured on 10,000 Expert puzzles, with two real examples.

By Poozee Editors11 min read

A Sudoku Swordfish is an X-Wing with three rows instead of two: a digit whose pencil marks in three rows all sit in the same three columns. Each row needs that digit, and no two of them can put it in the same column, so the three columns get their copy from those three rows, and you can erase the digit from every other cell of those three columns. A row may have two marks or three, and the same works with rows and columns swapped.

Below are two Swordfish from real puzzles made by Poozee's Sudoku generator, a step list for finding them, and what we measured on 10,000 Expert puzzles, including how often a Swordfish is just an X-Wing in disguise. Every diagram and number on this page is checked by code against the game's engine. If X-Wings are new to you, read our Sudoku X-Wing guide first: a Swordfish is the same idea, one size up.

Why a Swordfish works

Take the first example below. Digit 7 has very few pencil marks left in rows 3, 6 and 7:

  • Row 3 needs a 7, and it can only go in column 2 or column 9.
  • Row 6 needs a 7, and it can go in column 2, 6 or 9.
  • Row 7 needs a 7, and it can only go in column 2 or column 6.

That's three 7s, one per row, all inside columns 2, 6 and 9. No column can hold two of them, so they land in three different columns: one 7 in column 2, one in column 6 and one in column 9. Each of those columns gets its 7 from rows 3, 6 or 7, so no other cell in columns 2, 6 or 9 can be a 7. You don't learn which 7 goes where, and you don't need to.

As with the X-Wing, the three rows you start from are the base and the three columns you erase from are the cover. Swap "row" and "column" everywhere for a column-based Swordfish.

How to read the diagrams

Rows are numbered 1 to 9 from the top and columns 1 to 9 from the left, so r3c2 is row 3, column 2. Black digits (white in dark mode) are clues and blue digits were placed earlier with singles, pairs, pointing and claiming. Each diagram is the exact spot where those techniques got stuck.

The small digits are pencil marks, shown for the Swordfish's three rows and three columns (and, in Example 2, for one box the text needs). They are the marks left after pairs, pointing and claiming erased everything they could. The tinted lines are the base, the yellow cells hold the Swordfish's digit in the base lines (the digit is ringed), and the red cells are where the Swordfish erases it (crossed out).

Example 1: a row Swordfish on 7

This Expert puzzle starts with 24 clues. Singles, pairs, pointing and claiming fill 15 cells and then nothing works. Here are the 7s in rows 3, 6 and 7:

  • Row 3 has five empty cells, but 7 is a pencil mark in only two of them: r3c2 and r3c9.
  • Row 6 has only three empty cells left, r6c2, r6c6 and r6c9, and all three can be 7.
  • Row 7 has five empty cells, and 7 is a pencil mark in only two: r7c2 and r7c6.

Together that's columns 2, 6 and 9 and nothing else, so it's a Swordfish. 7 comes out of r2c2, r4c2, r5c2, r9c2, r5c6, r9c6 and r2c9.

112233445566778899817345926645791347824579364594589158478524783134671847295927815627347843782381785656915692456987335678956789412
A row Swordfish: the 7s in rows 3, 6 and 7 sit only in columns 2, 6 and 9, so 7 leaves seven cells of those columns.

r5c6 had only {4,7}, so it's now a 4: a naked single. The other 41 empty cells then fall to singles, pairs, pointing and claiming, with no other advanced step.

Notice the shape: two rows with two marks and one with three. Rows 3 and 7 share column 2 but not their other column, and row 6 has three marks, so no two of these rows make an X-Wing. It takes all three rows to close the pattern. This grid had no useful X-Wing at all, which is why it's a good one to learn from.

Example 2: a column Swordfish on 4

Another Expert puzzle, with 25 clues. The same techniques fill 20 cells and stall. This time, look down the columns for 4:

  • Column 1 has only two empty cells, r3c1 and r9c1, and both can be 4.
  • Column 2 has 4 as a pencil mark in three cells: r3c2, r6c2 and r9c2.
  • Column 7 has five empty cells, but 4 is a mark in only two: r6c7 and r9c7.

All of them are in rows 3, 6 and 9, so columns 1, 2 and 7 are the base and rows 3, 6 and 9 the cover. Each of those rows gets its 4 from one of the three columns, so 4 comes out of r3c5, r3c6 and r9c3.

1122334455667788993716845682158991582358578157846141458618945894578157832524637837162614758234591826371987923141458145823914567
A column Swordfish: the 4s in columns 1, 2 and 7 sit only in rows 3, 6 and 9, so 4 leaves r3c5, r3c6 and r9c3.

This time the new digit isn't in a crossed-out cell. Box 2 had three spots for 4: r1c5, r3c5 and r3c6. The Swordfish takes two of them, so r1c5 is a 4, a hidden single. From there the other 35 empty cells fall to the basic techniques alone.

How to find a Swordfish, step by step

  1. Get the pencil marks right first. A Swordfish is read entirely from the marks, so fill in every empty cell and apply pairs, pointing and claiming. One missing mark can invent a Swordfish; one stale mark can hide it.
  2. Pick one digit and count what's left. Nine minus the copies already on the grid is how many cells it still has to fill. With four or fewer left there's no Swordfish to find, and with five an X-Wing check finds the same eliminations (the table below shows why), so spend your Swordfish hunts on digits with six or more left.
  3. List the rows with two or three marks for that digit, with their column numbers: "row 3: 2, 9", "row 6: 2, 6, 9", "row 7: 2, 6". Rows with four or more marks can't take part.
  4. Look for three rows that use only three columns between them. Start from a three-mark row: its columns are the only possible cover, so you just check which two-mark rows fit inside it. Otherwise, chain two-mark rows that share columns, like 2‑9, 9‑6 and 6‑2.
  5. Check the three columns. Erase the digit from any of their cells outside the three rows. If there's nothing to erase, the Swordfish is real but useless.
  6. Turn it sideways. Do the same with columns, looking for three columns whose marks fall in only three rows.
  7. Go back to singles after every erased mark, and look for hidden singles in the boxes too, as in Example 2.

The lists are longer than an X-Wing's. On the stuck Expert grids we measured, each digit had on average 6.4 rows and columns with two or three pencil marks for it, against 3.9 with exactly two, the only ones an X-Wing can use. That's why the Swordfish is harder to spot: you compare more lines, three at a time instead of two.

Pro tip: Start with nearly full lines. In Example 1, row 6 had only three empty cells; in Example 2, column 1 had only two. A line with few empty cells is a line with few marks, and its columns (or rows) are most of the cover you test the other lines against.

How often a Swordfish helps: what we measured

We generated 10,000 Expert puzzles and 10,000 Hard puzzles with Poozee's generator (seeds 1 to 10,000, the same puzzles as in our X-Wing guide), solved each with the techniques the game uses to grade it (singles, then naked and hidden pairs, pointing and claiming), and looked for Swordfish at the exact spot where those techniques got stuck.

On Hard, you won't need one. Those techniques finished 9,997 of the 10,000 Hard puzzles, and none of the other 3 had a Swordfish. On Expert, the techniques got stuck on every puzzle:

At the stuck spot of 10,000 Expert puzzles Puzzles Share
A Swordfish that erases at least one pencil mark 495 5.0%
A Swordfish that leads straight to a new digit 128 1.3%
Swordfish are the only advanced step needed to finish 35 0.4%

So about 1 in 20 stuck Expert grids had a Swordfish. We found 658 of them at those stuck spots (some grids had more than one): 331 row-based and 327 column-based, and 198 (30.1%) led to a new digit on their own.

Which shapes you'll actually see

A Swordfish is named by how many marks each of its three lines has. Here is how the 658 split:

Marks per line Swordfish Share Leads straight to a new digit
2‑2‑2 327 49.7% 38.5%
2‑2‑3 (both examples) 255 38.8% 22.0%
2‑3‑3 74 11.2% 20.3%
3‑3‑3 2 0.3% 1 of 2

The textbook picture of three marks in every row was the rarest shape by far. Half the Swordfish had exactly two marks in every line. When no two of those lines match, the shape is a chain: columns A and B in one row, B and C in the next, C and A in the third. If you only hunt from three-mark rows, you'll miss half of them.

How many marks it erases

A Swordfish covers three columns, so it has more room to erase than an X-Wing: 3.8 pencil marks on average.

Pencil marks erased Swordfish Share
1 48 7.3%
2 99 15.0%
3 159 24.2%
4 145 22.0%
5 100 15.2%
6 or more 107 16.3%

Swordfish vs X-Wing

Measured at the same stuck spots of the same 10,000 Expert puzzles (the X-Wing numbers are from our X-Wing guide):

X-Wing Swordfish
Lines you compare Two, with two marks each Three, with two or three marks each
Available at the stuck spot 8.1% 5.0%
Leads straight to a new digit 1.6% 1.3%
Share of those found that lead to a new digit 20.7% 30.1%
Pencil marks erased, on average 3.1 3.8
Only advanced step needed to finish 0.4% 0.4%

That looks like a close race, but there's a catch: 316 of the 658 Swordfish (48.0%) erased exactly the same marks as an X-Wing in the same grid. How many cells the digit had left to fill decides most of it:

Cells left to fill Swordfish Same as an X-Wing Same as a Swordfish the other way
4 or fewer 0 - -
5 310 310 0
6 226 0 226
7 106 6 0
8 16 0 0
9 0 - -

That's no accident. If a digit has five rows and five columns left and three of each are a Swordfish, its marks in the other two columns can only sit in the other two rows. Those two columns are an X-Wing, turned the other way, erasing the same cells. With six left, the other three columns are a Swordfish of their own, based the other way, so it doesn't matter which direction you spot it in. Only on digits with seven or eight left did we find Swordfish that no X-Wing or reversed Swordfish matched.

The Swordfish earns its place only when the X-Wing comes up empty. That happened in 153 of the 10,000 grids (1.5%): a Swordfish, and no X-Wing that erased anything. A Swordfish led straight to a new digit where no X-Wing could in only 23 grids (0.2%). Adding Swordfish to X-Wings raised the share of Expert puzzles finished from 0.4% to 0.5%. The XY-Wing did far more for the same grids (available in 21.3% of them, and straight to a new digit in 14.9%), so when you're stuck: X-Wings first, then XY-Wings, then Swordfish.

What about a Jellyfish?

A Jellyfish is the four-line version: four rows whose marks for a digit fall in the same four columns. 319 of the stuck grids (3.2%) had a Jellyfish that erased something, but only 8 had one with no X-Wing or Swordfish to find instead. The reason is the same twin effect: of the 359 Jellyfish we found, 332 erased exactly the same marks as an X-Wing or a Swordfish in the same grid. Both of our examples have one, hiding in the columns (Example 1) or rows (Example 2) outside the Swordfish. A Jellyfish is a fine thing to know about, and rarely worth the search.

Common Swordfish mistakes

  • Four columns. Three rows whose marks spread over four columns are not a Swordfish, however close it looks. All the marks must fit in exactly three.
  • Erasing from the base rows. A row Swordfish erases only from its three columns, outside its three rows.
  • Expecting three marks per row. Only 2 of the 658 Swordfish we found had three in every line. Two-mark rows are the norm.
  • Missing the easier pattern. In 107 of the Swordfish (16.3%), two of the three lines already had their two marks in the same two places: an X-Wing, which you should have taken first.

Keep playing

Start an Expert Sudoku, switch on Notes (or press N) once singles run dry, and work through the step list above, one digit at a time, after your X-Wing and XY-Wing checks. If pairs, pointing and claiming still trip you up, our Sudoku strategies guide covers the techniques that come first, from singles to the X-Wing, and the patterns in our Minesweeper patterns guide reward the same habit of reading a few lines at once.

Frequently asked questions

What is a Swordfish in Sudoku?

Three rows where one digit's pencil marks all fall in the same three columns. Each row needs that digit and no two can share a column, so the three columns get their copy from those rows and the digit can be erased from the rest of those columns. It works the same with rows and columns swapped.

Does every row of a Swordfish need three pencil marks?

No. Each row needs two or three marks, as long as all of them fit in the same three columns. Of the 658 Swordfish we found on stuck Expert grids, 327 (49.7%) had exactly two marks in every row, and only 2 had three in every row.

Should I look for an X-Wing or a Swordfish first?

The X-Wing. It's easier to see, it was available more often (8.1% of stuck Expert grids against 5.0%), and 316 of the 658 Swordfish we found erased exactly the same marks as an X-Wing in the same grid.

What is a Jellyfish in Sudoku?

The four-line version: a digit whose marks in four rows all fall in the same four columns. On our stuck Expert grids, only 8 of 10,000 had a Jellyfish when there was no X-Wing or Swordfish to find, so it's rarely worth the search.