;;; Link to the representation of the passage. (intext "proliferate.demo") ^(defn_verb 'proliferate) ;; Define a taxonomy that includes the class for rabbits, stem cells and several parent ;; classes. The parent class common to both is "animal" (describe (assert subclass (build lex "rabbit") superclass (build lex "mammal"))) (describe (assert subclass (build lex "mammal") superclass (build lex "animal"))) (describe (assert subclass (build lex "cell") superclass (build lex "animal"))) (describe (assert subclass (build lex "stem cell") superclass (build lex "cell"))) ;; Needed for path based inference. (define-path class (compose class (kstar (compose subclass- ! superclass)))) ;; Based on the above superclass/subclass scheme ( a watered down taxonomy) implement ;; specific characteristics for classes. (describe (assert object (build lex "rabbit") property (build lex "cute"))) (describe (assert object (build lex "rabbit") property (build lex "quick"))) (describe (assert object (build lex "rabbit") property( build lex "quick birth rate"))) (describe (assert object (build lex "rabbit") property (build lex "hairy"))) (describe (assert object (build lex "rabbit") property (build lex "warm blooded"))) ;; It was difficult to model specific characteristics of cells. At the least ;; things that stem cells possess can be modeled. (describe (assert possessor (build lex "stem cell") rel (build lex "anatomical element") object (build lex "cell wall"))) (describe (assert possesor (build lex "stem cell") rel (build lex "anatomical element") object (build lex "nucleus"))) (describe (assert possessor (build lex "stem cell") rel (build lex "anatomical element") object (build lex "protoplasm"))) ;; Based on the above superclass/subclass scheme ( a watered down taxonomy) implement ;; specific actions for specific classes. An important distinction can be made here ;; and it can be shown that though sufficient for this example, mapping actions to classes ;; represented in a taxonomical hierarchy may not always be advisable. Discussed in report. ;; ;; Consider the action walk. Walking crosses many different classes (lots of mammals ;; walk, lots of reptiles walk, lots of birds walk, etc.) but it is not the case ;; that all mammals walk (dolphins and whales) or all reptiles walk (snakes). A ;; hierarchy not based on taxonomy would be needed, for instance legged animals as ;; a superclass with four legged and two legged as descending subclasses. Actions ;; would then be mappped to the calss four legged animals, of which rabbits would ;; be either a member or possibly a subclass. ;; ;; Because stem cells and rabbits are so different (in the sense of actions both can perform ;; like living, dying, reproducing, etc.) a taxonomical hierarchy is sufficient for ;; categorizing actions. ;; ;; Categorize an action for rabbits (describe (assert forall ($r $rs) ant ( (build member *r class (build lex "rabbit")) (build members *rs class (build lex "rabbit"))) cq ( (build agent *r act (build lex "hop")) (build agent *rs act (build lex "hop"))) ;; could be any number of rabbit specific actions here )) ;; Proof that the rule is in working order (describe (deduce agent $x act (build lex "hop"))) ;; Categorize the actions for cells (describe (assert forall ($c $cs) ant ( (build member *c class (build lex "cell")) (build members *cs class (build lex "cell"))) cq ( (build agent *c act (build lex "divide")) (build agent *cs act (build lex "divide"))) ;; could be any number of cell specific actions here )) ;; Proof that the rule is in working order (describe (deduce agent $x act (build lex "divide"))) ;; Categorize actions common to both stem cells and rabbits. This probably ;; ought to be realized by heirarchy structure. (describe (assert forall ($a $as $r $rs) ant ( (build member *a class (build lex "stem cell")) (build members *as class (build lex "stem cell")) (build member *a class (build lex "rabbit")) (build members *as class (build lex "rabbit"))) cq ( (build agent *a act (build lex "live")) (build agent *as act (build lex "live")) (build agent *a act (build lex "die")) (build agent *as act (build lex "die")) (build agent *a act (build lex "reproduce")) (build agent *as act (build lex "reproduce")) (build agent *r act (build lex "live")) (build agent *rs act (build lex "live")) (build agent *r act (build lex "die")) (build agent *rs act (build lex "die")) (build agent *r act (build lex "reproduce")) (build agent *rs act (build lex "reproduce"))) ;; could be any number of cell specific actions here )) ;; Proof that the rule is in working order (describe (deduce agent $x act (build lex "live"))) ;; There now exists five actions. For each of these actions define consequences. ;; A consequence for hopping (describe (assert forall $e ant((build agent *e act (build lex "hop") )) cq((build agent *e act(build mod (build lex "jumping") head (build lex "move")))) )) ;; Proof that the rule is in working order (describe (deduce agent $x act(build mod (build lex "jumping") head (build lex "move")))) ;; A consequence for dividing (describe (assert forall $e ant((build agent *e act (build lex "divide") )) cq((build agent *e act(build mod (build lex "evenly") head (build lex "splits")))) )) ;; Proof that the rule is in working order (describe (deduce agent $x act(build mod (build lex "evenly") head (build lex "splits")))) ;; A consequence for living (describe (assert forall $e ant((build agent *e act (build lex "live") )) cq((build agent *e act (build lex "perform") object (build lex "actions"))) )) ;; Proof that the rule is in working order (describe (deduce agent $x act(build lex "perform"))) ;; A consequence for dying (describe (assert forall $e ant((build agent *e act (build lex "die") )) cq((build agent *e act (build lex "stop") object (build lex "living"))) )) ;; Proof that the rule is in working order (describe (deduce agent $x act(build lex "stop"))) ;; A consequence for reproducing (describe (assert forall $e ant((build agent *e act (build lex "reproduce") )) cq((build agent *e act (build lex "produce") object (build lex "offspring"))) )) ;; Link proliferate to consequence for living. Would love to have a rule do this ;; but it seems unlikely. ;; This is linked because it is a possibly correct consequence. (describe (assert forall ($e) &ant (build agent *e act (build lex "proliferate")) cq((build agent *e act (build lex "perform") object (build lex "actions"))))) ;; Link proliferate to consequence for dying. Would love to have a rule do this ;; but it seems unlikely ;; This is linked because it is a possibly correct consequence. (describe (assert forall ($e) &ant (build agent *e act (build lex "proliferate")) cq((build agent *e act (build lex "stop") object (build lex "living"))))) ;; Link proliferate to consequence for reproducing. Would love to have a rule do this ;; but it seems unlikely ;; This is linked because it is a possibly correct consequence. (describe (assert forall ($e) &ant (build agent *e act (build lex "proliferate")) cq((build agent *e act (build lex "produce") object (build lex "offspring"))))) ;; The moment of truth... ^(defn_verb 'proliferate)