Generalising X-Wing: From Pairs to Swordfish and Beyond
The X-Wing pattern generalizes by expanding the number of rows or columns involved from two to three or four, creating the more complex Swordfish and Jellyfish patterns. An X-Wing is a 2-row, 2-column candidate pattern. Extending this logic to 3 rows/columns creates a Swordfish, and to 4 creates a Jellyfish. These are all part of a family of advanced solving techniques known as [fish patterns](/blog/sudoku-fish-patterns), which allow for powerful eliminations by focusing on how a single candidate number is arranged across the grid.
A Quick X-Wing Review
A standard X-Wing is the foundational fish pattern. It involves a single candidate digit. For a row-based X-Wing, that digit must appear exactly twice in two different rows, and those appearances must line up in exactly two shared columns. This forms a perfect rectangle. The core logic is that the digit must occupy the corners of this rectangle, forcing it to be eliminated from all other cells in the two involved columns. The pattern works identically for columns, looking for two columns where the candidate appears exactly twice and aligns on two rows.
- Always confirm the candidate appears exactly twice in each of the two rows (or columns).
- The aligned columns (or rows) must also contain exactly two appearances total.
Swordfish: The Three-Row Pattern
A Swordfish generalizes the X-Wing by expanding the pattern to three rows and three columns. For a row-based Swordfish, you look for a single candidate that appears in exactly two or three cells in each of three different rows. Critically, all these candidate cells must be confined to only three shared columns across those rows. The columns do not need to have the candidate appear in every intersecting row; the candidate's presence just must be limited to that set of three columns across the three chosen rows.
When this configuration is found, you can eliminate that candidate from all other cells in the three involved columns. This works because, just like in an X-Wing, the candidate is locked into one of the pattern's cells in each row. This row-based locking forces the candidate's final positions in the three columns. The same logic applies for a column-based Swordfish, where three columns confine the candidate to three rows, allowing eliminations in those rows. For a detailed walkthrough, see our guide on the Swordfish strategy.
Jellyfish: Scaling to Four Rows
The next step in generalization is the Jellyfish, which applies the same logic across four rows and four columns. To find a row-based Jellyfish, identify a candidate that appears in two to four cells in each of four different rows, with all appearances confined to only four shared columns. The pattern forms a 4x4 'net' in the grid.
If you validate this pattern, you can eliminate the candidate from all other cells in those four columns. The principle remains identical: the candidate's placement in the four rows is restricted to the four columns, creating a locked set. While rare in practice, spotting a Jellyfish can crack very hard puzzles. Understanding the Jellyfish strategy is key for tackling the most difficult Sudoku challenges.
General Rules and Overlapping Patterns
All fish patterns follow a consistent rule: for a pattern of size N (where N=2 for X-Wing, 3 for Swordfish, 4 for Jellyfish), you need N rows where a candidate is confined to N columns, or N columns where it's confined to N rows. The candidate can appear 2 to N times in each row/column, but the total set of columns (or rows) used must number exactly N.
These patterns can overlap. A valid Swordfish might contain a smaller, valid X-Wing within it if, for example, any two of its three rows share candidates in only the same two columns. However, this is not a requirement for the Swordfish to be valid. The primary goal is to find the largest valid fish pattern you can, as it allows for the broadest set of eliminations. A larger fish inherently performs the eliminations of any smaller, constituent fish patterns it contains.
- Start your search by looking for the candidate that appears most frequently in the grid.
- For larger fish, try the 'cover' method: mentally select N rows and see if the candidate's positions are limited to N columns.
When to Use Fish and When to Try Other Techniques
Fish patterns are highly specific. They are only applicable when you are stuck on a single candidate number and simpler techniques like Naked and Hidden Pairs/Triples or Pointing Pairs have been exhausted. Our hint engine data shows players often spend time looking for a Swordfish when a simpler Hidden Single is available.
If you cannot find a clean fish pattern, shift your focus. Check other candidates or look for different constraint-based techniques like Skyscraper or Two-String Kite, which often uncover the same eliminations from a different perspective. The key is persistence and systematic scanning of each candidate across rows and columns.
Key Facts
- ▪An X-Wing is a Sudoku pattern where a candidate appears exactly twice in two rows and aligns in two columns, allowing eliminations in those columns.
- ▪A Swordfish generalizes the X-Wing to three rows where a candidate is confined to three columns, enabling eliminations in those three columns.
- ▪A Jellyfish further generalizes the pattern to four rows confined to four columns for a single candidate digit.
- ▪The core rule for any fish pattern of size N is: N rows must contain a candidate only within N columns, or N columns only within N rows.
- ▪In a Swordfish or Jellyfish, the candidate does not need to appear in every cell of the formed rectangle, only be confined to the correct number of columns.
- ▪Eliminations for a row-based fish (X-Wing, Swordfish, Jellyfish) are made in the involved columns, removing the candidate from all cells not part of the pattern.
- ▪A valid larger fish pattern will always perform the eliminations of any valid smaller fish pattern contained within its structure.
- ▪Fish patterns are single-candidate techniques and are typically used in harder puzzles after basic methods are exhausted.
- ▪Searching for fish patterns involves scanning the grid for each number, looking for rows or columns where its possible positions are limited.
Frequently Asked Questions
What is the main difference between an X-Wing and a Swordfish?
An X-Wing uses 2 rows and 2 columns. A Swordfish uses 3 rows and 3 columns for a single candidate. Both rely on the candidate being confined to that set of columns within the chosen rows.
Can a Swordfish exist if the candidate appears more than twice in a row?
Yes. In a Swordfish, the candidate can appear 2 or 3 times in each of the three rows, as long as all appearances are limited to only three specific columns total.
Where do I make eliminations for a row-based Swordfish?
For a row-based Swordfish, you eliminate the candidate from all other cells in the three involved columns that are not part of the defining rows.
Are fish patterns common in Sudoku puzzles?
X-Wings appear in intermediate puzzles. Swordfish are less common, found in hard puzzles. Jellyfish are rare, typically only in very hard or expert-level puzzles.
What should I do if I can't find a fish pattern?
Try other single-digit strategies like Skyscraper, or switch focus to a different candidate. Often, a simpler technique like a Hidden Pair or Pointing Pair will provide progress.