The Eight Queen Problem is a classical constraint satisfaction problem (CSP) stated as follows:
Place eight non-attacking queens on an 8×8 chessboard, such that no two queens share the same row, column, or diagonal.
The problem belongs to the broader class of N-Queens Problems, where N queens must be placed on an N×N board under the same non-attack constraints. The 8-Queens instance is the most historically significant and the most frequently studied because it represents the smallest N for which the problem is non-trivial and has a large enough solution space to be interesting.
Formally, the Eight Queen Problem is a member of the class of exact cover problems: you must cover exactly 8 of the 64 cells on the board such that every row, every column, and every diagonal contains at most one queen. The problem is not NP-hard (it can be solved in polynomial time for any N), but it is an excellent teaching example for exact-cover and backtracking techniques that scale to NP-hard problems.
The problem was first published by chess composer Max Bezzel in 1848 and subsequently studied by mathematician Franz Nauck, who extended it to the general N-Queens case in 1850. The legendary mathematician Carl Friedrich Gauss attempted a complete solution manually and found 72 of the 92 valid arrangements, which illustrates the difficulty of exhaustive enumeration by hand. A complete rigorous enumeration was achieved by mathematicians in the 1850s.
If you want to experience the problem before studying it formally, try the interactive 8×8 board — solving it manually provides intuition that makes the mathematical analysis much more accessible.