(defvar *combinations* (loop for p0 below 4 append (loop for p1 below 4 append (loop for p2 below 4 append (loop for p3 below 4 when (= (length (remove-duplicates (list p0 p1 p2 p3))) 4) collect (list p0 p1 p2 p3))))) "A list of all the combinations to try -- consisting of lists of chunk positions.") ((0 1 2 3) (0 1 3 2) (0 2 1 3) (0 2 3 1) (0 3 1 2) (0 3 2 1) (1 0 2 3) (1 0 3 2) (1 2 0 3) (1 2 3 0) (1 3 0 2) (1 3 2 0) (2 0 1 3) (2 0 3 1) (2 1 0 3) (2 1 3 0) (2 3 0 1) (2 3 1 0) (3 0 1 2) (3 0 2 1) (3 1 0 2) (3 1 2 0) (3 2 0 1) (3 2 1 0))