(defclass blockworld-graph :super graph :slots (blocks) ) (defclass blockworld-node :super node :slots (state) ) (defun set^ (a b &key (test #'eq)) (cond ((null a) b) ((member (car a) b :test test) (set^ (cdr a) (remove (car a) b :test test) :test test)) (t (cons (car a) (set^ (cdr a) b :test test))))) (defun blocks-state= (a b) (null (set^ a b :test #'equal))) (defmethod blockworld-node (:init (&rest args &key ((:state s)) &allow-other-keys) (send-super-lexpr :init args) (setq state s) self) (:state () state) (:node= (x) (blocks-state= state (send x :state))) (:distance (n) 1 ) (:all-blocks nil (mapcar #'car state)) )