Swordfish is an extension of X-Wing, where instead of 2x2 square of candidates, we consider 3x3 square of candidates.
Similarly to X-Wing, the Swordfish is formed either by rows or columns and the eliminations occur in columns or rows, respectively.

In this figure, the Swordfish cells are marked with blue and we only consider a candidate **X**. The Swordfish is
fixed by columns, i.e. in columns **3**, **5** and **8** there are no other candidates **X**. There are more candidates **X**, marked in
the rows which contain the swordfish, namely, the small **X**s in rows **B**, **C** and **G**. All the small **X**s can be
eliminated but let us see why.

Suppose we place any of the **X** candidates in the Swordfish configuration (the blue cells), for example
**B3**. The scratched candidates can be eliminated. This leaves an X-Wing, formed by cells **C5**, **C8**, **G5** and
**G8**, and which eliminates the remaining small **X**s in the corresponding rows **C** and **G**.

You can check that no matter which blue cell we choose to place the **X**, all small **X**s in the rows will be
eliminated. Similarly to X-Wing (and to other methods) we do not know, where the blue **X** candidates are, but they surely be
in some three out of the nine cells - one in each column.

Swordfish rarely occurs in its perfect form, i.e. there rarely are exactly nine cells. Some cells may
already have a value, but the important feature of the structure is that
the existing cells with candidate **X** are placed in a 3x3 grid.

The first example is a **2-3-2** Swordfish, that looks similarly to the figure above.
The candidate **5** in the dark blue cells are arranged in columns - every column contains
2 or 3 candidates from the dark blue cells and they are the only ones in the corresponding column.
Since the Swordfish is arranged in columns, we can eliminate all candidates in the corresponding rows.

To see, again, why this is the case, suppose that we place the candidate **5** in **B3**.
This eliminates the candidate **5** on row **B** and the dark blue cell candidate on **C3**.
This leaves an X-Wing with cells **C5**, **C8**, **G5** and **G8** (same as before),
which eliminates the remaining candidates, marked in red.

Load in Solver

Let us quickly see another example, where the Swordfish cells are arranged in rows.
The Swordfish is formed by rows **C**, **F** and **I**, and there are no other **8**s apart from the
ones in the dark blue cells. The eliminations occur in columns **3** and **8**.
We are still looking for a perfect Swordfish and as soon as
one pops up, we will include it in this article.

Load in Solver