Swordfish Sudoku Explained: How the X-Wing Family Cracks Hard Puzzles
BLOGGame Guides & Tips

By iqiqgame.com Team Nov 29, 2026 8 min read

Learn how X-Wing and Swordfish sudoku patterns work, why they are mathematically valid (Crook's 2009 AMS algorithm), and a step-by-step scan to spot fish fast.

You're twelve moves into a hard sudoku, every easy number is filled in, and the hint button keeps muttering about "fish." Nobody catches a fish. What the hint means is a family of elimination patterns — X-Wing, swordfish, and their bigger sibling Jellyfish — that share one logical engine. The confusing part is that most explanations just hand you a grid picture and a definition. Here we'll build the logic from the ground up once, so all of the patterns in the family come out of it for free, and you'll know exactly where to look for them on a real board.

If you're still working through scanning and pairs, start with our beginner sudoku techniques first, because every fish pattern assumes you're already keeping pencil marks. You can practice on our free 9×9 sudoku or warm up on the 6×6 version while you read.

Why Easy Techniques Stop Working on Hard Puzzles

Early in a puzzle, most cells fall to direct logic: a row already has seven digits, so the last empty cell takes the eighth. That's scanning. It works while the grid is crowded with clues. On hard puzzles, the clue count drops, candidates multiply, and no cell is forced by a single line of sight anymore. You've exhausted what you can see directly, but the puzzle still has exactly one solution — good setters guarantee that, and we've covered the mathematics of unique solutions separately. The information you need is now spread across several rows and columns at once, which is precisely what fish patterns harvest.

How stubborn can that get? A 2012 study in Nature Scientific Reports, described accessibly by Plus Magazine, modeled sudoku solving as a constraint system and showed that brute-force search on a hard puzzle would take a supercomputer on the order of 10^27 seconds — roughly 3×10^19 years, far longer than the age of the universe. Humans solve the same puzzle in minutes because we don't brute-force; we exploit structure. The American Mathematical Society makes the same point from the other direction: sudoku grids are Latin squares, and the solution process is a chain of logical deductions, not trial and error. Fish patterns are the first rung of that chain beyond the basics.

The One Idea Behind Every Fish: Line Occupancy

Turn on pencil marks and look at one candidate number — say 6. In some rows, the 6 can go in three or four places. In others, it can only go in two. That second kind of row is where everything starts.

Here's the entire logical engine, borrowed from the strongest formal treatment of pencil-and-paper solving: J. F. Crook's algorithm, published in the Notices of the AMS in 2009. Crook organizes candidates into "preemptive sets" and proves an occupancy theorem: if a number's possible positions are confined to a fixed set of cells inside one row, column, or box, then that number must land somewhere in those cells — so no other cell in that same line can hold it. The Cornell math department's tutorial on sudoku solving algorithms walks through the same theorem in plain language if you want the proof steps.

A fish is what happens when the "confined set of cells" spans two or more rows at once. If digit 6 must live in one of two cells in row 2, and one of two cells in row 6 — and both rows' pairs sit in the same two columns — then the two columns are fully booked. Between those rows, a 6 lands in each of the two columns no matter which arrangement is true. Every other cell in those columns can be stripped of its 6. That's X-Wing. Extend the same counting to three rows and three columns and you get Swordfish. Four and four gives Jellyfish. One argument, three patterns.

Pencil tick marks filling the corners of cells on a wooden sudoku tray

X-Wing: The Two-Line Fish

The recognition conditions

Pick a digit. Find a row where that digit appears as a candidate in exactly two cells. Find a second row where it also appears in exactly two cells — and the two columns match perfectly. Four cells, corners of a rectangle. That's the pattern. Note what is not required: the four cells do not need to sit in the same boxes, because a fish uses row-and-column logic only.

Why it works — and which lines to clear

Row 2's 6 must land in column A or column B. Row 6's 6 must also land in column A or column B. Two rows, two columns, and neither row can take both columns — so one row claims A and the other claims B, or vice versa. Either way, column A contains a 6 from one of the two rows, and column B likewise. The 6s in column A and column B are already accounted for; no other cell in either column can be a 6.

The direction rule trips up almost everyone at least once: the two lines where you found the pattern (the base lines) are safe — nothing gets deleted there. The two lines the pattern points at (the cover lines, here the columns) are where candidates get removed, and only in cells outside the rectangle corners.

Four cream pebbles at the corners of a rectangle on an empty wooden sudoku grid

Common misreads

  • A base row with a third candidate for the digit kills the pattern — the row could then escape to the third column and the occupancy argument collapses.
  • Columns that almost match (A/B in one row, A/C in the other) form nothing. The column pair must be identical.
  • Deleting from the base rows instead of the cover columns — remember, corners keep their candidates.
  • Worrying about which boxes the corners fall in. Irrelevant. The rectangle may look lopsided and still be a perfect X-Wing.

Swordfish: The Three-Line Fish

The recognition conditions

Swordfish is the same argument, one size up. Pick a digit and look for three rows in which that digit appears as a candidate in two or three cells each — and every one of those cells falls inside the same three columns. Three base rows, three cover columns. That's the fish.

Why it works

Count the claims. Each of the three rows must place the digit somewhere within the three cover columns — that's three placements owed. Each cover column can accept only one of that digit — that's exactly three slots available. Three demands, three slots: the columns are fully consumed by these rows, so any candidate for that digit in a cover column outside the three base rows can be eliminated. The proof needs no particular corner cells to exist, which is why Swordfish is more forgiving to spot than X-Wing in one sense — corner cells can even be missing — but harder, because you're matching a three-way spread instead of a neat rectangle.

Slate pebbles spread across three rows confined to three columns of a wooden sudoku grid

One caution: a base row with four or more candidates for the digit breaks the count (three rows could then owe four placements, exceeding three slots). The pattern needs each base line's candidates confined to the cover lines.

The family in one line

X-Wing (2×2), Swordfish (3×3), Jellyfish (4×4): same occupancy argument at different widths. This is why learning the why pays — you're not memorizing three techniques, you're learning one technique with three sizes. Bigger fish are rarer and slower to spot, which is why solvers search in order: X-Wing first, Swordfish second.

How to Actually Spot One (Without Staring Forever)

Fishing blind across the whole grid is exhausting. Use a procedure instead:

  1. One digit at a time. Pick a digit with several unplaced copies left — 6, 7, 8 are common candidates.
  2. Count candidates per row. Note rows where the digit appears exactly twice (for X-Wing). Three-or-fewer rows where it stays within the same three columns are Swordfish territory.
  3. Match the columns. For every pair of two-candidate rows, compare column sets. Identical pair? X-Wing. Keep going across the grid — check all rows, not just the first one that catches your eye.
  4. Flip direction if nothing turns up. Rows dry? Repeat the count down columns, hunting a column-based fish that eliminates in rows.
  5. Clear, then slow down. After a legitimate elimination, look for a fresh naked single before hunting another fish. Fish patterns usually work indirectly: they remove a candidate, and that removal creates a cell with only one option left.

Where does this sit in the toolbox? After naked and hidden pairs, before chain techniques like coloring or XY-Wing. If pairs haven't cracked it and you haven't built chains yet, fish are the highest-yield scan you haven't used yet. And if the grid still won't move, that's a signal the puzzle is expert-grade — not that you should guess. Every published sudoku has a unique solution reachable by logic alone, so a stuck grid means a technique you haven't applied yet, never a coin flip.

Practice: Where Fish Patterns Actually Appear

Expect fish on hard and expert boards, rarely on easy ones — easy grids are built to fall to singles and pairs. When you play sudoku online, turn notes on from the start; a fish you can't see is a fish you don't have. A good first session: play one board hunting only for X-Wings, then a second board where you deliberately slow down at step 2 and let Swordfish candidates surface. The 6×6 grid is a faster sandbox for rehearsing the counting argument, since fewer columns means fewer places for the pattern to hide — try it here.

A person puzzling over a wooden sudoku tray beside a laptop on a warm desk

The payoff for all this is bigger than two techniques. Once the occupancy argument clicks, you'll read a hint like "swordfish in rows 2, 4, 9" and know instantly what it's claiming, which lines are safe, and where the deletions land. That's the difference between following hints and actually solving.

References