(define-solver yak-solver () (wax-car (car-needs-waxing have-hose) (car-waxed) (car-needs-waxing)) (get-new-hose (have-ez-pass) (have-hose)) (borrow-ez-pass (return-mooshi-pillow) (have-ez-pass)) (fix-mooshi-pillow (have-yak) (return-mooshi-pillow)) (visit-zoo () (have-yak))) (multiple-value-bind (ok? actions) (yak-solver '(car-needs-waxing) '(car-waxed)) (assert ok?) (assert (equal actions '(VISIT-ZOO FIX-MOOSHI-PILLOW BORROW-EZ-PASS GET-NEW-HOSE WAX-CAR)))))