Hi, For my program, a storyteller, i use different agents. The agents are walking in a world. For the planning of their actions i use jess. I want every agent to produce a plan to reach his goal. At some moment however there are multiple ways of reaching the goal.
For example: the agent needs a sword, but there are two swords in the world. One in the mountains and one in the desert. Now I want the agent to make two plans: one to go to the mountains and one to go to the desert. Therefore i need to run the Rete engine twice (or sometimes more often) with the same facts at the start. So at the start i want to take the facts. Run the engine with the goal to get the sword in the mountains. Then reset the facts to the initial state and run the engine with the goal to get the sword in the desert. Hopefully you will understand my problem, Sander ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 11, 2003 1:45 PM Subject: Re: JESS: problem with retract (2) > I think Sander Rensen wrote: > > > > The problem is I think, that when i delete all facts a automatically > > undefinstance of (located (thing ?m) (location ?l2) (OBJECT ?o2)) > > takes place. > > Yes, retracting a shadow fact undefinstances the corresponding object. > > > When the fact is asserted again, the fact > > is there, but the match with the deffinstance object is gone. > > So the (located (thing ?m) (location ?l2) (OBJECT ?o2)) appears in the > > factlist, but it is a shadowfact and there is no deffinstance object??? > > Yes, and as I understand it, you're asserting the Java Fact object > directly, which will have an internal flag set to indicate that there > SHOULD be a definstance object -- so you've got corrupted internal > state. > > > > > My question is: Could this be the problem and how can i solve this ?? > > I need to reset all facts !! (i think of using rete.listDeffinstances(), but > > how ??) > > Well, can you define for me what you mean by "reset all facts" and > explain why neither reset() nor updateObject() do what you need? > > > --------------------------------------------------------- > Ernest Friedman-Hill > Science and Engineering PSEs Phone: (925) 294-2154 > Sandia National Labs FAX: (925) 294-2234 > PO Box 969, MS 9012 [EMAIL PROTECTED] > Livermore, CA 94550 http://herzberg.ca.sandia.gov > > -------------------------------------------------------------------- > 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] > -------------------------------------------------------------------- > > -------------------------------------------------------------------- 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] --------------------------------------------------------------------
