Written by Brian Hamilton and Karan Hamilton.
Brian and Karan are the puzzle lovers and game makers behind Sudoku Online Puzzles. You can learn more on the About page.
Guides are reviewed for clarity, accuracy, and usefulness for solvers. See our editorial standards, puzzle testing process, or send a correction.
Twenty-eight moves into puzzle 179 from our Evil sudoku collection, 33 squares are still open and nothing simple is left. There is no naked single or hidden single, no pair, no fish and no wing: of the 23 techniques we test puzzles with, exactly one finds a move. It needs four cells. R4C7 can only be 2 or 5, and three cells of the middle box share four digits between them. Together they prove that one of two squares is a 5, two other 5s come off the board, and naked singles do the rest.
Each of those two groups is an almost locked set, or ALS, and the move that pairs them is called ALS-XZ. It has a reputation as an exotic, last-resort technique. On our Evil puzzles it is the opposite: of the eighteen techniques in our Sudoku Helper, only the singles and pointing pairs are needed on more of them. Partly that is because the helper tries it last; the counts below show how much.
The Sudoku Trainer has ten Almost Locked Set positions. Choose Almost Locked Set, click every cell of both sets and press Check, four to seven squares in all. All ten are two-house moves like the ones here, each the simplest move our helper had on its board. None keeps both sets inside one row, column or box, which would make them a naked pair, triple or bigger locked set in another form (see below).
What is an almost locked set in sudoku?
An almost locked set is a group of unsolved cells, all in one row, column or box, that hold one more candidate digit than there are cells. A single cell with two candidates is the smallest. Two cells of a row holding {4,7} and {4,7,9} are another: two cells, three digits. On puzzle 179, R4C4 {2,7,9}, R5C4 {7,9} and R5C5 {5,7,9} in box 5 make a three-cell set, with 2, 5, 7 and 9 between them.
The name comes from locked sets, where the count is exact: two cells with two digits, three with three. With one digit to spare, nothing in an almost locked set is decided yet. But take away any one of its digits and the rest are locked into its cells. All the ALS techniques run on that one fact.
A naked pair is two cells of one house that hold only the same two digits; a naked triple is three cells holding three. Those digits have to fill those cells, so they leave the rest of the house. Both are locked sets. Count from complete pencil marks only: a set that looks almost locked because a candidate was never written in proves nothing.
How does the ALS-XZ rule work?
You need two almost locked sets, A and B, with no cell in common, and two digits that both of them hold:
- X, the restricted common. Every cell of A that holds X sees every cell of B that holds X, so the two sets can’t both keep it.
- Z, the digit that goes. Any cell outside the sets that sees every Z in A and every Z in B loses its Z.
The reason is short. At least one set loses X, and a set that loses a digit is locked, so its other digits, Z among them, must all be placed inside it. Z ends up in A or in B, and a cell that sees all the Z-cells of both can’t be Z.
On puzzle 179 at move 29, Set A is R4C7 alone, {2,5}, and Set B is the three cells of box 5. X is 2: A’s only 2 is R4C7, B’s only 2 is R4C4, and the two share row 4. Z is 5, held by R4C7 in A and by R5C5 in B. Follow both cases:
- If R4C7 is not 2, it is 5.
- If R4C7 is 2, R4C4 can’t be, so it is 7 or 9. With R5C4 {7,9} below it in column 4, that is a naked pair, and R5C5 is left with 5.
Either way R4C7 or R5C5 is a 5. Six cells see both of them, and two of those still hold a 5: R4C6 and R5C9. Both lose it.
R4C6 had only 1 and 5, so it is now a naked single, and nothing but naked singles is needed after it. R4C9 is worth a second look. It holds a 5 and sees R4C7, but not R5C5, so it keeps its 5: a target has to see every Z in both sets, not just one.
Load the position into our Sudoku Helper. Next Hint builds its pencil marks from the digits alone, so after the first press the next three hints are pointing pairs that remove the 2 from R7C4, the 7 from R8C9 and the 6 from R7C3, which earlier moves had already taken. Press Apply Hint after each, and the next hint is this ALS-XZ, the only move the helper’s eighteen techniques can find.
What makes a digit a restricted common?
The test is about cells, not digits. List every cell of A that holds X and every cell of B that holds X, and check that each cell in the first list shares a row, column or box with each cell in the second. Set B on puzzle 179 has three cells, but only R4C4 holds a 2, which is why the link holds. If R5C5 also had a 2, it would fail: R5C5 doesn’t see R4C7, so both sets could keep a 2.
Three more rules keep the move honest. The sets can’t share a cell, or one digit would do two jobs. Z has to be in both sets, since the argument only places Z in whichever set locks. And X itself stays: the rule removes Z, never X, unless the sets share a second restricted common (below). Nor does the link favour boxes, as some guides suggest: in the 903 ALS-XZ moves our helper made on the first 500 Evil puzzles, the X-cells shared a row in 343, a box in 341 and a column in 300.
How do you find an ALS-XZ by hand?
This is the hard part. At move 29, puzzle 179 has 129 almost locked sets of up to four cells, and only 8 pairs of them remove anything. Across the helper’s 903 ALS moves on the first 500 Evil puzzles the median was 151 sets and 5 working pairs. Comparing sets with sets is hopeless by eye, so start from what you want removed:
- Pick a cell that is nearly done. R4C6 holds {1,5}; without the 5 it is a single.
- Find a two-candidate cell that holds that digit and sees it. R4C7 {2,5} does. The 5 becomes Z and its other digit, 2, is your X.
- Look for a set holding both digits, with its X only where the first cell’s X sees it. In box 5, R4C4, R5C4 and R5C5 hold 2, 5, 7 and 9, and their only 2 is in row 4.
- Check the Z-cells and the count. The target must see every Z in both sets (R4C6 sees R4C7 along the row and R5C5 in the box), and each set must have exactly one digit more than cells.
In 268 of the helper’s 903 moves one set was a single cell, always beside a set of three or four. Not one paired a single cell with a two-cell set: that shape is an XY-Wing or XYZ-Wing, which the helper finds first under its own name. The commonest shape was two cells with three (186), so if a single-cell start fails, run the same steps from two cells of a row, column or box holding three digits.
Enter a position’s digits in the Sudoku Helper and step through Next Hint. An Almost Locked Set hint names both sets and the linking digit, but only for the first pair its search finds: on puzzle 179 at move 29, 8 working pairs make six different removals, and the hint shows one.
Which simpler techniques are ALS-XZ moves in disguise?
Several patterns with names of their own are almost locked sets with one set kept very small.
- An XY-Wing. Take one pincer as Set A, a single cell. The pivot and the other pincer see each other, so they share a house, and between them they hold three digits: that is Set B. X is the digit Set A shares with the pivot, and Z is the wing digit.
- An XYZ-Wing, built the same way with Z also in the pivot. On the puzzle in our XY-Wing guide, Evil 199, the helper’s ALS search reports exactly that: Set A {1,8} in R9C3 and Set B {1,8,9} in R7C9 and R9C9, linked by 1, removing the 8 from R9C7 that its XYZ-Wing removes.
Every XY-Wing (203) and XYZ-Wing (87) that the helper found on the first 500 Evil puzzles, rebuilt this way, removed exactly the same candidates. The helper calls them wings only because it tries the wings first.
Two one-cell sets are a naked pair, not an XY-Wing, as this page used to say. Each cell holds X and Z, and for X to link them they must see each other. More generally, two sets inside one house merge into one locked set: N + M cells holding N + M digits. Seven of the trainer’s ten positions were that until October 2026; now none is. Among the helper’s 903 ALS moves that happened only twice, because pairs and triples come earlier on its list; both were locked sets of four or more cells, which it has no other name for.
Sue de Coq is built from almost locked sets too. It works where a row or column crosses a box, with one almost locked set in the rest of the line and another in the rest of the box. It isn’t one of the helper’s eighteen; added to our tests, it made 45 moves on the first 500 Evil puzzles, and at every one the helper had an ALS-XZ ready.
Is an ALS-XZ just an XY-chain?
Sometimes. Puzzle 227 from the same bank, 19 moves in, has a pair of two-cell sets standing in columns 2 and 9:
Every cell in both sets has exactly two candidates, so the same move can be read one cell at a time, as an XY-chain: if R2C9 isn’t 8 it is 1, so R9C9 is 3, so R9C2 is 9, so R3C2 is 8. One end or the other is 8. Puzzle 179’s Set B can’t be read like that, since R4C4 and R5C5 have three candidates each; a longer chain through other cells, five two-candidate cells from R4C7 to R7C6, does remove R4C6’s 5, but not the one in R5C9.
At 213 of the helper’s 903 ALS-XZ moves on the first 500 Evil puzzles, an XY-chain of up to 12 cells removed every candidate the ALS-XZ did; in 160, every cell of both sets had two candidates, as on puzzle 227. 3D Medusa, which colours chains across several digits, overlaps even more: tried ahead of ALS in our tests, it made 277 moves on the first 500 Evil puzzles, and at 268 of them the helper had an ALS-XZ ready.
How often do our puzzles need an almost locked set?
Our test set was 200 boards from each classic level plus the first 500 Evil puzzles. The helper’s eighteen techniques solved each one simplest move first, and we counted the puzzles where an ALS-XZ was that move at least once; a second run added five more techniques.
- Easy to Expert: never. None of our 800 boards, 200 per level on Easy, Medium, Hard and Expert, needed one, since the generator rejects any board there that singles, locked candidates and naked pairs can’t solve. Yet a working ALS-XZ was on the board at 5,980 of the 8,200 positions those Easy boards passed through, and at all 59 Hard and 277 Expert positions where the singles had run out. Something simpler was always there too.
- Evil: most puzzles. With the helper’s eighteen, 318 of the first 500 needed one, and 2,761 of all 5,000. A puzzle that needs one usually needs more: 208 of the 318 needed two or more, and 57 needed five or more.
| First 500 Evil puzzles | Helper’s 18 techniques | 18 + 5 more |
|---|---|---|
| Puzzles that needed an ALS-XZ | 318 | 217 |
| ALS-XZ moves made | 903 | 506 |
| Puzzles where it was the hardest step | 178 | 115 |
| Puzzles finished | 332 | 370 |
Both runs take the simplest move first and try the Almost Locked Set last. The five extra techniques are 3D Medusa, Sue de Coq, the Finned X-Wing, the Finned Swordfish and Remote Pairs. Since the Evil bank is sorted by score, its first 500 are harder than average for the bank. Measured October 2026.
Most of the drop is other techniques reaching the same positions first: where the helper would have played an ALS-XZ, 3D Medusa moved 268 times, the Finned X-Wing 85, Sue de Coq 45 and the Finned Swordfish 33. Coming last on the list, the ALS-XZ collects moves that other techniques could also make. That makes it the most useful single technique to learn after the wings: whatever else a hard position allows, an ALS-XZ is usually one of the options.
Our helper finishes 3,655 of the 5,000 Evil puzzles. On 1,668 of them an ALS-XZ was the hardest move needed; next come the W-Wing on 689 and the XY-Wing on 543. Puzzle 179 is one of the 1,668: on the helper’s route it needs pointing pairs, one Skyscraper and the ALS-XZ in the figure, and singles for everything else.
What are doubly linked ALS, ALS chains and Death Blossom?
Our helper stops at the move on this page: two sets of up to four cells, each in one row, column or box, joined by one restricted common. The bigger relatives below are not among its eighteen, so we have not measured how often our puzzles need them.
- Doubly linked ALS-XZ. When X and Z are both restricted commons, more follows. Each set leaves out exactly one of its digits in the solution, and neither link digit can sit in both sets, so one set leaves out X and the other Z. Both digits then come out of every cell that sees all of their cells in the pair, and each set’s other digits out of every cell that sees all of their cells in that set. At 139 of the helper’s 903 moves the two sets were doubly linked, and it removed only what one link allows.
- ALS-XY-Wing. Three sets: C is linked to A by one restricted common and to B by another, and a digit Z in both A and B comes out of every cell that sees all of their Z-cells.
- ALS chains. The same idea with more sets in a row, each linked to the next.
- Death Blossom. A stem cell whose every candidate is a restricted common with a different almost locked set, the petals. Whatever the stem turns out to be, one petal locks, so a further digit that every petal holds comes out of the cells that see all of its petal cells.
Stuck after an ALS-XZ, or can’t find one?
After 259 of the helper’s 903 ALS-XZ moves a single was ready at once, as R4C6 was on puzzle 179, so the cells that lost a candidate deserve the first look. Otherwise the next move beyond singles was most often another ALS-XZ (439 times), or something simpler it had freed: a pointing pair (75), a naked pair (35) or a box/line reduction (31). After 113, singles finished the puzzle; after 109, the helper had nothing left.
If you can’t find one, it is very likely there: some pair of sets removed something at 95.1% of the positions where the singles had run out, counting all 4,618 of them in the first 500 Evil puzzles. Work from the nearly finished cells, as above, and let the helper confirm there is one before you search for long. When the helper has nothing at all, the chain techniques take over: X-chains on a single digit, XY-chains through two-candidate cells, a BUG check when nearly every cell is down to two candidates, and forcing chains when nothing else moves. Our list of sudoku techniques shows where each fits.
Evil Sudoku
2,761 of its 5,000 puzzles need an almost locked set when solved with our helper’s techniques.
▶ Play Evil Sudoku