Model for N Queens
Variables R1...RN
vertical no-attack: by construction
horizontal no-attack:
{FD.distinct [R1...RN]}
diagonal no-attack
{FD.distinctOffset [R1...RN] [1...N]}
{FD.distinctOffset [R1...RN] [~1...~N]}
Previous slide
Next slide
Back to first slide
View graphic version