Advanced Sudoku Techniques: Reservations, X-Wing and More

If you keep playing sudoku, sooner or later you meet a puzzle where you suddenly cannot move. You look for where a digit goes in each box, you look for which digit fits each cell, you check all your pencil marks again, and still the next cell will not come. It is the wall that comes after the basic techniques.
In this post I go through the techniques beyond that wall, in the order I suggest learning them. I covered the basics (hidden and naked singles, pointing, naked pairs) in How to Solve Sudoku: The First Techniques Beginners Should Learn, so I assume those here. Every technique from here on depends on writing pencil marks. How to write them is in How to Write Sudoku Pencil Marks.
The words are the same as before: a row runs across, a column runs down, a box is one of the 3×3 blocks, and a candidate is a digit that could still go in a cell. I made all the diagrams myself, and they show only the candidates needed for the explanation.
Names
Here are the names I use, with what they are called elsewhere.
| Name in this post | Other names |
|---|---|
| Reservation | yoyaku, a Japanese term; no fixed English name |
| Double reservation | Hidden Pair |
| Triple | Naked Triple / Hidden Triple |
| X-Wing | X-Wing |
| Swordfish | Swordfish |
| XY-Wing | also called Y-Wing |
1. Reservation
Japanese sudoku guides often use the word yoyaku, which means a reservation. Guides use it in slightly different ways. In this post, a reservation means a box in which a digit has only two possible cells left. You do not know yet which of the two it is, but the digit’s seat has been reserved in those two cells.
A reservation does not fix a cell on its own. But once you see it, it is easier to notice pointing, one of the basic techniques. If the two reserved cells are in the same row, you can remove that digit from the rest of the row in the other boxes.
When you find a reservation, I think it is worth marking it small in the corners of the two cells. Some people solve by writing only reservations, without filling in every candidate.
2. Double reservation
Reservations become really useful when two of them land on the same two cells.
Say that in one box, 4 can only go in cells A and B, and 6 can also only go in A and B. Both 4 and 6 must go in A or B. Two digits use up two cells, so A and B cannot hold anything other than 4 and 6. If other candidates are written in A or B, you can erase them.
The naked pair in the earlier post looked at it from the cells’ side: two cells whose only candidates are 2 and 6 let you erase 2 and 6 elsewhere. The double reservation is the same idea from the digits’ side. In English it is called a hidden pair, because when A and B are full of other candidates, the pair is hard to see.
3. Triples
A pair of cells can be extended to three.
Say three cells in one row have the candidates 1 and 4, 4 and 7, and 1 and 7. Each of those cells can only hold 1, 4 or 7. Three cells use up three digits, so no other cell in the row can hold 1, 4 or 7.
Note that each of the three cells does not need all three digits. It works as long as the candidates of the three cells together make exactly three different digits. I think that is why triples are harder to spot than pairs.
As with the double reservation, there is a digit-side version too. If, in one row, the digits 1, 4 and 7 can only go in three cells between them, those three cells cannot hold anything else.
4. X-Wing
From here on, the techniques look at one digit at a time.
Take the digit 7. Say that in row 2, 7 has only two possible cells, and in row 6 it also has only two. And in both rows, those two cells are in the same columns, 3 and 8.
1 2 3 4 5 6 7 8 9
row 1 . . . | . . . | . x .
row 2 . . O | . . . | . O .
row 3 . . . | . . . | . . .
row 4 . . x | . . . | . . .
row 5 . . . | . . . | . . .
row 6 . . O | . . . | . O .
row 7 . . . | . . . | . . .
row 8 . . . | . . . | . x .
row 9 . . x | . . . | . . .
The O cells are where 7 can go in rows 2 and 6. The 7 in row 2 is in column 3 or column 8. So is the 7 in row 6. Since a column holds only one 7, if row 2 takes column 3 then row 6 takes column 8, and if row 2 takes column 8 then row 6 takes column 3.
Either way, the 7s of columns 3 and 8 are used up by rows 2 and 6. So you can erase 7 from every other cell in columns 3 and 8, the x cells in the diagram.
The four O cells form a rectangle. To look for an X-Wing, find a row where a digit has exactly two candidates, then see whether another row has the same two columns. It also works with rows and columns swapped: if two columns each have the digit in only two cells, in the same two rows, you can erase it from the rest of those rows.
5. Swordfish
A Swordfish is an X-Wing stretched to three rows.
Say that in three rows, a digit has only two or three candidates each, and all of those cells together fit into three columns. The digit’s places in those three rows use up the three columns. So you can erase the digit from every other cell in those columns.
As with triples, not every row needs a candidate in all three columns. Two per row is fine. That makes it harder to see, and I think it is enough to start looking for it once you are used to X-Wings.
6. XY-Wing
The last one links the candidates of three cells.
It uses three cells that each have exactly two candidates. The middle cell has A and B. One cell that shares a row, column or box with the middle has A and C, and another has B and C.
If the middle is A, the A-and-C cell cannot be A, so it is C. If the middle is B, the B-and-C cell is C. Either way, one of the two end cells is C. So any cell that shares a row, column or box with both end cells cannot be C, and you can erase C from it.
With real digits: if the middle is 3 and 5, and the ends are 3 and 8 and 5 and 8, you can erase 8 from cells that see both ends.
An XY-Wing starts with finding cells that have only two candidates. If your pencil marks are not tidy, you will not see it, so it matters to cut candidates down properly with the earlier techniques first.
The order to learn them
This is the order I recommend:
- Reservations and double reservations
- Triples
- X-Wing
- XY-Wing
- Swordfish
Reservations can be used while writing fewer pencil marks, so learning them first gives you a base for the rest. X-Wing has a clear shape, so among the named advanced techniques I think it is one of the easier ones to spot. Swordfish is an extension of X-Wing, but it is hard to find, so I put it last.
Beyond these there are many more techniques that follow long chains of candidates. The English site SudokuWiki has explanations and examples of many of them, including X-Wing, Swordfish, XY-Wing and hidden pairs and triples.
One more thing. Advanced techniques are tools for cutting candidates down with reasons, instead of guessing. If you still cannot move, I think it is better to suspect a mistake in your pencil marks before looking for a new technique. How to check is in Stuck on a Sudoku? How to Find the Next Move.
Sudoku365 difficulty and advanced techniques
Sudoku365 is a sudoku app I make, for iPhone, iPad and Android. It has 300 puzzles at each of four levels, Easy, Medium, Hard and Expert, 1,200 in all.
I solved the included puzzles technique by technique to check. All 300 Hard puzzles can be solved to the end with the basic techniques plus double reservations, pairs and triples. You can think of sections 1 to 3 of this post as the range of Hard.
On Expert, even with every technique in this post, only about one in ten of the 300 puzzles could be solved to the end. Some puzzles have an X-Wing or XY-Wing that helps partway, but most need techniques beyond these, or patient reading. Once you have learned the advanced techniques, I suggest making reservations and triples reliable on Hard first, then looking for X-Wings and XY-Wings on Expert.
Turning notes on (NOTES ON) lets you write candidates, and with “Remove numbers from notes” in the settings (on by default), the notes in related cells are erased automatically when you place a digit. Advanced techniques assume your notes are correct, so I think this setting helps. Selecting a cell highlights its row, column and box and every cell with the same digit, which also makes the rows and columns of an X-Wing easier to follow.
The app is free with ads, and a one-time Remove Ads purchase turns them off. The order of looking that helps you solve faster is in How to Solve Sudoku Faster.
