EXAMPLES 3 NOTMEMBER (SA LAMBDA (X Y) (NOT (MEMBER X Y))) SA-MEMBER (SA LAMBDA (X Y) (MEMBER X Y)) PRINT-INFO (SA LAMBDA (FROM TO) (PROGN (FORMAT T "Current room is ~A, enter now room ~A~%%" FROM TO) T)) 9 SEARCH (((SEARCH ?FROM ?TO) :- (LOGIC-ASSERT GOAL (((GOAL ?TO))) EXAMPLES) (EXPLORE ?FROM ?TO (?FROM)) (GOAL ?TO))) GOAL (((GOAL G))) PHONE (((PHONE G))) NOT (((NOT ?X) :- (WFF ?X) ! (FAIL)) ((NOT ?X))) LOGIC-MEMBER (((LOGIC-MEMBER ?A (?A . ?B)) :- !) ((LOGIC-MEMBER ?A (?B . ?C)) :- (LOGIC-MEMBER ?A ?C))) DOOR (((DOOR A B)) ((DOOR A N)) ((DOOR B M)) ((DOOR B C)) ((DOOR M I)) ((DOOR C D)) ((DOOR D E)) ((DOOR E F)) ((DOOR F H)) ((DOOR H L)) ((DOOR L G))) APPEND (((APPEND NIL ?Q ?Q)) ((APPEND (?A . ?B) ?C (?A . ?D)) :- (APPEND ?B ?C ?D))) IS-THERE-DOOR (((IS-THERE-DOOR ?A ?B) :- (DOOR ?A ?B)) ((IS-THERE-DOOR ?A ?B) :- (DOOR ?B ?A))) EXPLORE (((EXPLORE ?X ?X ?START-LIST)) ((EXPLORE ?X ?Y ?START-LIST) :- (IS-THERE-DOOR ?X ?Z) (NOTMEMBER ?Z ?START-LIST) (PRINT-INFO ?X ?Z) (EXPLORE ?Z ?Y (?Z . ?START-LIST))))