Applying Dependency Injection to Agent-Based Modeling: the JABM Toolkit

In many areas of science, agent-based models have become increasingly important. These models are often sufficiently complex that deriving closed-form solutions for quantitative aspects of their macroscopic behaviour is often impractical if not impossible. Thus these models are often analysed using Monte-Carlo simulation. Object-oriented programming languages are naturally suited to implementing such models. However, Monte-Carlo methods impose some subtle requirements: we must run the same program very many times with randomly-drawn values of variables in the simulation being drawn from probability distributions, taking great care to ensure that each run is not contaminated with state from previous runs. Typically these problems are tackled by model-specific application code residing in the objects representing individuals in the model. However, this approach is not declarative and leads to crosscontamination between code representing experiments or treatments and code representing the model itself. In this paper we give an overview of agent-based modelling with an emphasis on its application to multi-agent systems research, and show how a design pattern called “dependency injection” can be used to implement highly configurable simulation models which are able to incorporate various assumptions about agents’ rationality and learning.

[1]  William Rand,et al.  An Introduction to Agent-Based Modeling: Modeling Natural, Social, and Engineered Complex Systems with NetLogo , 2015 .

[2]  Albert-László Barabási,et al.  Statistical mechanics of complex networks , 2001, ArXiv.

[3]  Samuel P. Midkiff,et al.  Java programming for high-performance numerical computing , 2000, IBM Syst. J..

[4]  Nicolaas J. Vriend,et al.  An Illustration of the Essential Difference between Individual and Social Learning, and its Consequences for Computational Analyses , 1998 .

[5]  L. Tesfatsion Agent-Based Computational Economics: Growing Economies from the Bottom Up , 2002 .

[6]  P. Hammerstein,et al.  Biological markets. , 1995, Trends in ecology & evolution.

[7]  Michael P. Wellman Methods for Empirical Game-Theoretic Analysis , 2006, AAAI.

[8]  J. Banks,et al.  Discrete-Event System Simulation , 1995 .

[9]  J. Nash Equilibrium Points in N-Person Games. , 1950, Proceedings of the National Academy of Sciences of the United States of America.

[10]  Jose M. Garrido Object-Oriented Discrete-Event Simulation with Java: A Practical Introduction , 2001 .

[11]  Seth Bullock,et al.  Evolutionary Simulation Models: On Their Character, and Application to Problems Concerning the Evolution of Natural Signalling Systems , 1997 .

[12]  Leigh Tesfatsion,et al.  Agent-Based Computational Economics: Growing Economies From the Bottom Up , 2002, Artificial Life.

[13]  Duncan J. Watts,et al.  Collective dynamics of ‘small-world’ networks , 1998, Nature.

[14]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[15]  E. Maasland,et al.  Auction Theory , 2021, Springer Texts in Business and Economics.

[16]  R. Cont Empirical properties of asset returns: stylized facts and statistical issues , 2001 .

[17]  A. Roth,et al.  Predicting How People Play Games: Reinforcement Learning in Experimental Games with Unique, Mixed Strategy Equilibria , 1998 .

[18]  Jordan B. Pollack,et al.  A Game-Theoretic Approach to the Simple Coevolutionary Algorithm , 2000, PPSN.

[19]  Michael P. Wellman,et al.  Agent-based analysis of asset pricing under ambiguous information , 2010, SpringSim.

[20]  Yoav Shoham,et al.  Multiagent Systems - Algorithmic, Game-Theoretic, and Logical Foundations , 2009 .

[21]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[22]  Sean Luke,et al.  MASON: A Multiagent Simulation Environment , 2005, Simul..

[23]  R. Axelrod,et al.  The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration , 1998 .

[24]  Yixin Chen,et al.  A comparison of a graph database and a relational database: a data provenance perspective , 2010, ACM SE '10.

[25]  James E. Rauch The Missing Links: Formation and Decay of Economic Networks , 2007 .

[26]  S. Parsons,et al.  Overview of CAT: A Market Design Competition , 2009 .

[27]  Steve Phelps,et al.  Emergence of social networks via direct and indirect reciprocity , 2012, Autonomous Agents and Multi-Agent Systems.

[28]  Simone Alfarano,et al.  Network structure and N-dependence in agent-based herding models , 2009 .

[29]  W. Daniel Hillis,et al.  Co-evolving parasites improve simulated evolution as an optimization procedure , 1990 .

[30]  Karl Tuyls,et al.  Frequency adjusted multi-agent Q-learning , 2010, AAMAS.

[31]  Nelson Minar,et al.  The Swarm Simulation System: A Toolkit for Building Multi-Agent Simulations , 1996 .

[32]  J. Juang,et al.  PID Control Using Presearched Genetic Algorithms for a MIMO System , 2008, IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews).

[33]  Werner Dubitzky,et al.  Repast HPC: A Platform for Large-Scale Agent-Based Modeling , 2012 .

[34]  Michael P. Wellman,et al.  Asset pricing under ambiguous information: an empirical game-theoretic analysis , 2012, Comput. Math. Organ. Theory.

[35]  Gerard P.J. Dijkema,et al.  Modeling Socio-technical Systems with AgentSpring , 2012 .

[36]  Nick Constantinou,et al.  Learning is neither sufficient nor necessary: An agent-based model of long memory in financial markets , 2014, AI Commun..

[37]  A. Lo,et al.  Reconciling Efficient Markets with Behavioral Finance: The Adaptive Markets Hypothesis , 2005 .

[38]  A. Lo,et al.  A Non-Random Walk Down Wall Street , 1999 .

[39]  J. Pollack,et al.  Challenges in coevolutionary learning: arms-race dynamics, open-endedness, and medicocre stable states , 1998 .

[40]  H. Ohtsuki,et al.  A simple rule for the evolution of cooperation on graphs and social networks , 2006, Nature.

[41]  Chris Richardson Untangling Enterprise Java , 2006, ACM Queue.

[42]  Peter McBurney,et al.  A Novel Method for Strategy Acquisition and Its Application to a Double-Auction Market Game , 2010, IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics).

[43]  G. Tesauro,et al.  Analyzing Complex Strategic Interactions in Multi-Agent Systems , 2002 .

[44]  Rod Johnson,et al.  Professional Java Development with the Spring Framework , 2005 .

[45]  Yann Chevaleyre,et al.  Issues in Multiagent Resource Allocation , 2006, Informatica.

[46]  Mark Newman,et al.  Networks: An Introduction , 2010 .

[47]  J. M. Smith,et al.  The Logic of Animal Conflict , 1973, Nature.

[48]  J. Bouchaud,et al.  HERD BEHAVIOR AND AGGREGATE FLUCTUATIONS IN FINANCIAL MARKETS , 1997, Macroeconomic Dynamics.

[49]  John H. Miller,et al.  The coevolution of automata in the repeated Prisoner's Dilemma , 1996 .

[50]  G. Grimmett,et al.  Probability and random processes , 2002 .

[51]  Charles M. Macal,et al.  Escaping the Accidents of History: An Overview of Artificial Life Modeling with Repast , 2005 .

[52]  Michael C. Fu,et al.  Guest editorial , 2003, TOMC.

[53]  W. Arthur Inductive Reasoning and Bounded Rationality , 1994 .

[54]  Maxi San Miguel,et al.  Cooperation in an Adaptive Network , 2000, Adv. Complex Syst..

[55]  Nick Constantinou,et al.  Testing Adaptive Expectations Models of a Continuous Double Auction Market against Empirical Facts , 2011, AMEC/TADA.

[56]  A. Colman,et al.  The complexity of cooperation: Agent-based models of competition and collaboration , 1998, Complex..

[57]  Carl Chiarella,et al.  A simulation analysis of the microstructure of double auction markets , 2002 .

[58]  Dhanji R. Prasanna,et al.  Dependency Injection , 2009 .

[59]  Andrew Howes,et al.  The Effect of Group Size and Frequency-of-Encounter on the Evolution of Cooperation , 2009, ECAL.

[60]  B. LeBaron,et al.  Long-memory in an order-driven market , 2007 .

[61]  Michael P. Wellman,et al.  Empirical game-theoretic analysis of the TAC Supply Chain game , 2007, AAMAS '07.

[62]  M. Jackson The Study of Social Networks In Economics , 2007 .

[63]  Thilo Gross,et al.  Patterns of cooperation: fairness and coordination in networks of interacting agents , 2009, 0902.2954.

[64]  Wing Lon Ng,et al.  Can a zero-intelligence plus model explain the stylized facts of financial time series data? , 2012, AAMAS.

[65]  Michael H. Bowling,et al.  Convergence and No-Regret in Multiagent Learning , 2004, NIPS.

[66]  B. LeBaron Agent-based Computational Finance , 2006 .

[67]  Rod M. Burstall,et al.  Christopher Strachey—Understanding Programming Languages , 2000, High. Order Symb. Comput..

[68]  Jordan B. Pollack,et al.  A game-theoretic and dynamical-systems analysis of selection methods in coevolution , 2005, IEEE Transactions on Evolutionary Computation.

[69]  F. C. Santos,et al.  Graph topology plays a determinant role in the evolution of cooperation , 2006, Proceedings of the Royal Society B: Biological Sciences.

[70]  Bart De Schutter,et al.  A Comprehensive Survey of Multiagent Reinforcement Learning , 2008, IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews).

[71]  R. Golembiewski Behavior and organization : O & M and the small group , 1963 .