swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] setting flags for agents


From: mckays
Subject: [Swarm-Support] setting flags for agents
Date: Mon, 25 Jun 2007 18:14:31 -0400
User-agent: Internet Messaging Program (IMP) 3.2-cvs

I am trying to give agents memory of where they have walked.  To do this I am 
creating a flag in a class Cell (similar to HabitatCell in StupidModel). 
Currently, all agents can set and get this flag by:

Cell flags = (cell) cellWorld.getObjectAtX$Y(myX, myY);
flags.setFlag(num);
flags.getFlag(num);

As each agent walks through the Grid2dImpl space they change the flag from a 0 
to one.  The agents can then see where others have walked and not walk on those 
spaces.  I do not want this feature.  I would like the agents to set and get 
their own flags, which will allow them to only see where they have walked. Any 
suggestions on how to do this with Java Swarm 2.2.

Thanks

Shawn 



reply via email to

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