Give every queen her own space.
Explore the N-queens puzzle: place queens so that no two share a row, column or diagonal. Watch the solver find a solution, or try it yourself.
Explore Queen’s LabInteractive puzzle · runs in your browser
Small rules. Big search.
Watch the search
Follow animated backtracking as the solver tries a square, checks it and steps back when it reaches a dead end.
Take it step by step
Pause the animation, advance one step at a time and adjust the speed.
Find your own solution
Switch to manual play and place queens yourself, with conflicts highlighted on the board.
Change the challenge
Explore boards from 4 to 12 queens and see how the search grows.