What every agent-based modeller should know about floating point arithmetic

Floating point arithmetic is a subject all too often ignored, yet, for agent-based models in particular, it has the potential to create misleading results, and even to influence emergent outcomes of the model. Using a simple demonstration model, this paper illustrates the problems that accumulated floating point errors can cause, and compares a number of techniques that might be used to address them. We show that inexact representation of parameter values, imprecision in calculation results, and differing implementations of mathematical expressions can significantly influence the behaviour of the model, and create issues for replicating results, though they do not necessarily do so. None of the techniques offer a failsafe approach that can be applied in any situation, though interval arithmetic is the most promising.

[1]  Bruce Edmonds,et al.  SDML: A Multi-Agent Language for Organizational Modelling , 1998, Comput. Math. Organ. Theory.

[2]  Robert M. Corless,et al.  What good are numerical simulations of chaotic dynamical systems , 1994 .

[3]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[4]  Ian S. Lustick,et al.  PS-I: A User-Friendly Agent-Based Modeling Platform for Testing Theories of Political Identity and Political Stability , 2002, J. Artif. Soc. Soc. Simul..

[5]  R. Palmer,et al.  Time series properties of an artificial stock market , 1999 .

[6]  Christophe Le Page,et al.  Multi-Agent Modelling and Renewable Resources Issues: The Relevance of Shared Representations for Interacting Agents , 2000, MABS.

[7]  Andrzej Nowak,et al.  Computer modeling of social processes , 1998 .

[8]  P. Langlois More accuracy at fixed precision , 2004 .

[9]  R. Hegselmann,et al.  Simulating Social Phenomena , 1997 .

[10]  Marco A. Janssen,et al.  Simulating land-cover change in South-Central Indiana: an agent-based model of deforestation and afforestation. , 2002 .

[11]  G. Alefeld,et al.  Introduction to Interval Computation , 1983 .

[12]  Ansi Ieee,et al.  IEEE Standard for Binary Floating Point Arithmetic , 1985 .

[13]  Richard M. Stallman,et al.  Using and Porting the GNU Compiler Collection , 2000 .

[14]  James Gleick Chaos: Making a New Science , 1987 .

[15]  Christophe Le Page,et al.  Cormas: Common-Pool Resources and Multi-agent Systems , 1998, IEA/AIE.

[16]  R. Kent Dybvig,et al.  The Scheme Programming Language , 1995 .

[17]  J. Lansing,et al.  Emergent Properties of Balinese Water Temple Networks: Coadaptation on a Rugged Fitness Landscape , 1993 .

[18]  Scott Moss,et al.  Competition in Intermediated Markets: Statistical Signatures and Critical Densities , 2001 .

[19]  James Gleick,et al.  Chaos, Making a New Science , 1987 .

[20]  Nicholas M. Patrikalakis,et al.  Efficient and reliable methods for rounded-interval arithmetic , 1998, Comput. Aided Des..

[21]  François Bousquet,et al.  SINUSE: a multi-agent model to negotiate water demand management on a free access water table , 2003, Environ. Model. Softw..

[22]  Paul E. Johnson Agent-Based Modeling , 2002 .

[23]  William Kahan,et al.  Pracniques: further remarks on reducing truncation errors , 1965, CACM.

[24]  Nicholas Mark Gotts,et al.  Case-Based Reasoning, Social Dilemmas, and a New Equilibrium Concept , 2004, J. Artif. Soc. Soc. Simul..

[25]  Vaughan R. Pratt,et al.  Computational aspects of the Pentium affair , 1995 .

[26]  Bruce D. McCullough,et al.  The Numerical Reliability of Econometric Software , 1999 .

[27]  Nicholas J. Higham,et al.  INVERSE PROBLEMS NEWSLETTER , 1991 .

[28]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[29]  J. Winkler A statistical analysis of the numerical condition of multiple roots of polynomials , 2003 .

[30]  Charles L. Lawson,et al.  Solving least squares problems , 1976, Classics in applied mathematics.

[31]  William Rand,et al.  Agent-based and analytical modeling to evaluate the effectiveness of greenbelts , 2004, Environ. Model. Softw..

[32]  J urgen Wolff von Gudenberg,et al.  Different Approaches to Interval Arithmetic , 1990 .

[33]  M. Janssen Complexity and Ecosystem Management: The Theory and Practice of Multi-Agent Systems , 2003 .

[34]  François Bousquet,et al.  Multi-agent simulations and ecosystem management: a review , 2004 .

[35]  J. Vignes,et al.  Error Analysis in Computing , 1974, IFIP Congress.

[36]  Klaus G. Troitzsch,et al.  Modelling and simulation in the social sciences from the philosophy of science point of view , 1996 .

[37]  M. Hare,et al.  Further towards a taxonomy of agent-based simulation models in environmental management , 2004, Math. Comput. Simul..

[38]  Nicholas Mark Gotts,et al.  Agent-Based Simulation in the Study of Social Dilemmas , 2003, Artificial Intelligence Review.

[39]  B. Edmonds,et al.  Replication, Replication and Replication: Some hard lessons from model alignment , 2003, J. Artif. Soc. Soc. Simul..

[40]  Claudia Pahl-Wostl,et al.  Information, public empowerment, and the management of urban watersheds , 2005, Environ. Model. Softw..

[41]  H. Randy Gimblett,et al.  Integrating geographic information systems and agent-based modeling techniques for simulating social and ecological processes , 2001 .

[42]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[43]  Nicholas Mark Gotts,et al.  ASPIRATION LEVELS IN A LAND USE SIMULATION , 2003, Cybern. Syst..

[44]  Inmaculada García,et al.  Floating point arithmetic teaching for computational science , 2003, Future Gener. Comput. Syst..

[45]  Nicholas Mark Gotts,et al.  The Ghost in the Model (and Other Effects of Floating Point Arithmetic) , 2004, J. Artif. Soc. Soc. Simul..

[46]  Robert Axelrod Advancing the art of simulation in the social sciences , 1997 .

[47]  Joshua M. Epstein,et al.  Growing Artificial Societies: Social Science from the Bottom Up , 1996 .

[48]  Nigel Gilbert,et al.  Holism, Individualism and Emergent Properties , 1996 .

[49]  Jaime Simão Sichman,et al.  Multi-Agent-Based Simulation , 2002, Lecture Notes in Computer Science.

[50]  Nicholas Mark Gotts,et al.  IMITATIVE VERSUS NONIMITATIVE STRATEGIES IN A LAND-USE SIMULATION , 2001, Cybern. Syst..

[51]  Dominique Michelucci,et al.  Lazy Arithmetic , 1997, IEEE Trans. Computers.

[52]  David Goldberg,et al.  What every computer scientist should know about floating-point arithmetic , 1991, CSUR.

[53]  Moshe Sipper,et al.  Design, Observation, Surprise! A Test of Emergence , 1999, Artificial Life.

[54]  Peter J. L. Wallis Improving Floating-Point Programming , 1990 .