Foundation

The region sweep

One queen per colour is the rule that does the most work in Queens, and the region sweep is how you cash it in. It costs seconds, it is the first thing to check after every placement, and on most boards it supplies the majority of the queens you will place.

What the sweep is

A Queens board carries three simultaneous constraints: one queen per row, one per column, one per colour region — and no two queens touching, diagonals included. The region sweep exploits the third of those. You walk the colours one at a time and ask a single question of each: how many open squares does it have left? If the answer is one, you have found a queen, because a colour cannot be left without one.

That is the whole technique. It sounds too simple to be worth naming, and it is precisely because it sounds too simple that players skip it. The mistake is treating it as something to check when you are stuck. It is not a rescue move; it is the default move. Every queen you place changes the open-square count of several colours at once, which means the sweep produces a different answer after every single placement.

There is a reason it pays better than it looks. A region's square count is fixed by the puzzle, but its open-square count falls every time a queen lands anywhere in its rows, its columns or its immediate neighbourhood. A colour with eight squares can drop to one open square in two moves if those squares are badly placed relative to the queens that have already gone down. You will not notice that happening unless you are counting.

How to run it without wasting time

Order the colours by size once, at the start of the board, and sweep in that order from then on. The smallest region is the most likely to collapse to a single square, so checking it first means that on the occasions when the sweep does produce a queen, you find it in the first few seconds rather than the last.

You do not have to re-count every colour after every move. A queen only changes the count of the colours it actually touches: its own, and any colour with squares in its row, its column or the ring of eight squares around it. On a 7x7 or 8x8 grid that is most of the board and a full sweep is fine. From 10x10 up, check the touched colours first and only fall back to a full sweep when the local pass finds nothing.

Keep the count honest. The commonest failure is counting a square as open when it has already been eliminated by a diagonal adjacency you did not mark. If a sweep tells you a colour has two open squares and you cannot see how either of them survives, the answer is usually that neither does and your marking is behind.

Why it finds things the line sweep does not

The region sweep and the line sweep — the same question asked of rows and columns — look like the same technique in two costumes. They are not, and running only one of them is the single most common reason a solve stalls on a board that is not actually hard.

Regions have irregular shapes. A colour can be spread across five rows and three columns, or crammed into a two-by-two block. That means a colour can be reduced to one open square while every row it touches still has four or five squares available, and vice versa: a row can be down to its last square while none of the colours crossing it is anywhere near resolved. The two sweeps surface information at different moments in the solve.

In practice the region sweep tends to fire earlier. Regions are smaller than lines on most boards — a colour on a 10x10 grid averages ten squares but frequently has six or seven — so they run out of room sooner. The line sweep then takes over in the endgame, when a handful of queens have carved the grid into fragments and whole rows have a single survivor. A solve that alternates the two reliably beats a solve that favours either.

The habit to build

After every placement, in this order: mark the full ring of eliminations around the new queen, sweep the regions, sweep the lines. Then repeat. The marking comes first because both sweeps are worthless if the board is not up to date — you will sweep a colour, count two open squares, and move on without noticing that one of them died three moves ago.

When both sweeps come back empty, you are not stuck. You have simply run out of the cheap deductions and need one of the narrowing techniques — a region locked to a line, a region shadow, or the pairing argument — to remove more squares. Those techniques do not place queens directly; they remove candidates, which then lets the sweeps fire again. Almost every solve is that cycle repeated: narrow, sweep, place, narrow, sweep, place.

Worked example

This is the technique firing on a real board: 7x7 #1, at step 1 of a 8-step solve. The first board is the position as the technique becomes available; the second is the same board after it has been applied.

7x7 puzzle #1 before step 1
Before — 0 queens placed
7x7 puzzle #1 after step 1, with the removed squares ringed
After — the 0 squares ringed in red were removed by this one deduction

Only row 1, column 4 is still open in indigo, and since each colour must take a queen, that settles it. That clears row 1, column 4, the rest of the indigo region and every square adjacent to it — diagonals included.

Play 7x7 puzzle #1 to see the rest of the solve.

Related techniques

All 10 strategy articles · Practise on 1,800+ puzzles