Agent based simulation discussion from SD List

From HPSIGWiki

Jump to: navigation, search

Feb 28 to Mar 3. 2006

Posted by Jim Duggan <jim.duggan@nuigalway.ie>

Is anyone aware of the fundamental techniques and approaches you might use to build an agent-based simulation system. I'm keen to discover what the underlying approach is for agent-based systems. For example: - Are agent-based modelling systems always based on discrete-event simulation? - How are agent societies constructed? - How important is message-passing in an agent-based system? - Does the model builder need to know how to program in order to use agent-based modelling systems?

Posted by Francisco Perez <francisco77pp@yahoo.com>

My piece of advice:

  • GO to http://www.xjtek.com (Anylogic Software Developers Website),there you will find enough material on AB Modeling

And/Or Refer to any the following books:

  • Agent-based Supply Network Event Management (Whitestein Series in Software Agent Technologies) by Roland Zimmermann
  • Agent-Based Manufacturing and Control Systems: New Agile Manufacturing Solutions for Achieving Peak Performance by Massimo Poluci et al
  • Micro Motives and Macro Behavior by Thomas Schelling
  • Game Theory and Decision Theory in Agent-Based Systems (Multiagent Systems, Artificial Societies, and Simulated Organizations) by Simon Parsons et al
  • The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration by Robert Axelrod et al
  • Multi-Agent-Based Simulation : Second International Workshop, MABS 2000, Boston, MA, USA, July 2000
  • Agent-Based Simulation: From Modeling Methodologies to Real-World Applications by Post Proceedings of the Third International Workshop on Agent-Based Approaches
  • Multi-Agent Systems and Agent-Based Simulation by Sichman, Conte and Gilbert.

Posted by Timothy Quinn <tdquinn@MIT.EDU>

(1) Are agent-based modelling systems ALWAYS based on discrete-event simulation?

No.

"Discrete-event" simulation means that you have an operational definition for an "event" and you construct your model to produce those events realistically situated along a time line. There are no continous flows here. You might care how much time has elapsed between events (e.g., how long between customer arrivals), but you don't really care about having the computer tick off all the intervening microseconds. Therefore, these methods have the computer "skip" those time intervals when nothing of interest is happening, fast forwarding through the boring dialogue to get to the exciting car chase.

"Agent-based" simulation means that you explicitly represent a discrete "something" that either acts or is acted upon. For example, instead of aggregating people together into a homogeneous stock, you represent each person explicitly. Imagine that you are an architect designing a football stadium and your problem is to design the stairwells, aisles, and exits. You might build a 3-D stadium model and put a simulated person in each seat. You can easily imagine what each agent's decision rule might be at the end of the match (with an objective function of "leave quickly", not "storm the field and tear down the goalposts").

Having discrete agents does NOT mean you are tied to discrete events. The early modelers of cellular automata used a fixed time step and assumed that every agent had the opportunity to transition its state in every time step. Of course, we would regard this modeling practice as sloppy (see prior debates in this forum on the "meaning" of DT), but it does illustrate my point. Practically speaking, however, it is usually the case that modeling discrete agents requires modeling their discrete events, hence the confusion.

I will not attempt to address the question of whether discrete-event simulations are ALWAYS agent-based as well. There is plenty room for debate here, but not very helpful, I think.

(2) How are agent societies constructed?

The typical and best method is with an object-oriented programming language. For example, see SWARM: http://www.swarm.org/wiki/Main_Page.

(3) How important is message-passing in an agent-based system?

Modeling the influence of the agents' environment or the other agents on their state transitions is at the heart of ABM.

I'm reading between the lines of your question here. The programming of discrete-event simulations with networks of "queues" and "servers" can become quite complex, especially if the possibilities for blocking and starving exist. I did a little "under the hood" custom programming in Extend (http://www.imaginethatinc.com/) in a former life and the messaging can get ugly. In contrast, with AMB each agent's decision logic is "encapsulated" within that agent, consistent with the object-orientation paradigm. This conceptual approach is much cleaner.

(4) Does the model builder need to know how to program in order to use agent-based modelling systems?

I am not familiar with the latest ABM tools, but I would guess that the answer here is "yes". So-called "integrated development environments" (IDE), like AnyLogic (http://www.xjtek.com/), make the task easier, but it is still programming.

Posted by Tobias Lorenz <space56@freenet.de>

I will try to approach your questions: Agent-based Modelling is somehow based on Discrete-Event-Simulation as an agent normally reacts to events, so to turn it the other way around entities in a Discrete-Event-Simulation might be seen as very very stupid agents. Because what is central in Agent-Based-Simulation, is interaction between the agents/entities, which is normally not given in a Discrete-Event-Simulation.

How are Agent societies constructed? Normally you would try to create an agent with some very specific policy in order to try to show that some macro phenomenon can be traced back to that simple rule of the agent. So for a classic agent society you wouldn't need more than several clones of one agent, maybe with changes in some parameters. Nevertheless different and more complicated agent societies might easily be thought of and the field is in my eyes still moving very much and very heterogenous, so there is probably no definition of what an Agent society would be.


Message-passing/Interaction is very important in Agent-based simulation, because the crucial question is: Can i aggregate my agents and thereby dramatically simplify my model or do i need the individual level. The individual level is very important if interaction is responsible for the behaviour under observance.

And unfortunately you still need basic programming skills for Agent-based modelling although there are libraries available for your support and meanwhile also software tools. Nevertheless basic skills are necessary.

Posted by Edward Gallaher <gallaher@ohsu.edu>

Brief reply re agent-based modeling:

Suppose we have 1000 rabbits in some finite age group. We can either look at the average lifespan of this population, or conversely, we can look at the probability of any one individual dying within a finite time period.

Let¹s assume a .05/month mortality rate (a time constant of 20 months). The output equation = Stock * .05/mo.

In SD, we model this as a large stock of rabbits, with a continuous outflow as rabbits meet their demise. As a result, we see an idealized (smooth) decline in the population. This might include fractions of rabbits along the way, but since we know we’re modeling a continuous process, we usually don't worry about this too much. Of course, with an initial population of 10,000, or 100,000, this granularity becomes less and less significant.

Let¹s assume a .05/month mortality rate (a time constant of 20 months).

In contrast, with agent-based modeling we literally define 1000 entities, in this case rabbits. In each dt, a random number is generated for each individual entity. If the random number assigned to Rabbit-1 is 1-5, Rabbit-1 dies; if 6-100, Rabbit-1 lives (for the moment, anyway). This calculation is repeated for each of the remaining live rabbits.

As a result, the population decline WILL be granular, but this will be realistic granularity! In some intervals, more than the expected number will die; in others, less. Populations don’t really decline as pure exponentials, but as a noisy data trace around a pure exponential mean.

Similar logic can be applied to movement of rabbits from one locale to another. There is a finite probability that a given rabbit will leave Meadow A and enter meadow B, and vice versa. In the absence of foxes, the ratios of out-migration and in-migration will determine relative sizes of the two sub-populations.

However, in Meadow A there may be a .05 probability of being caught by a fox; in Meadow B there may be a .09 probability.

It is also possible to keep track of near misses in Meadow B. A surviving rabbit will then have an increased probability of returning to Meadow A, and a subsequent decreased probability in re-visiting Meadow B. It can get very interesting!

Both approaches have merit, of course. I believe further comparisons of agent-based solutions and SD solutions can be enlightening in many cases as we try to understand the real behaviors of interest.

Posted by Martin Davies <martin@p5.co.uk>

If not mentioned already you might find these references of use:

  • Colella, V.S, Kolpfer, E., Resnick, M. Adventures in Modeling: Exploring

Complex, Dynamic Systems with StarLogo, Teachers College Press, NY (2001) isbn 0-8077-4082-9

  • Resnick, M., Turtles, Termites, and Traffic Jams: Explorations in

Massively Parallel Microworlds, MIT (1994) isbn 0-262-18162-2

I believe there is some interesting work to be done relating the conceptual frameworks of ABM and SD and their application in different problem domains. If you'd like to discuss this further please do get in touch.

Personal tools