Prolog Constraint Processing : Packing Squares
For each square, define X and Y variables that denote the upper left corner. These variable will have domains 1..10-L, where L is the length of the square. If you set the domain to 1..10, the squares may be placed partly outside your 10×10 rectangle. Then you can post constraints for each pair of rectangles … Read more