$ N-queens problem $ $ Place n queens on an nxn chess board $ without attacking each other. $ ESSENCE' 1.0 given n : int letting AMOUNT_QUEENS be domain int(0..n-1) find queens : matrix indexed by [ AMOUNT_QUEENS ] of AMOUNT_QUEENS such that alldifferent(queens), forall i,j : AMOUNT_QUEENS . (i > j) => ((queens[i] - i != queens[j] - j) /\ (queens[i] + i != queens[j] + j))