Agent-Based Modeling and Simulation

73 views
Skip to first unread message

Alan Isaac

unread,
May 19, 2014, 9:30:53 AM5/19/14
to au-ec...@googlegroups.com
Use this thread to discuss your questions about agent-based modeling, including basic questions like "what is an agent?"

Mia Raths

unread,
May 19, 2014, 8:03:09 PM5/19/14
to au-ec...@googlegroups.com
Is there a limit to how many turtles can be in a model? Does NetLogo have a cap or is there a limit that is understood to be it in the modeling community before a model gets too complex?

Alan Isaac

unread,
May 19, 2014, 9:16:25 PM5/19/14
to au-ec...@googlegroups.com
Number of Turtles

Each turtle you create requires a little space in memory.  In principle, you could create so many turtles that you would use up your available random access memory.

But you will run into a different constraint long before that.  A typical schedule (go procedure) will ask every turtle to do something.  If you double the number of turtles, it will double the time it takes for all the turtles to do even the simplest things.  When you use a lot of turtles, this becomes a constraint.

But it is even worse than this: you may want turtles to do things that involve interacting with other turtles sequentially.  Suppose for example you wanted each turtle to ask a question of every other turtle.  If you have N turtles, then N*(N-1) questions must be asked.  This is growing much faster than the total number of turtles, so if you have a lot of turtles you can expect your program to run very slowly.

hth,
Alan Isaac

Message has been deleted

Alan Isaac

unread,
May 20, 2014, 10:42:05 AM5/20/14
to au-ec...@googlegroups.com
Number of Turtles

I am a bit concerned that my last post might have sounded too pessimistic a note.
To offset that, I would like to draw your attention to BEEHAVE, an amazing beehive
simulation in NetLogo:
http://youtu.be/j5AZhaYEt5U
The simulation starts with about 10,000 bees.  There is an associated journal article:
http://onlinelibrary.wiley.com/doi/10.1111/1365-2664.12222/abstract

Cheers,
Alan Isaac

Natalie Chambers

unread,
May 24, 2014, 9:40:39 PM5/24/14
to au-ec...@googlegroups.com
If you are creating a map of the turtles actions, are the lines mapped with links? In the models we have been working with have links just not been enabled? For instance in the Traffic Basic model, would the links have just be straight lines along the center of the "road" where as in the mushroom hunt the links would have been the path that hunters took to find mushrooms?

Matthew Reardon

unread,
May 24, 2014, 11:34:04 PM5/24/14
to au-ec...@googlegroups.com
The search procedure of the Mushroom Hunt exercise got me thinking about the iRobot vacuum cleaners.  About a decade ago, the interesting aspect of these cleaners was their original programming design.  The researchers at MIT (I think) who originally created these claimed that the random probabilities corresponding to the direction of movement guaranteed they would cover every inch of a room, despite the appearance of moving in random directions.

On to the point... That got me thinking about how you could direct the "[right (random 181) - 90]" (etc) commands in the search procedure to show priority to "unexplored" areas.  The vacuum robots use doorway sensors, which can provide a positional beacon to trace pathways.  You could designate the random patches in netlogo to serve the same function, but without the viewpoint of the observer I'm not sure how you could program the turn within a search to target unexplored areas.  

For example, if you designated every 10th patch you move across as a positioning "beacon" then you could add some criteria to the code for turning where if the path that originates from the "[right (random 181) - 90]" heads directly towards one of the beacons, then a new random heading would be calculated until the path did not lead directly towards a beacon.  However that will become complex after a few ticks, which would require the criteria to minimize the number of beacons on its path.

After writing this out, I've realized that my question essentially boils down to a learning process.  The mushroom hunt uses colors to designate areas that have been searched; is there a way to change the turn directional heading to semi-avoid these searched areas (semi because you'd have to eventually cross these areas)?  I realize the inevitable problem is becoming trapped in a dead end of searched areas or that randomly choosing a direction will inevitably cover all areas given enough time.  I'm thinking more along the lines of a repeated hide-and-seek model, where the one hiding shows a preference for previously unsearched areas.

Alan Isaac

unread,
May 25, 2014, 1:14:16 AM5/25/14
to au-ec...@googlegroups.com
Links

It is correct that we have not been using links in our models.  You should break your understanding of links into two pieces: the link, and its visual representation.  Probably the most enjoyable way to explore this is by means of the Small Worlds simulation, in the NetLogo Models Library.  Take a look at it, and let me know if you have questions.

A link is just a relationship between two agents (turtles).  The type of relationship can be whatever you wish: acquaintance, amity, enmity, etc.  Visually, a link is typically represented as a straight line between the turtles, but this is just a convention.  You can make the link invisible and it will still exist.

Alan Isaac

unread,
May 26, 2014, 6:14:52 PM5/26/14
to au-ec...@googlegroups.com
iRobot

Please feel free to post a link pointing to this interesting anecdote.

Point of View

One of the features of NetLogo is that it encourages thinking about problems from the point of view of the situated agent, rather than from the point of view of the planner (programmer or observer).  Nevertheless, do not forget that every turtle knows its xcor and ycor (i.e., where it is in the world).

Memory

There are many ways to give an agent "memory", and the simplest approach to avoiding already visited areas may be to keep a visited list (or a last20visited list) as memory.  If you end up need this functionality, let's discuss it further.

Matthew Reardon

unread,
May 27, 2014, 11:27:31 AM5/27/14
to au-ec...@googlegroups.com
iRobot


Down in the iAdapt Responsive Navigation Technology Section, there is a nice video of a roomba cleaning with an artificial "pen down" to display the room coverage.  They are a bit protective over their algorithm, but from what I've read they use combine an overall room map (created from a previous clean) and a local decision process for the "adaptive" part of the cleaning.

Alan Isaac

unread,
May 27, 2014, 6:03:12 PM5/27/14
to au-ec...@googlegroups.com
iRobot

That is quite cool.  If dirt tends to be found in clumps (which seems plausible), this looks like yet another interpretation of the mushroom hunt scenario.
Reply all
Reply to author
Forward
0 new messages