Sooner or later every Sudoku solver hits the same wall: singles are gone, pairs and triples give nothing, and the grid still has dozens of empty cells. At that point many hard puzzles open up with a family of techniques called fish. The two you will meet most often are the X-Wing and the Swordfish. They look intimidating in diagrams, but they rest on one simple idea that you can check with your own eyes. This guide explains that idea, shows how to find fish in a real grid, and walks through examples step by step.
Notation used in this article
We name cells as rXcY: r is the row (1 to 9, top to bottom) and c is the column (1 to 9, left to right). So r4c7 is the cell in row 4, column 7. A candidate is a digit that is still possible in a cell according to your pencil marks. Fish techniques only work if your pencil marks are complete and correct for the digit you are studying.
The core idea: base sets and cover sets
Every fish is built from two groups of lines, and it always concerns a single digit:
- Base sets: the lines (rows, or columns) in which you look at where the digit can go.
- Cover sets: the lines in the other direction that contain all of those possible positions.
The rule is: if in N rows a digit can only appear inside the same N columns, then those N rows will use up the digit in all N columns. Every other cell of those columns can lose that candidate.
Why is that valid? Each base row must contain the digit exactly once, so the N rows produce N copies of it. All of them land somewhere in the N cover columns, and no column can hold the digit twice. So each cover column receives its one and only copy from a base row. There is simply no room left in those columns for the digit anywhere else. You do not need to know which arrangement is the true one; every possible arrangement leads to the same elimination.
X-Wing: the fish with two lines
An X-Wing uses two base lines and two cover lines.
Row-based X-Wing example
Suppose you focus on the digit 5 and find:
- In row 2, the 5 can only go in r2c3 or r2c7.
- In row 6, the 5 can only go in r6c3 or r6c7.
These four cells form the corners of a rectangle. There are only two ways to place the 5s: either r2c3 and r6c7, or r2c7 and r6c3 (the two diagonals, which is where the "X" in the name comes from). In both cases column 3 gets a 5 from row 2 or row 6, and column 7 gets the other one. Therefore the 5 can be removed from every other cell of columns 3 and 7. If, for example, r4c3, r9c3 and r8c7 still had a 5 as a candidate, all three of those candidates are eliminated.
Column-based X-Wing example
The same logic works with the directions swapped. Say the digit 4 can appear in column 1 only at r3c1 and r8c1, and in column 5 only at r3c5 and r8c5. Now the columns are the base sets and rows 3 and 8 are the cover sets. The 4 can be eliminated from all other cells of rows 3 and 8, for example r3c9 or r8c2.
Remember: you look for the pattern in the base lines, and you delete candidates in the cover lines. Mixing these up is the most common fish mistake.
Swordfish: the same idea with three lines
A Swordfish is an X-Wing extended to three rows and three columns. The important detail many players miss: a base row does not need to contain all three cover columns. It only needs at least two candidates (a row with one candidate would already be a hidden single), and all of its candidates must be inside the three cover columns.
Worked Swordfish example
Take the digit 7, with these candidate positions:
| Base row | Cells that can hold 7 | Columns used |
|---|---|---|
| Row 1 | r1c2, r1c6 | 2, 6 |
| Row 4 | r4c2, r4c9 | 2, 9 |
| Row 8 | r8c2, r8c6, r8c9 | 2, 6, 9 |
Rows 1, 4 and 8 each need one 7, and every possible spot lies in columns 2, 6 and 9. Three rows produce three 7s, they must sit in three different columns, so columns 2, 6 and 9 each receive their 7 from one of these rows. Result: the 7 can be removed from every other cell in columns 2, 6 and 9. If r3c6, r6c9 and r9c2 contained a 7 candidate, all of them go.
Notice that this is a "2-2-3" pattern. Patterns like "2-2-2" are valid too, for example one row with columns 2 and 6, another with columns 6 and 9, and a third with columns 2 and 9. These are the hardest Swordfish to spot, because no single row shows all three columns.
As with the X-Wing, there is a column-based Swordfish: three columns whose candidates for a digit lie in only three rows, with eliminations in those rows.
Jellyfish and why we stop there
The Jellyfish applies the same logic to four rows and four columns. It is rare in practice. Larger fish are not needed: whenever a fish of five or more lines exists in one direction, a smaller fish exists in the other direction that gives the same eliminations. So X-Wing, Swordfish and Jellyfish cover everything this family has to offer.
| Fish | Base lines | Cover lines | How often you will need it |
|---|---|---|---|
| X-Wing | 2 | 2 | Common in hard puzzles |
| Swordfish | 3 | 3 | Occasional in hard and expert puzzles |
| Jellyfish | 4 | 4 | Rare |
How to search for fish step by step
- Pick one digit. Fish are invisible if you look at all candidates at once. Many apps can highlight a single digit's candidates; otherwise scan for it deliberately.
- List the rows where the digit has only 2 or 3 candidates. Write down their column numbers, e.g. "row 1: 2, 6".
- Look for matches. Two rows with the same two columns form an X-Wing. Three rows whose columns together use only three different columns form a Swordfish.
- Check that eliminations exist. A perfect pattern is useless if the cover columns contain no other candidates of that digit.
- Repeat with columns as base sets, then move on to the next digit.
This sounds slow, but with practice the short list of column numbers per digit becomes quick to write and quick to compare.
Common mistakes
- Eliminating in the wrong lines. In a row-based fish, candidates are removed from the cover columns, never from the base rows themselves.
- A stray candidate. If one base row has the digit in a column outside the cover set, the pattern is broken. Every candidate in the base lines must be in the cover lines.
- Thinking every Swordfish row needs three cells. Two per row is enough, as shown above.
- Incomplete pencil marks. If you forgot to note a candidate, you may "see" a fish that does not exist and make an invalid elimination.
- Mixing digits. All cells of a fish must concern the same digit.
Where fish sit on the difficulty scale
In the widely used Sudoku Explainer (SE) rating, the X-Wing is rated around 3.2 and the Swordfish around 3.8, above pairs and triples but well below chains. If you want to know whether a puzzle will require such techniques, you can check its rating with our SE Rating calculator.
Conclusion
Fish techniques are all about one digit and one counting argument: N lines, N positions, no room left for anything else. Start by hunting X-Wings, which appear regularly, then train your eye on Swordfish with two-candidate rows. The best way to make this automatic is practice, so open a hard or expert puzzle on our Sudoku page, or try today's Daily Sudoku, and pick one digit at a time.