• Subscribe

Agent-based models: A computational 'ant farm'

Watching tiny insects spontaneously construct elaborate sand networks of tunnels and chambers is appealing to young and old alike. Ant farms, with more than 20 million sets sold since the early 1950s, were once one of the most popular toys in the world. The term 'ant farm' is, in fact, a legally registered trademark established by the US-based Uncle Milton Industries, Incorporated. The same principle - simple behaviors capable of producing complex results - also applies to a popular branch of computer modeling.

Image courtesy hdwallimg.com

Computer scientists can create a population of 'agents' that operate by very simple rules. When one agent comes close to another, for example, computer code may instruct the agents to move in opposite directions - away from each other. Code might also instruct one agent to transfer a particular status, such as 'disease,' to another agent. Scale up the simple instructions to thousands, millions, or even billions of agents, and scientists can use the agent-based model to recreate massively complex systems like: financial markets, ecosystems, urban transportation, and even terrorist networks.

"Agent-based models are very good at demonstrating emerging properties, population-level effects that are the result of individual rules," says John T. Murphy, a computational postdoctoral fellow with Argonne National Lab's Decisions and Information Sciences (DIS) Division. "They're useful where the world is messy and broken up into pieces that are not easily reducible to equations, or where a top-down approach won't work."

To help researchers construct their own agent-based models, DIS scientists developed the open-source Recursive Porous Agent Simulation Toolkit (Repast). The group initially released Repast Simphony, a desktop program for designing and running agent-based models. As scientists sought to tackle more ambitious research questions, and ever-larger data sets, the need for agent-based models that could run on supercomputers grew.

In response, DIS researchers built Repast HPC. The software is similar to Repast Simphony, with additional optimizations that enable the models to run on the parallel computing architectures in use by most supercomputers today. Instead of running the entire model sequentially on one processor, Repast HPC can split the world of the model among many thousands of processors for faster performance.

Parallelizing an agent-based model can be quite difficult, says Murphy. Splitting the model across multiple cores means chopping up either the physical space simulated by the model - such as a city or an ecosystem - or the network of agent relationships. Agents that are distant from each other, either in space or within a network, are very unlikely to interact during a given model step. In contrast, agents that are close to the boundaries of a model split may interact with another simulated agent on another core. Repast HPC takes measures to copy any agent in a 'buffer zone' around boundaries.

The copied, non-local agents can then interact with other agents on that piece of the model, while the original agent remains on its own processor. Between each step, synchronization functions relay any changes encountered by the non-local agents back to their original source. The larger the model - and the more processors it's spread across - the more expensive these synchronization steps can get, Murphy notes.

Despite these technical hurdles, agent-based models are increasingly used for simulating a wide variety of topics. Murphy, using models built in Repast, is studying water management in the western United States, while a team of DIS scientists is collaborating with physicians from the University of Chicago Medicine in Illinois, US, to study the spread of MRSA infections throughout the city. This team is using an agent-based model to test whether Chicago's rapid rise of infections between 2001 and 2006 was driven by traffic in and out of the Cook County Jail, the largest single-site jail facility in the US.

Agent-based model research was also a recent topic at an urban forum held by the University of Chicago Urban Network. Discussion included studies on macro-scale effects of microeconomics theories, predicting consumer behavior, and simulating predator-prey relationships in the wild. These studies may not produce hours of entertainment for adoring eyes à la the ant farm, but they will open the door to important scientific insights.

Article adapted from Rob Mitchum's blog post: An Ant Farm for the Supercomputer

Join the conversation

Do you have story ideas or something to contribute? Let us know!

Copyright © 2021 Science Node ™  |  Privacy Notice  |  Sitemap

Disclaimer: While Science Node ™ does its best to provide complete and up-to-date information, it does not warrant that the information is error-free and disclaims all liability with respect to results from the use of the information.


We encourage you to republish this article online and in print, it’s free under our creative commons attribution license, but please follow some simple guidelines:
  1. You have to credit our authors.
  2. You have to credit ScienceNode.org — where possible include our logo with a link back to the original article.
  3. You can simply run the first few lines of the article and then add: “Read the full article on ScienceNode.org” containing a link back to the original article.
  4. The easiest way to get the article on your site is to embed the code below.