Hi. I am using JESS to represent a relational environment for an agent to
interact in (Blocks World, to be specific, if that helps).

At each state, I am first resetting the Rete object and then asserting the
state of the environment. From these assertions, further assertions are made
by using rules which define extra predicates. For example, if I assert (on a
b), I also create the (above a b) and possibly (clear a), depending on the
exact state of the environment when (run) is called.

Anyway, the agent receives this information, chooses an action to take, and
the environment is updated again by resetting and re-asserting.

While I could contain all operations within JESS in this particular
environment, some Java code is required to be run during the process for
other environments, so this is why I don't simply operate using assert and
retract.

Obviously this doesn't fit the idea that generally rule bases remain static,
but the performance I get is reasonable. My problem lies in the fact that
after several hundred (or perhaps thousand) of these assertion, resetting
loops, Java or JESS runs out of memory and throws an OutOfMemoryException.
The rules for defining extra predicates are asserted only once, but queries
are asserted roughly each iteration for state matching, though they should
be asserting over one-another (defqueries of the same name).

Is there something I can do to 'flush' JESS, or stop it storing these reset
assertions? Or would it be better to periodically create a new Rete object,
load in the rules and continue?

- Sam Sarjant
-- 
View this message in context: 
http://old.nabble.com/OutOfMemory-after-multiple-assertions-resets-tp27634092p27634092.html
Sent from the Jess mailing list archive at Nabble.com.



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