If you are not using Jess for agent based modelling this is probably not for you.

First I thank Ernest Friedman-Hill for his off-list patience and explanations. The penny finally dropped as a result of the Dr Strangejess postings in the context of EF-H's explanations.

I think that declaratively modelled agents produce quite a dynamic set of working memory elements (or facts) with (usually but not always) a static set of rules. Jess, the manual emphasises, is optimised for relatively static sets of facts. My defqueries, called with run-query* were retrieving zero or one of many facts in working memory. This I now think is because the rules calling run-query* were firing before the rules asserting the facts had all fired. In the words of the Master, "I'm sure the problems you're having here are due to the fact that the Rete network is not reentrant. In particular, if a query is run from a rule that fires while that same query is running, the query results will be incorrect." So what is required is for the rule calling the query to fire after all of the appropriate set of facts have been asserted. To impose this probably looks procedural rather than declarative.

Now most of us who use declarative approaches in agent based modelling do so to represent cognition. Cognition frequently does involve collecting facts in a variety of ways some of which are well represented procedurally. So if facts include a timestamp and the defqueries are called on facts from a previous timestep, then all of the relevant facts will obviously be present when the query is run and reentry is not an issue. Simple when you think about it.

--
Professor Scott Moss
Centre for Policy Modelling
Manchester Metropolitan University
Aytoun Building
Manchester M1 3GH
UNITED KINGDOM

telephone: +44 (0)161 247 3886
mobile: +44 (0)7740 942564
fax: +44 (0)161 247 6802

http://cfpm.org/~scott

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