Eight Queens

Place 8 queens so none can attack each other

About this tool

Eight Queens is a free online game. Place 8 queens so none can attack each other. Play instantly — no install, no waiting. It runs entirely in your browser — no download or sign-up needed.

Place 8 queens on an 8×8 chess board, and require any two queens not to be on the same row, same column, and same slash. There are 92 solutions to this problem (if rotation and symmetry are different).

Manual mode: Click on the checkerboard grid to place the queen. If there is a conflict with an existing queen, the prompt will be highlighted. Automatic mode: Click the Solve button, and the algorithm uses backtracking to find all solutions and demonstrate them step by step.

Backtracking method: Starting from the first line, try to place a queen in each line and check whether it conflicts with the previous line. If there is no conflict, drop one line, and if the conflict returns to the previous line and changes position. Using recursive implementation, it can be extended to the N-Queen problem.

The eight-queen problem solver places 8 queens on an 8×8 chessboard so that they do not attack each other, and supports manual placement and automatic solution.

Placed0/8
Conflicts0
Solved0
Click a cell to place/remove a queen. No two queens may share a row, column, or diagonal. Place all 8 with zero conflicts to win!