Advanced Sudoku Techniques: X-Wing, Swordfish, and More

Once you’ve mastered naked singles, hidden singles, and pointing pairs, sudoku puzzles split into two groups: the ones you can still solve and the ones you can’t. The wall comes when basic techniques stop reducing candidates. To break through, you need pattern-based methods that operate across multiple rows and columns at once — X-Wing, Swordfish, XY-Wing, and a handful of coloring techniques. Here’s how each one actually works, with the underlying logic.
Key takeaways
- X-Wing eliminates candidates by finding a 2×2 rectangle pattern across rows or columns.
- Swordfish extends the X-Wing logic to a 3×3 pattern — same idea, one row larger.
- XY-Wing uses three bivalue cells (cells with exactly two candidates) to force eliminations.
- Simple coloring tracks chains of two-candidate cells to expose contradictions.
- None of these techniques guess — every one is a proof that a candidate cannot be in a given cell.
Before you start: candidate notation
Every advanced technique requires pencil marks. For each empty cell, write down every digit (1-9) that could legally go there based on the row, column, and 3×3 box constraints. Most digital sudoku apps do this automatically; if you’re on paper, you need a sharp pencil and a clean grid.
The techniques below operate on the candidate grid, not the filled-in digits. You’re looking for patterns in the pencil marks.
X-Wing
The first advanced technique most players learn, and the foundation for everything that follows. An X-Wing works like this:
Find two rows where a single candidate (say, 4) appears in exactly the same two columns. Suppose row 2 has 4 only as a candidate in columns 3 and 7, and row 6 also has 4 only as a candidate in columns 3 and 7. That’s an X-Wing on the digit 4.
Why it matters: in the final solution, two of those four cells must contain a 4 — and they’ll be on diagonally opposite corners of the rectangle. We don’t know which diagonal yet. But either way, columns 3 and 7 each get a 4 from this pattern. That means no other cell in column 3 or column 7 can contain a 4.
Eliminate the candidate 4 from every other cell in columns 3 and 7. That’s the X-Wing’s payoff. The pattern also works swapped: two columns where the candidate appears in only the same two rows, eliminating that candidate from the rest of those rows.
Recognizing an X-Wing in practice
Scan one candidate digit at a time. For each row, count how many cells contain that digit as a candidate. If exactly two rows each have it in exactly two columns, check whether those columns line up. If they do, you have an X-Wing.
Swordfish
A Swordfish is an X-Wing extended to three rows and three columns. The candidate digit appears in three rows, each row restricting that candidate to the same three columns (though not every row needs to fill all three — two or three candidate cells per row works).
Example: Candidate 7 appears in row 1 (columns 2, 5), row 4 (columns 2, 9), and row 8 (columns 5, 9). All occurrences fit within columns 2, 5, and 9. That’s a Swordfish.
The logic is the same as X-Wing: across those three rows, the candidate must take three of the nine intersection cells, one per row and one per column. That eliminates the candidate from every other cell in columns 2, 5, and 9.
Swordfishes are rarer than X-Wings but show up regularly in hard and expert-rated puzzles. The same shape exists in column form — three columns where a candidate is restricted to three rows.
Jellyfish
The next step up: four rows, four columns, same logic. Vanishingly rare and almost never required outside of expert-tier puzzles, but the principle is identical.
XY-Wing
The first technique on this list that involves three cells with different candidates working together. An XY-Wing requires three bivalue cells — cells that have exactly two candidates each — arranged in a specific pattern.
Setup: A “pivot” cell with candidates XY. Two “pincer” cells, each sharing a unit (row, column, or box) with the pivot. One pincer has candidates XZ, the other has candidates YZ.
The logic: If the pivot contains X, then the XZ pincer must contain Z. If the pivot contains Y, then the YZ pincer must contain Z. Either way, one of the two pincers contains Z.
The elimination: Any cell that shares a unit with both pincers cannot contain Z. Because whichever pincer ends up holding the Z, the third cell sees a Z and can’t have its own.
Worked example
Pivot cell at row 3 column 4 with candidates {2, 5}. Pincer A at row 3 column 7 with candidates {2, 8} (shares row 3 with pivot). Pincer B at row 6 column 4 with candidates {5, 8} (shares column 4 with pivot). The shared “Z” candidate between pincers is 8.
Any cell that sees both row 3 column 7 and row 6 column 4 — for instance, row 6 column 7 — cannot contain an 8. Eliminate 8 from row 6 column 7.
Simple coloring (single chains)
Coloring works on conjugate pairs — pairs of cells in the same row, column, or box where a specific candidate appears in only those two cells. If a candidate only fits in two cells of a unit, one of them is the answer.
The technique: Pick a candidate. Find every conjugate pair for that candidate across the grid. Color one cell of each pair “color A” and the other “color B.” Then chain pairs together — if a color A cell shares another conjugate pair with a new cell, that new cell becomes color B (the opposite color from the chain it joined).
The payoff: If two cells of the same color end up sharing a row, column, or box, that color must be wrong (a unit can’t have two of the same digit). Every cell of that color can be cleared of the candidate.
The second payoff: if a cell outside the chain sees both colors, that cell cannot contain the candidate — because one of the two colors is true, and whichever it is, the watching cell sees it.
Hidden subsets (pairs, triples, quads)
Easier than X-Wing but often overlooked. A hidden pair: two cells in a unit (row, column, or box) where two candidates appear in only those two cells across the entire unit. Even if those cells have other candidates, the other candidates can be eliminated — the two cells must take the two hidden-pair digits.
Hidden triples and quads extend the same logic to three or four candidates across three or four cells. Hidden subsets appear all the time in moderate and hard puzzles, and clearing them often unlocks chains of basic eliminations.
When to use what
Run through techniques in roughly this order, easiest first:
- Naked singles and hidden singles (always first).
- Naked pairs, hidden pairs, pointing pairs, box-line reductions.
- Naked triples and hidden triples.
- X-Wing.
- XY-Wing.
- Swordfish.
- Simple coloring.
- Jellyfish and more complex chains (rarely needed).
Most newspaper “diabolical” puzzles can be solved with X-Wing and XY-Wing alone. Apps that rate puzzles as “evil” or “expert” typically require Swordfish or coloring.
What about guessing?
Pure logical sudoku doesn’t require guessing — every well-formed puzzle has exactly one solution reachable through logical elimination. If you’ve exhausted advanced techniques and are still stuck, you’ve either missed a pattern or you’re working a puzzle that requires more obscure methods (forcing chains, finned X-Wings, Nice Loops).
Guessing — placing a candidate and following its consequences until you hit a contradiction or finish — works, but it’s called Trial and Error and most purists consider it cheating. The techniques above will solve any standard 9×9 puzzle.
Where to practice
Sudoku.coach and SudokuWiki both have free interactive tutorials for X-Wing, Swordfish, and the coloring methods. Sudoku.com’s expert tier and the New York Times Killer Sudoku regularly require advanced techniques. For more about the basics, see our how to solve sudoku guide; for variants, see our games like sudoku roundup. And when your eyes need a break from candidate grids, the Chrome Dino game doesn’t require any pencil marks.
Frequently asked questions
What is the difference between X-Wing and Swordfish?
X-Wing involves two rows and two columns; Swordfish involves three of each. They use the same underlying logic — a candidate restricted to a small set of intersecting rows and columns must occupy them in a way that excludes the same candidate from other cells in those columns or rows.
How do I spot an X-Wing quickly?
For each digit 1-9, scan rows looking for ones where the digit appears as a candidate in exactly two cells. When you find two such rows where the candidate columns match, that’s an X-Wing. Do the same scan column-by-column for the swapped version.
What’s a bivalue cell?
A cell that has exactly two candidates remaining. Bivalue cells are the building blocks of XY-Wings, XYZ-Wings, and many chain-based techniques. Marking them clearly on the grid speeds up advanced solving.
Is the XY-Wing the same as a Y-Wing?
Yes. They’re two names for the same pattern. Some sources also call it an XY-Wing because the pivot has candidates X and Y; others just use Y-Wing.
Do these techniques work on 16×16 or jigsaw sudoku?
Yes — X-Wing, Swordfish, and XY-Wing all generalize to larger grids and irregular regions. The candidate logic is the same; the scan just covers more cells. Most variant sudoku solvers use the same toolkit, plus a few region-specific tricks.
The bottom line
X-Wing teaches you to think across rows and columns simultaneously. Swordfish extends that thinking by one dimension. XY-Wing introduces multi-cell logic chains. Simple coloring formalizes chain thinking into a system. Learn them in that order, practice them on real puzzles, and the “hard” tier will start looking medium. The jump from intermediate to expert sudoku isn’t about smarter guesses — it’s about seeing patterns the basic techniques miss.








