|
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.
Start the 8 queens demo (in separate window)
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. Configure that!
Start the 8 queens demo without configurator support
The product model of the 8-queens problem is described very concisely in Configit's product modelling language:
constant N: 8; variable col: array N of [0..N-1]; rule 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])));
|