Hi all, I`m making rules for my agent to fullfil some goals. One of these rules is:
(defrule goal-discoverworld (goal (typ 2)) (located (thing ?t) (location ?l2)) (adjacent (locale1 ?l) (locale2 ?l2)) => (printout t "discover world" crlf) ) The problem is, that this rule will not fire when it should. At one point, my system has the following facts: Jess> (facts) f-0 (MAIN::initial-fact) f-2 (MAIN::forest (class <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Forest>) (name "in the forest1") (name_type <External-Address:java.lang.Class>)) f-3 (MAIN::mountains (class <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Mountains>) (name "in the mountains") (name_type <External-Address:java.lang.Class>)) f-4 (MAIN::mountains (class <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Mountains>) (name "in the mountains") (name_type <External-Address:java.lang.Class>)) f-5 (MAIN::adjacent (class <External-Address:java.lang.Class>) (locale1 <External-Address:vs.storyworldontology.Forest>) (locale1_type <External-Address:java.lang.Class>) (locale2 <External-Address:vs.storyworldontology.Mountains>) (locale2_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Adjacent>)) f-6 (MAIN::adjacent (class <External-Address:java.lang.Class>) (locale1 <External-Address:vs.storyworldontology.Mountains>) (locale1_type <External-Address:java.lang.Class>) (locale2 <External-Address:vs.storyworldontology.Mountains>) (locale2_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Adjacent>)) f-7 (MAIN::located (class <External-Address:java.lang.Class>) (location <External-Address:vs.storyworldontology.Forest>) (location_type <External-Address:java.lang.Class>) (thing <External-Address:vs.storyworldontology.Hero>) (thing_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Located>)) f-8 (MAIN::adjacent (class <External-Address:java.lang.Class>) (locale1 <External-Address:vs.storyworldontology.Mountains>) (locale1_type <External-Address:java.lang.Class>) (locale2 <External-Address:vs.storyworldontology.Mountains>) (locale2_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Adjacent>)) f-9 (MAIN::adjacent (class <External-Address:java.lang.Class>) (locale1 <External-Address:vs.storyworldontology.Mountains>) (locale1_type <External-Address:java.lang.Class>) (locale2 <External-Address:vs.storyworldontology.Forest>) (locale2_type <External-Address:java.lang.Class>) (OBJECT <External-Address:vs.storyworldontology.Adjacent>)) f-10 (MAIN::goal (typ 2)) f-11 (MAIN::need-adjacent (class nil) (locale1 nil) (locale1_type nil) (locale2 <External-Address:vs.storyworldontology.Forest>) (locale2_type nil) (OBJECT nil)) For a total of 11 facts. Jess> If i leave the line (adjacent (locale1 ?l) (locale2 ?l2)) The rule fires. (fact 10 and fact 7). This is correct. But it my opinion, the rule should also fire with that line. (look at fact 5). Instead it has created the need-adjacent fact (fact 11) What goes wrong ?? Thanks in advance Sander -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
