Hello,
 
I am currently working at a project which is about creating a world of artificial life using the multi-agent-approach.
I have some agents living in there, all of them have a rete engine of their own. In this engine, there are some shadow facts representing the agent itself, other agents in the surrounding and the plans of the agent. I generate some new facts from the existing fact, like (agent-close), if an agent is close to the owner of the rete engine, or (hungry) if the food level is under a certain level.
All in all, there are about 60 to 100 facts in each rete engine. If I insert like 40 of these agents in my world, everything is working fine. But just in the beginning. If I let it run 300 and more turns, it gets terribly slow, sometimes even runs out of memory.
I tried two different approaches to handle this problem. My first approach was to issue reset() at the beginning of every turn. Since a lot of things can change (especially the agent-close facts), this seems to be quite reasonable. Having the problem with the memory, I decided to drop the reset idea and update the shadow facts contained in the rete engine at the beginnning of each turn. Now, since the generated facts are (logically) dependend on the shadow facts representing the agents, they are retracted and re-asserted every turn. At least I could keep some of the facts from one turn to the other and not all facts were "lost" due to the reset. But in the end, this approach turned out to be unpractical as well. I am having the same problems as before.
 
I am running my programm on a 512MB machine with Windows XP SP2, so there should be plenty of room for jess to work.
My java virtual machine is 1.4.2-b28 and I am using Jess61p7 but I had the same problem with the Jess70a4 version.
 
Could you give me a hint how to deal with these problems?
 
Tobias

Reply via email to