The eight queens puzzle asks you to place eight chess queens on an 8×8 board so that no queen can attack another. That means no two queens share a row, a column, or a diagonal. Chess composer Max Bezzel published the puzzle in 1848, and Franz Nauck published the first solutions in 1850. There are 92 solutions in all.
Modern Queens-style puzzles, including Catdoku, keep the "one per row, one per column" idea and change the rest. This guide covers the classic rules, where the number 92 comes from, and how the cat version changes the puzzle.
Try today's free Queens-style puzzle →
The rules in one minute
A queen moves any distance in a straight line: along its row, along its column, or along either diagonal. Eight queens that never attack each other must:
- sit in eight different rows,
- sit in eight different columns, and
- never share a diagonal, however far apart they are.
The first two rules are easy to meet. The diagonals make the puzzle hard.
One solution you can check by hand
Number the rows from the top and the columns from the left, starting at 1. Here is one valid answer, listed by row: the queens sit in columns 1, 5, 8, 6, 3, 7, 2, 4.
To check it, compare every pair of queens. Two queens share a diagonal when the distance between their rows equals the distance between their columns. Take the queens in rows 1 and 2, at columns 1 and 5: they are one row apart but four columns apart, so they are safe. That gap never matches for any pair in this answer.
Why 92, and why people say 12
Ignore the diagonals and there are 40,320 ways to give each row and column one queen (8 × 7 × 6 × … × 1). The diagonal rule cuts that down to just 92.
Many of those 92 are the same pattern turned or flipped. Rotate the board a quarter turn, or look at it in a mirror, and a solution becomes another solution. Grouping them this way leaves 12 truly different shapes. Eleven of those shapes appear 8 times each, and one is symmetric, so it appears only 4 times: 11 × 8 + 4 = 92.
How to find a solution yourself
You do not need to memorize one. Work row by row:
- Put a queen in the first safe square of row 1.
- Move to the next row and place a queen in its first square that no earlier queen attacks.
- If a row has no safe square, go back one row and move that queen to its next safe square.
- Repeat until all eight rows have a queen.
Step 3 is called backtracking. It is slow on paper, but it always works, which is why programmers know this puzzle well. In 1972, computer scientist Edsger Dijkstra used it to illustrate structured programming. The same method extends to any board size: an n × n board has a solution for every n except 2 and 3.
The cat twist: what Queens-style puzzles change
Catdoku is a Queens-style puzzle with cats instead of queens. It changes two rules.
- Diagonals only matter up close. Cats cannot touch, not even diagonally. A cat blocks only the eight squares directly around it, so two cats can share a long diagonal as long as they are not neighbors.
- Colored regions are added. The board is split into colored regions, and each region needs exactly one cat, just like each row and column.
The difference is easy to see from a single corner. A queen at row 1, column 8 attacks 21 squares, including the whole diagonal down to row 8, column 1. Catdoku Level 5 starts with a cat on that same square. It rules out 15 squares, and only one of them, row 2, column 7, is diagonal, because that is the only diagonal square it touches.
Why the colored regions matter
Counting shows what each rule does on an 8×8 board:
- One per row and column: 40,320 placements.
- Add "no touching": 5,242 placements remain.
- Use the queens' full diagonal rule instead: 92 remain. All 92 also pass the "no touching" test.
Because "no touching" is a looser rule than the queens' diagonal rule, it leaves thousands of placements. The colored regions do the rest. On Catdoku Level 5, the eight regions plus the no-touching rule leave exactly one placement, even before you use the starting cat.
That single answer is not one of the 92 classic solutions: two of its cats share a long diagonal without touching. The two puzzles are related, but they are not the same puzzle.
It also changes how you solve. In the classic puzzle you hunt through many valid answers by trial and backtracking. In a Queens-style puzzle there is one answer, and the colors give you clues to reason toward it. Our Queens puzzle strategy guide shows two of those reasoning moves, and the beginner's logic puzzle guide covers the first steps.
Try both versions
For the classic puzzle, all you need is a chessboard or a grid drawn on paper. Try finding a solution that is different from the one above, then check it with the row-and-column-gap test.
For the cat version, the free daily web puzzle has three new boards every day: Easy 6×6, Normal 8×8, and Hard 9×9. The Normal board is the same size as a chessboard. Watch how often two of your cats end up on the same long diagonal.
Grids with two per row, column, and region are called Star Battle puzzles. Our Star Battle guide explains the rules and a 2×2 trick for them.
Want more boards? The app has 5,000 levels up to 12×12, and hints that explain their reasoning.
