Place queens on an chessboard so that none share a row, column or diagonal. One constraint satisfaction problem encoding uses a column variable for each row, with and whenever . The pigeonhole principle explains why one queen per row loses no solutions. Prescribed occupied cells give the queens completion problem.
New to topics? Read the docs here!