[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Nov 5 00:08:34 1999 
Subject:Re: Problems with sim_agent toolkit 
From:Aaron Sloman See text for reply address 
Volume-ID:991105.01 

[Responding via comp.lang.pop
To reply replace "Aaron.Sloman.XX" with "A.Sloman"]

D.N.Davis@dcs.hull.ac.uk (Darryl Davis) writes:

> 	My old code for sim_agent (when i was working with aaron)
> 	now longer runs with the newkit version for Unix platforms.

The problem is that if an agent or object has an empty list in its
sim_rulesystem slot, then sim_run_agent is not applied to it.

So try giving your agent class a dummy rulesystem, e.g. as follows:

 define :ruleset dummy;
    ;;; empty ruleset

 enddefine;

 define :rulesystem dummyrules;

     include: dummy

 enddefine;


 define :class sim_test;is sim_object;
    slot sim_rulesystem = dummyrules;
 enddefine;


After that your go(1) will behave as expected.

I had assumed that if there's no rulesystem there's nothing for
sim_run_agent to do, and the object is there only to be sensed or
acted on by other agents. I assumed nobody would notice the change!

It looks as if I was wrong to assume this, and I should change the
definition of sim_scheduler in LIB SIM_AGENT so that instead of

		for object in sim_objects do

            unless sim_rulesystem(object) == [] then
                ....
            endunless;

It should not have the unless and endunless lines.

You can change that in your copy of the code, or else give your test
example a dummy rulesystem as above.

Sorry about that.

Aaron
===
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/