Search for:

Type your search term and press [Enter]

8 Queen Problem

Place 8 queens on a chess board such that no queen can capture another. Solving the 8-queens problem with the support of Configit Runtime is entirely trivial. The Runtime guides you by disabling all chess board positions that won’t lead to a solution. Try for instance to place a queen at A4 and observe E3.


Open the 8 queen problem

Without Configurator Support

Without a configurator it is not easy to place eight queens manually. The number of different ways to place the eight queens is enormous: 4,426,165,368 ways. And only 92 of these are solutions to the 8-queens problem.

The product model of the 8-queens problem is described very concisely in Configit’s product modeling language:

 N: 8;
 col: array N of [0..N-1];
 forall i in [0..N-2]:
 (forall j in [i+1..N-1]:
 ((col[i] <> col[j]) and 
 (i+col[i]) <> (j+col[j]) and
 (i+col[j]) <> (j+col[i])));