; ======================================================================= ; FILENAME: foist.demo ; DATE: 04/09/07 ; PROGRAMMER: John White ;; this template version: snepsul-template.demo-20061005.txt ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePSUL commands. ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "WORD.demo" :av) ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Turn off inference tracing. ; This is optional; if tracing is desired, then delete this. ;^(setq snip:*infertrace* nil) ; Load the appropriate definition algorithm: ^(load "/projects/rapaport/CVA/STN2/defun_verb.cl") ; Clear the SNePS network: (resetnet) ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ;enter the "snip" package: ; ^(in-package snip) ; ; ;turn on full forward inferencing: ; ^(defun broadcast-one-report (represent) ; (let (anysent) ; (do.chset (ch *OUTGOING-CHANNELS* anysent) ; (when (isopen.ch ch) ; (setq anysent ; (or (try-to-send-report represent ch) ; anysent))))) ; nil) ; ; ;re-enter the "sneps" package: ; ^(in-package sneps) ; load all pre-defined relations: (intext "/projects/rapaport/CVA/STN2/demos/rels") ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ; (put annotated SNePSUL code of your background knowledge here) ;If someone learns something, and that something is truenames of something ;else, then someone has power over that something else. (describe (assert forall ($p $t $f) &ant (build agent *p act (build action (build lex "learn") object *t)) &ant (build object *t rel (build lex "truenames") possessor *f) cq (build object1 *p rel (build lex "has power over") object2 *f))) ;If some agent performs some act consisting of some action ;and some object, and the same agent performs some other act ;consisting of some other action (which is considered "unknown") ;on the same object, then we can consider the unknown action as ;the subclass of the known superclass action. (describe (assert forall ($u $v $x $y $z) &ant (build agent *x act (build action *u object *z)) &ant (build agent *x act (build action *v object *z)) &ant (build object *u property (build lex "unknown")) cq (build superclass *v subclass *u))) ;If some agent performs some act consisting of some action ;on some object, and that same agent is considered ;to have power over that object, then it can be said that ;that agent imposes its will on the above object. (describe (assert forall ($p $u $w $f) &ant (build agent *p act (build action *u object *f)) &ant (build object1 *p rel (build lex "has power over") object2 *f) cq (build agent *p act (build action (build lex "impose your will") object *f)))) ;If "impose your will" is a superclass of "foist your will" ;then it is also the case that "impose" is the superclass of "foist" (describe (assert &ant (build superclass (build lex "impose your will") subclass (build lex "foist your will")) cq (build superclass (build lex "impose") subclass (build lex "foist")))) ;There is something refered to as a player. (describe (assert member #player class (build lex "player"))) ;There is something refered to as fiends. (describe (assert member #fiends class (build lex "fiends"))) ;There is something refered to as truenames. (describe (assert member #truenames class (build lex "truenames"))) ;There is something refered to as rituals. (describe (assert member #rituals class (build lex "rituals"))) ;The rituals are considered to be complex. (describe (assert object *rituals property (build lex "complex"))) ;The truenames are the truenames of the fiends. (describe (assert object *truenames rel (build lex "truenames") possessor *fiends)) ;The player researches the truenames. (describe (assert agent *player act (build action (build lex "research") object *truenames))) ;The player learns the truenames. (describe (assert agent *player act (build action (build lex "learn") object *truenames))) ;The player researches the rituals. (describe (assert agent *player act (build action (build lex "research") object *rituals))) ;The player learns the rituals. (describe (assert agent *player act (build action (build lex "learn") object *rituals))) ; CASSIE READS THE PASSAGE: ; ============================================== ;If p is a player, f is a fiend, t is a truename, c is a ritual, c is complex, ;t is the truename of f, p researches and learns t, and p researches and ;learns c, then p foists its will on f. (describe (add forall ($f $t $c $p) &ant (build member *p class (build lex "player")) &ant (build member *f class (build lex "fiends")) &ant (build member *t class (build lex "truenames")) &ant (build member *c class (build lex "rituals")) &ant (build object *c property (build lex "complex")) &ant (build object *t rel (build lex "truenames") possessor *f) &ant (build agent *p act (build action (build lex "research") object *t)) &ant (build agent *p act (build action (build lex "learn") object *t)) &ant (build agent *p act (build action (build lex "research") object *c)) &ant (build agent *p act (build action (build lex "learn") object *c)) cq (build agent *p act (build action (build lex "foist your will") object *f)))) ;Foist your will is unknown (describe (add object (build lex "foist your will") property (build lex "unknown"))) ; Ask Cassie what "foist" means: ^(defineVerb "foist")