Solving Tips

Sudoku Swordfish Technique Explained: The 3x3 Extension of X-Wing

2025-01-24 · 10 min read

Swordfish is an extended version of X-Wing, and is a more complex and powerful advanced Sudoku technique. Its name comes from the shape of a swordfish, as this technique involves three rows and three columns, forming a larger pattern than X-Wing. The core principle is: when a candidate appears in three rows, each appearing in no more than three columns, and these three columns are the same, that candidate can be eliminated from other cells in those three columns.

Core Principle:
If a digit appears in rows A, B, and C only in certain positions within columns X, Y, and Z (each row appearing in at most two or three of these columns), then this digit must occupy certain positions within columns X, Y, and Z across these three rows. Therefore, other cells in columns X, Y, and Z (not in these three rows) cannot contain this digit.

Swordfish Rule

If a candidate appears across three rows only in the same three column positions,
Then that candidate can be eliminated from other rows in those three columns (not in the Swordfish's three rows).

Before reading this article, we recommend mastering the X-Wing technique, as Swordfish is a direct extension of X-Wing.

Swordfish pattern diagram
Swordfish principle: candidates distributed across 3 rows and 3 columns forming the swordfish pattern, red arrows indicate elimination directions

Case Analysis: Row-Based Swordfish

Let's examine a Swordfish example involving candidate 4 in rows 2, 4, and 8.

Sudoku Swordfish technique example
Figure: Candidate 4 in rows 2, 4, and 8 forms a Swordfish pattern
Open this example in calculator

Current Board Data

Based on the CSV81 format candidate data, let's focus on the distribution of candidate 4 in rows 2, 4, and 8:

Row 2 cells:

  • R2C1: Given digit 2
  • R2C2: Candidates {1, 4}
  • R2C3: Candidates {1, 4}
  • R2C4: Candidates {5, 7}
  • R2C5: Candidates {6, 8}
  • R2C6: Candidates {6, 8}
  • R2C7: Given digit 3
  • R2C8: Candidates {5, 7}
  • R2C9: Given digit 9

Row 4 cells:

  • R4C1: Given digit 1
  • R4C2: Given digit 8
  • R4C3: Candidates {2, 4}
  • R4C4: Filled digit 3
  • R4C5: Candidates {4, 5}
  • R4C6: Given digit 9
  • R4C7: Candidates {2, 5}
  • R4C8: Filled digit 6
  • R4C9: Given digit 7

Row 8 cells:

  • R8C1: Given digit 9
  • R8C2: Candidates {1, 2, 4, 5, 7}
  • R8C3: Candidates {1, 2, 4}
  • R8C4: Candidates {1, 5, 7}
  • R8C5: Candidates {4, 5, 7}
  • R8C6: Given digit 3
  • R8C7: Given digit 6
  • R8C8: Candidates {2, 5, 7}
  • R8C9: Filled digit 8

Analysis Process

1 Observe Row 2: In row 2, candidate 4 appears in only two positions: R2C2 (candidates 1,4) and R2C3 (candidates 1,4). That is column 2 and column 3.
2 Observe Row 4: In row 4, candidate 4 also appears in only two positions: R4C3 (candidates 2,4) and R4C5 (candidates 4,5). That is column 3 and column 5.
3 Observe Row 8: In row 8, candidate 4 appears in three positions: R8C2 (candidates 1,2,4,5,7), R8C3 (candidates 1,2,4), and R8C5 (candidates 4,5,7). That is columns 2, 3, and 5.
4 Discover Swordfish Pattern: Candidate 4 in rows 2, 4, and 8 only appears in columns 2, 3, and 5:
  • Row 2: column 2 ✓, column 3 ✓ (two columns)
  • Row 4: column 3 ✓, column 5 ✓ (two columns)
  • Row 8: column 2 ✓, column 3 ✓, column 5 ✓ (three columns)

Combined, the three rows only involve columns 2, 3, and 5, which forms a Swordfish pattern.

5 Understand the Logic: Because candidate 4 in rows 2, 4, and 8 can only be distributed in columns 2, 3, and 5, these three 4s must occupy certain positions within these three columns across these three rows. Regardless of the specific distribution, candidate 4 in columns 2, 3, and 5 is occupied by rows 2, 4, and 8.
6 Identify Elimination Targets: In column 2, besides rows 2 and 8, there are other cells containing candidate 4:
  • R6C2: Candidates {2, 4, 5}
  • R7C2: Candidates {1, 2, 4, 5, 6, 7}
  • R9C2: Candidates {2, 4, 5, 6, 7}

In column 5, besides rows 4 and 8, there are other cells containing candidate 4:

  • R6C5: Candidates {1, 4, 8}
  • R7C5: Candidates {2, 4, 5, 6, 7}
7 Execute Elimination: Therefore, cells in columns 2 and 5 except for rows 2, 4, and 8 cannot contain 4. Specifically:
  • R6C2: Remove candidate 4 (keep 2,5)
  • R7C2: Remove candidate 4 (keep 1,2,5,6,7)
  • R9C2: Remove candidate 4 (keep 2,5,6,7)
  • R6C5: Remove candidate 4 (keep 1,8)
  • R7C5: Remove candidate 4 (keep 2,5,6,7)
Conclusion:
Swordfish: In rows 2, 4, and 8, candidate 4 is distributed only in columns 2, 3, and 5.
Action: Remove candidate 4 from R6C2, R7C2, R9C2, R6C5, R7C5.

Key Characteristics of Swordfish

1. Not Every Row Needs to Appear in All Three Columns

This is an important distinction between Swordfish and X-Wing:

  • X-Wing: In two rows, each row has the candidate appearing in exactly the same two columns
  • Swordfish: In three rows, each row can have the candidate appearing in 2 or 3 of the columns, as long as combined they don't exceed three columns
Important Understanding:
In the example above, row 2 has candidate 4 only in columns 2 and 3, row 4 only in columns 3 and 5, and row 8 in columns 2, 3, and 5. Although no single row has the candidate in exactly two columns, the three rows combined cover columns 2, 3, and 5, which is sufficient to form a Swordfish.

2. Number of Columns Must Equal Number of Rows

Swordfish requires three rows corresponding to three columns (or three columns corresponding to three rows):

  • If the candidate in three rows only involves two columns, it's an incomplete pattern and cannot use Swordfish
  • If the candidate in three rows involves four columns, it also cannot form a Swordfish
  • It must be exactly a three-row-three-column correspondence

Two Forms of Swordfish

Similar to X-Wing, Swordfish also has two symmetric forms:

1. Row-Based Swordfish

This is the situation in the example above:

  • Observation target: Three rows
  • Pattern characteristic: A candidate appears in these three rows only in the same three columns (or two of them)
  • Elimination target: Remove the candidate from other rows in these three columns

2. Column-Based Swordfish

Opposite form but same principle:

  • Observation target: Three columns
  • Pattern characteristic: A candidate appears in these three columns only in the same three rows (or two of them)
  • Elimination target: Remove the candidate from other columns in these three rows
Memory Aid:
Row-based Swordfish eliminates columns, column-based Swordfish eliminates rows.
This is completely consistent with X-Wing rules, just extended from 2x2 to 3x3.

How to Find Swordfish?

Finding Swordfish is more difficult than X-Wing and requires more systematic analysis:

1 Choose a candidate: Focus on one candidate (one of 1-9), preferably a digit with fewer candidate positions.
2 Find rows (or columns) with few candidate positions: Identify rows (or columns) where the candidate appears in only 2-3 cells.
3 Find three-row combinations: See if there are three rows where the candidates combined only involve three columns (each row can be in 2 or 3 of these three columns).
4 Confirm Swordfish pattern: If you find such a three-row-three-column combination, you've formed a Swordfish pattern.
5 Execute elimination: Remove the candidate from other cells in the corresponding columns (or rows).
Important Notes:
  • Swordfish requires exactly three rows (or three columns), involving exactly three columns (or three rows)
  • Each row can have the candidate appearing in 2 or 3 columns, but combined the three rows cannot exceed three columns
  • If a row has the candidate appearing in 4 or more positions, it's usually not suitable for forming a Swordfish
  • Swordfish is very rare and won't appear in most Sudoku puzzles
  • Finding Swordfish is very time-consuming; try it only after using all other techniques

Swordfish and Other Techniques

X-Wing vs Swordfish

Comparison X-Wing Swordfish
Number of rows 2 rows (or 2 columns) 3 rows (or 3 columns)
Number of columns 2 columns (or 2 rows) 3 columns (or 3 rows)
Pattern characteristic Each row must have candidate in exactly two columns Each row can have candidate in 2-3 columns
Identification difficulty Difficult Very difficult
Frequency Occasional Rare

More Advanced Extensions

Swordfish can be further extended:

  • Jellyfish: Four-row-four-column extension
  • Squirmbag: Five-row-five-column extension (extremely rare, almost never encountered)

These techniques follow the same principle as Swordfish, just involving more rows and columns, with exponentially increasing identification difficulty.

Technique Summary

Key points for applying the Swordfish technique:

  • Essence: X-Wing extended from 2x2 to 3x3 pattern
  • Identification condition: A candidate in three rows (or three columns) combined only involves three columns (or three rows)
  • Flexibility: Each row doesn't need to have the candidate in all three columns, as long as the three rows combined cover these three columns
  • Elimination rule: Row-based Swordfish eliminates columns, column-based Swordfish eliminates rows
  • Application scenario: Last resort when X-Wing and all other intermediate and basic advanced techniques cannot make progress
  • Identification difficulty: Requires systematic analysis of candidate distribution across multiple rows and columns, very time-consuming
  • Frequency: Very rare, most difficult puzzles don't require it
Practical Advice:
Swordfish is extremely rare in practice, only occasionally appearing in the most difficult expert-level puzzles. Recommendations:
  • First exhaust all intermediate techniques and X-Wing
  • Choose the digit with the fewest candidates for analysis (e.g., digits with only 6-9 candidate positions remaining)
  • Use pen and paper to record each digit's distribution across rows and columns to help discover three-row-three-column combinations
  • Some Sudoku software provides Swordfish hints, which can be helpful for learning
  • If you've tried for 30 minutes and still can't find one, the puzzle may not need Swordfish; check if you've missed simpler techniques

Practice Now

Practice Recommendations:
Start an expert-level Sudoku game and try using the Swordfish technique! Recommendations:
  • Choose the highest difficulty; only expert-level puzzles may require Swordfish
  • Make sure you've mastered the X-Wing technique first
  • Systematically analyze each candidate, looking for three-row-three-column patterns
  • Be patient; Swordfish is very rare and difficult to discover