I think Sander Rensen wrote:
> 
> 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.

Well, I can think if two ways to do this, depending on the
particulars. 

If these are dynamic definstances, then just reset the properties of
each definstanced object by calling its methods from Java, and working
memory will track them. If you need a list of these objects, then
listDefinstances() will indeed help.

If they're static definstances, then do the same thing, but then call
Rete.reset().  The reset() function will refresh working memory with the
current state of each definstanced object, and clear out
non-definstance facts. Alternately, you can change each object and
then call Rete.updateObject() to update just that one.

---------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to