What is the eight queens puzzle?
The eight queens puzzle asks you to place eight queens on an 8×8 chessboard so that no two queens attack each other. On other board sizes it is called the N queens problem.
The queen is the strongest chess piece and moves any distance in eight directions: along its row, its column and both diagonals. To fit eight queens, every row and every column must hold exactly one queen, and no diagonal may hold two. In this game each queen lands with its attack lines shooting out like lasers, the squares it covers fall into shade, and a red line flickers between any two queens that see each other. When the last queen lands safely, the ivory queens glow gold and their crown tips sparkle one by one.
How many solutions does each board have?
The 8×8 board has 92 solutions, or 12 basic solutions if you count turns and flips of the same pattern as one. Boards of 2×2 and 3×3 have no solution, and solutions begin at 4×4.
| Board | All solutions | Basic solutions (symmetry removed) |
|---|---|---|
| 4×4 | 2 | 1 |
| 5×5 | 10 | 2 |
| 6×6 | 4 | 1 |
| 7×7 | 40 | 6 |
| 8×8 | 92 | 12 |
| 9×9 | 352 | 46 |
| 10×10 | 724 | 92 |
Notice that 6×6 has fewer solutions than 5×5, so a bigger board is not always easier. A basic solution usually gives eight shapes through four turns and a flip, but one of the twelve 8×8 basics looks the same after a half turn and gives only four, which is why 11×8 + 4 = 92. The game keeps count of the solutions you find on every board size and shows 8×8 as twelve cards in the album.
Which ways are there to play?
There are five: Classic, Color regions, Time trial, Daily puzzle and the Solution album.
- Classic: Pick any board from 4×4 to 10×10 and place queens freely. When you finish, the game tells you whether the solution is new and adds it to your count for that size.
- Color regions: The board is split into pastel regions and every row, column and region needs exactly one queen. Diagonals are not checked to the edge, but queens may not touch, even corner to corner. Every board is freshly generated and checked by a solver to have exactly one answer.
- Time trial: Solve five boards in a row, 5×5, 6×6, 7×7, 8×8 and 8×8. Each board starts with one fixed ebony queen, so you cannot just repeat a memorised answer. Every hint adds 10 seconds.
- Daily puzzle: Everyone gets the same 8×8 color region board for the day, and your time goes into the daily check in record.
- Solution album: Collect the 92 solutions of 8×8 one by one. Rebuild one you already have and the game says so, which pushes you to look for new layouts.
How is the color region mode different?
In color regions each colored region must hold one queen and no two queens may touch in any of the eight directions. The rule comes from the logic puzzle Star Battle and is widely played today as the queens puzzle.
The classic puzzle has many answers and is about exploring, while the region version has exactly one answer and is about deduction. Tiny regions of one or two squares often fix a queen at once, and crossing out the rows and columns it blocks reveals the next spot. Drag a finger or the mouse to stamp ✕ on every square you pass, or switch on ✕ Mark to place a ✕ with each tap.
Who first posed the eight queens puzzle?
It was first published in 1848 by the German chess composer Max Bezzel in a chess magazine. In 1850 Franz Nauck published all 92 solutions and extended the question to N×N boards.
Mathematicians went on to study the number of solutions and their symmetries, and with the arrival of computers the puzzle became the standard example of backtracking search. Edsger Dijkstra famously worked through it in 1972 to explain structured programming, and it is still one of the first problems students meet when they learn recursion and backtracking.
Any tips for solving faster?
- Fill one row at a time. Eight queens must sit in eight rows, so working down from the top row keeps you from missing a gap.
- Look only at unshaded squares. Squares a queen covers get shade and a dot. If a remaining row has no unshaded square, that path is already dead, so undo right away.
- Try knight's steps. On larger boards, chaining queens one row down and two columns across, the way a knight jumps, quickly gets you close to a solution.
- In color regions, start with small or straight regions. If a region lies within a single row or column, every other square of that line can be crossed out.
- Use a hint when stuck. The hint flashes a queen to lift in blue when one clashes or leads nowhere, and otherwise flashes the next square to fill in yellow.
Controls
- Phone and mouse: Tap an empty square and a queen drops in from above; tap a queen again to lift it. Choose the board size from 4×4 to 10×10 with the arrows on the title screen.
- ✕ marks: In color regions, drag from an empty square to stamp ✕ on the squares you pass, or from a marked square to erase them. The right mouse button also toggles a ✕.
- Keyboard: Choose a square with the arrow keys and press Enter or Space to place or lift a queen. X marks, Z or Backspace undoes, H gives a hint and C clears.
Your game in progress, best times for each board, found solutions and the album are stored only in this browser and never sent to a server. Anyone who opens a link from Share result in color regions can try the same board.