(defun block-motion-sequence (start goal) (block-operations (breadth-first nil start goal)))という具合に記述ができます. これが働くための条件としては,
(defun node-equal (a b) (set= a b)) (defun new-nodes (path graph) (remove-if #'(lambda (n) (node-member n path)) (next-blocks-states (first path))))と再定義する必要があります. これにより, 状態を集合として扱うために,状態内部の表現順序が変っても, 全体のグラフ記述が与えられなくても 動作列が生成されることになります.
> (block-motion-sequence '((a on b) (b on table) (c on d) (d on table)) '((a on table) (b on a) (c on table) (d on c))) ((move a from b to table) (move b from table to a) (move c from d to table) (move d from table to c)) > (block-motion-sequence '((c on table) (a on table) (b on table)) '((b on table) (a on b) (c on a))) ((move a from table to b) (move c from table to a)) > (block-motion-sequence '((b on table) (a on b) (c on a)) '((c on table) (a on table) (b on table))) ((move c from a to table) (move a from b to table))という具合になります.