swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reprise: interface declaration


From: Paul Johnson
Subject: Re: reprise: interface declaration
Date: Fri, 13 Oct 2000 10:55:43 -0500


"Marcus G. Daniels" wrote:
> 
> PJ> My ModelSwarm.[hm] has a method in it called "getAgentList: (int) x"
> PJ> and whenever an agent needs to know who is in his "group", he
> PJ> tells the model swarm to give it to him.
> 
> Asking who is in *your* group?  Is the ModelSwarm a church or something?
I don't have the build problems Daniel did, but I'm glad to know what to
watch out for.

I realize now I could define some world type object to do this, but in
an example I work with in class, the ModelSwarm creates the list of
bugs, as in the tutorial.  Then we kill some bugs, birth some bugs, etc,
and some bugs have the ability to ask the model swarm for a list of
other bugs. Not necessarily all bugs, sometimes they ask for a subset of
5 or 10 bugs matching some condition.  THen they can interact with those
bugs, find out stuff from them. For example, how hot is it where you
are, etc.

I've been doing it this way because for teaching reasons: it is a
distraction to have to add another world class to maintain the list of
active bugs.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]