(defun new-nodes (path graph) (remove-if #'(lambda (n) (node-member n path)) (next-states (first path)))) (defun operations-from-path (state-path) (let* ((state (pop state-path)) (result nil)) (dolist (s state-path) (setq result (cons (node-operation state s) result)) (setq state s)) (reverse result))) (defun motion-planning (start goal) (operations-from-path (goal-search start goal)))というような手続きを用意して,最終的には, motion-planningという手続きである状態から次の状態へ 移る動作命令の列を生成する関数が使えるようにするには,
(defun node-equal (a b) (set= a b)) (defun next-states (state) (next-block-states state)) (defun node-operation (state1 state2) (block-operation state1 state2)) (defun goal-search (s g) (breadth-first nil s g))という具合な設定になります.