Agents.jl: agent-based modeling framework in Julia

Ali Vahdati
2019 Journal of Open Source Software  
Agent-based modeling involves designing a system of autonomous agents that interact based on a set of given rules (Grimm et al., 2006) . It is used for studying complex systems whose behavior cannot be easily identified using classical mathematical approaches. Agent-based modeling provides a bottom-up approach for studying complex systems, whereas analytical models have a top-down one (Bonabeau, 2002) . The two approaches are complementary and they both can benefit from insights that the other
more » ... hts that the other approach contributes. Analytical models make many simplifying assumptions about the systems they study. This results in systems that are tractable and lead to clear conclusions. Agent-based models, on the other hand, are more difficult to make sense of because they relax many assumptions of equation-based approaches. This is at the same time an advantage of agent-based models because it allows observing the effect of agent and environment heterogeneity and stochasticity, which can change a model's behavior (Farmer & Foley, 2009 ). Agent-based modeling is a particularly important tool for studying complex systems where a system's behavior cannot be predicted and has to be explored. There are currently several agent-based modeling frameworks available (notable examples are not for the Julia language, a new language designed with the needs of scientific computing in mind. Julia provides a combination of features that have historically been mutually exclusive. Specifically, languages that were fast to write, such as Python, were slow to run. And languages that were fast to run, such as C/C++, were slow to write. The combination of speed, expressiveness, and support for interactive computing makes Julia a desirable choice for scientific purposes. Agent-based models can involve hundreds of thousands of agents, each performing certain computations at each time step, thus speed is essential. Agents.jl is the first high-performance agentbased modeling framework to be written in Julia, and offers key advantages relative to the existing frameworks in other languages. First, unlike NetLogo, Agents.jl uses a general-purpose language rather than custom one, which reduces the learning curve and unifies the modeling and analysis language. Second, Julia is an easy to learn and easy to write language, unlike Java that is used for Repast and MASON, and provides a REPL (Read-Eval-Print-Loop) to build and analyze models interactively. Third, Julia is fast to run, unlike Python, which is used for Mesa (see Figure 1 ). This can be important in large agent-based models.
doi:10.21105/joss.01611 fatcat:kot7hkiclrhcjmybcunnz7mxvi