<figure><img src="image_1.png" /></figure>

HAL
open science

# A framework for the comparison of errors in agent-based models using machine learning

Jack T Beerman, Gwendal G Beaumont, Philippe J Giabbanelli

## ► To cite this version:

Jack T Beerman, Gwendal G Beaumont, Philippe J Giabbanelli. A framework for the comparison of errors in agent-based models using machine learning. Journal of computational science, 2023, 72, pp.102119. 10.1016/j.jocs.2023.102119. hal-04183883

HAL Id: hal-04183883

https://imt-mines-ales.hal.science/hal-04183883v1

Submitted on 3 Mar 2026

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# A framework for the comparison of errors in agent-based models using machine learning*

Jack T. Beerman<fnref n="1" />[0000-0002-6303-5556], Gwendal G. Beaumont<fnref n="1" />,<fnref n="2" />[0000-0001-9861-4008], and Philippe J. Giabbanelli<fnref n="1" />[0000-0001-6816-355X]

**Abstract.** Across common ABM frameworks (e.g., BDI, SOAR, ACT-R) errors in human perceptions are inconsistently handled through implementation or lack thereof. Without the proper integration or absence of key human behaviors, researchers in cognitive social simulations may overlook various features that would have affected the overall model trajectory. We address this concern by developing a framework that illustrates the value of agents possessing internal models that are driven by Machine Learning. We illustrate the impact of this framework on two well-known models (Schelling and Axelrod) and on a COVID-19 simulation. Our work employs various Machine Learning models (e.g., Decision Tree Classifier, Logistic Regressor) to depict how the inclusion of human errors alters the overall model trajectory and may justify the integration of imperfections and heterogeneity into individual decision-making processes. Our open source framework can be integrated into existing and future models and utilized to examine the consequences of an agent making a decision without the appropriate amount of information (insufficient observation), by ignoring specific information (superficial observation), when inaccurately recording information (inaccurate perception), or due to a gap between environmental complexity and individual capacity (limited ability).

**Keywords:** Agent-Based Modeling · Machine Learning · Perceptual Errors · Python.

## 1 Introduction

Agent-Based Models (ABMs) are a simplification of reality in which a system is decomposed into a set of (potentially heterogeneous) agents that interact with

<footnote n="1">¹ Department of Computer Science & Software Engineering, Miami University, Oxford OH 45056, USA</footnote>

<footnote n="2">² IMT Mines Ales, 6 Av. de Clavieres, 30100 Ales, France
{beermajt,beaumog,giabbapj}@miamioh.edu</footnote>

<footnote>* Preprint submitted to Elsevier. ©2023 Copyright held by the owner/author(s). This is the author's version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in *Journal of Computational Science*, Volume 72, 2023, 102119, ISSN 1877-7503, https://doi.org/10.1016/j.jocs.2023.102119.</footnote>
each other and with their environment. In many instances, simplifications that
may at first sound odd can be tolerated because the model is sufficiently fit for
purpose [95]. For example, in a classic prey-predator model, sheep may jump
with blissful unawareness into a location occupied by a wolf, who will simply eat
them. While real sheep are less suicidal, the perception error does not prevent
the model from being adequate in its ability to reflect population level dynamics
over the course of a simulation. Errors may even be a necessary feature for appli-
cation domains such as gaming, where the unpleasant prospect of an all-powerful
computer opponent is addressed by using different decision making algorithms
that force an opponent's agents to make errors (e.g., greedy algorithms instead
of optimization). A similar need arises in several scientific applications, as a pur-
poseful inclusion of errors in a model can preserve accuracy vis-à-vis real social
systems. For instance, a model of gentrification purposely limited an agent to
finding a house by only looking at a cluster (the 'microscale') rather than op-
timizing over an entire city. Although the results could be sub-optimal for the
agents (e.g., there may have been a better deal just a few blocks away), the
simulation accurately generated patterns of human relocation within submar-
kets [98].

Despite such examples, there is a broader tendency to create ABMs where
agents are very homogeneous and rational [24]. Indeed, “most AI researchers
have little interest in replicating the all too human errors [...] observed in na-
ture.” [54] In an application domain such as agricultural policy, most ABMs use
optimization and only 20% employ behavioral heuristics [60]. In human health
behavior research, models have assumed that virtual agents are perfectly accu-
rate in sensing the state of other agents [55], and that they will make an informed
decision after performing a thorough inventory of their surroundings [26]. But in
reality, humans only take in a small portion of the information available in their
environment [12], potentially make errors in memory encoding or retrieval, in-
terpret the world through their own heterogeneous sets of beliefs [75], and react
based on their emotions [67]. Filtering out information is one of the key skills
that characterize human decision making, which allows us to focus on specific
tasks amidst a busy environment [2]. Although emotions used to be considered
as a disruptive and irrational behavior from a modeling standpoint, they are now
seen as essential to generate “a more human-like behavior thus having deeper
and more meaningful human-machine relationship” [67]. The growing recogni-
tion that virtual agents ought to make errors echoes popularized notions such
as Pope’s “To Err is Human”, or established concepts such as bounded ratio-
nality [90] and its illustration above in the gentrification model. In this paper,
we focus on the inclusion of errors in ABMs, thus contributing to the study of
cognitive social simulations by covering errors in the individual mental processes
of agents and in their social processes [94].

The impact of such judgment errors on model outcomes has been inconsis-
tently addressed in ABMs [27]. Our previous work showed that errors could be
introduced into ABMs and helped to identify problematic assumptions in some
of the models, as simulation outcomes would be either highly sensitive to a small
level of errors or (to the other extreme) would remain unchanged regardless of
how erratic an agent may become [37]. However, the ad-hoc introduction of errors
into various implementations of ABMs leads to multiple challenges. First, tem-
pering with various codes is a laborious process as errors have to be introduced
in different ways, which raises the potential for bugs. Second, comparing the
effect of errors on various ABMs (e.g., to select one that is appropriately robust)
becomes a very time-consuming enterprise, since each ABM could be written in
its own ways. Third, there is a vast array of phenomena that qualify as ‘errors’,
and programmers may only implement some based on their own awareness and
the convenience of modifying existing codes. These shortcomings point to the
need for a framework that facilitates the systematic inclusion of human errors
into ABMs, thus echoing calls for frameworks that let us rigorously handle key
aspects of ABMs [97] and for building blocks that facilitate the inclusion of core
features into ABMs [101].

The growing interest in combining Machine Learning (ML) with ABM offers an opportunity to support the systematic specification and implementation of errors. Although the general notion of using ML to set the behaviors of agents has long been discussed [32], a recent review of 51 ABMs employing ML techniques allows for a more precise definition [41]. The authors suggest that ML can “replace, augment, or optimize the agent’s internal behavioral rules” in two ways: either the ML component is already developed and each agent uses it as such during the simulation, or the ML component is used to learn and improve agent decisions at runtime. In this paper, we use the latter approach by equipping each agent with an ML algorithm (e.g., a decision tree) that receives observations and combines them to arrive at a decision. The ML algorithm acts as a key conduit to systematically handle various types of errors, either in observations (e.g., insufficient data, inaccurate measurements) or in inferences (e.g., when an agent’s capacity cannot cope with the complexity of its environment).

Hybrid ML/ABM models by nature include many ways that lead agents to
make sub-optimal decisions, but these errors were not the main focus of the
associated studies. For instance, agents have previously been equipped with a
neural network, and their decisions were inherently affected by limitations in
training data, lack of perfect knowledge about their peers’ true preferences, and
the accuracy of their neural network predictions [74,73]. In contrast, this paper
focuses on the systematic treatment of errors. Our contributions are threefold:

- We unify the treatment of errors in the decision-making processes of Agent-Based Models by using Machine Learning as a filter for observations and inferences. In previous studies, the mechanisms underlying social learning between agents were treated as a blackbox [52,72]. Our framework is thus a first step towards operationalizing the errors that shape human behaviors.

- We implement our framework in Python and release it open source for the research community on the third-party repository of the Open Science Framework at https://osf.io/n6pja/.

- We instantiate our framework on classic studies (Schelling model of segregation, Axelrod model of culture) and a sample COVID-19 application,
thus illustrating the types of errors that we support and exemplifying how
researchers would assess the effect of errors onto simulation outcomes.

The remainder of this paper is structured as follows. In section 2, we provide a succinct overview of how previous frameworks have covered the notion of errors in ABMs in order to enhance their realism. Our objective is not to detail every agent architecture, as this has been covered in many studies [21,59,93]; rather, we use of sample of well-known frameworks from formal logic (e.g., belief-desire-intention) and cognitive science (e.g., appraisal theories) to illustrate which errors may be incorporated and how. Then, our background covers the inclusion of data in ABMs, to provide the foundations for our approach at the intersection of ML and ABM. Our framework is introduced in section 3 and exemplified via three case studies in section 4, with a continued emphasis on identifying which errors can be included in a model and how. Results are provided in section 5, while noting that they illustrate how modelers can analyze the impact of errors onto their output, hence the focus is on the ability to perform analyses rather than on a specific model (e.g., we do not seek to generate new insight into the Schelling model). Limitations and future works are summarized in section 6 and concluding remarks are offered in section 7.

2 Background

2.1 Integrating Errors into Agent-Based Models

The errors that characterize human behaviors are handled inconsistently among empirical ABM studies [27]. A variety of works tend to include certain errors (e.g., uncertainty, assumptions) [37,82,89,60] through differing methodologies or exempts human errors from their ABMs altogether [54] (Table 1). In order to develop models which demonstrate sufficiently realistic human behavior, it is vital to integrate common human errors [37] into existing ABM frameworks. The *Enhancing Realism of Simulations* (EROS) [44] approach seeks to integrate psychological realism into agent-based models. The concept of EROS has been advocated for over twenty years, yet the theoretical discussion and actual implementation has only proceeded in recent years [10,44]. A variety of existing frameworks (e.g., SOAR, ACT-R, CLARION, EMA, DETT, eBDI) attempt to capture psychological realism, although they may focus on only a subset of aspects and can have drawbacks. For example, frameworks such as SOAR and ACT-R include complex psychology reasoning by integrating long and short term memory, but they require an extreme computational cost [61,4,10].

One of the most popular existing ABM frameworks is the *Belief-Desire-Intention* (BDI) which was founded on ideas expressed by philosophers [7,104]. The BDI framework is based on the idea that it is possible to represent human behavior by defining an individual's beliefs, desires and intentions [54]. An agent's beliefs account for their personal information about their environment. This is the perception of the world, as seen per the agent, which may be subject to uncertainty and errors. The agent's desires are all the possible states of affairs
<table><caption>Table 1: Different errors and how they were handled in the literature</caption><thead><tr><td>Type of Error</td><td>Example Study</td></tr></thead><tbody><tr><td>Uncertainty</td><td>Probability for agents to make mistakes during perception of their environment [37]<br/>Used attitudinal models to calculate the values of uncertainty arising from agent-to-agent interactions [82].</td></tr><tr><td>Assumptions</td><td>Rule-sets of logic to contrast outcomes of agents' decisions from making assumptions [89]</td></tr><tr><td>Emotions</td><td>The OCC theory accounts for emotions and social relations in ABMs [9], for instance by specifying that emotions are positive/negative reactions due to events, actions of agents, or aspects of objects [67]<br/>The reasoning module of the agents is directly related to emotions [62]</td></tr></tbody></table>

that the agent wishes to accomplish, and the agent's intentions are commitments to a particular course of actions for achieving a particular goal [7,104,54]. A variety of languages and programming environments support the BDI framework, often by using Java and formerly via interprets of the logic-based language AgentSpeak [80]. Emerging solutions are leveraging cross-language development platforms such that the socio-psychological module for the BDI agents can be written in any language and accessed by a simulator [8].

*Behavior with Emotions and Norms (BEN)* is a framework that has comprehensively implemented the principles of EROS [10, p. 148]. For instance, the BEN architecture is comprised of predicates, cognitive mental states, emotions, social relations, norms, personalities, and obligations [11] and can provide a simplified high-level overview of an agent's behavior at any moment during the simulation in efficient computational time [10]. The architecture of BEN is derived from the BDI and the eBDI frameworks, the latter being derived from BDI and being adjusted to create agents with particular emotions.

Numerous other extensions to the BDI framework have been proposed but remain at a theoretical stage [7]. For example, *Belief-Obligation-Intention-Desire (BOID)* [7,104,69] accounts for normative concepts such as social norms and obligations [23]. In BOID, agents can choose to follow social rules and contribute to the collective interest of agents. The decision making of the agents is similar to BDI; however, agents take social norms and obligations into consideration while interacting in simulation [7,104]. Similarly, the *Belief-Response-Intention-Desire-Goals-Ego* (BRIDGE) framework accounts for social awareness, 'own' awareness and reasoning based on the BDI modules [7,69]. This framework introduces three new modules called *ego*, *response*, and *goals* while also refining some of the original modules present in BDI. In addition, BRIDGE has several differences from BDI which include that all components can work in parallel to provide continuous processing of the environment and the ego component helps specify
different types of agents and their emotional responses to various stimuli [7] which adheres most similarly to EROS.

Unlike the previous frameworks, CLARION uses a hybrid neural network system to simulate tasks in cognitive and social psychology for artificial intelligence applications [92]. This framework particularly emphasizes the difference between explicit and implicit representation of knowledge. Implicit knowledge is learned through the use of neural networks or reinforcement machine learning mechanisms [104]. Lastly, CLARION integrates routines, generic rules, decision making, and has one of the most complex learning methodologies of proposed frameworks [7].

As shown in **Table 2**, most of the frameworks aforementioned do not handle emotions. Although emotions are not typically included under the umbrella of ‘errors’, they participate to increasing the realism of agents (particularly for crisis models) and the diversity of their reactions. Extrapolating from the example in [67], when an agent sees its house burn, it may express fear and sadness because the house is gone, or joy because the insurance will build a better house. Advances in neuropsychology suggest that “cognitive information-processing models and emotion information-processing models work in tandem” [25], hence a different line of architectures handles emotions by combining these two models in the decision-making module of an agent. Such architectures may be mathematical grounded using decision field theory [15] or rooted in less formal approaches such as appraisal theories. For instance, the *emotional Biologically Inspired Cognitive Architecture* (eBICA) has been used in several studies to explain or predict human behavior [86]. This framework integrates two systems [87]: one is the ‘rational’ system with specified goals, constraints or utility functions, and a planner; the other is the socio-emotional system, where moral schema and a representation of the world (i.e. cognitive map) will bias the agent towards certain actions. To integrate the two systems, the authors note that the purely rational piece only sets high-level goals and leaves some freedom of choice; instead of being made uniformly at random, probabilities are biased by what is emotionally preferable [99].

<table><caption>Table 2: Frameworks, references and some key features of popular ABMs</caption><thead><tr><th>Framework</th><th>References</th><th>Reasoning</th><th>Emotions</th><th>Social norms</th><th>Learning</th><th>Communication</th><th>Uncertainty</th></tr></thead><tbody><tr><td>PRS</td><td>[54,7,104,9,69]</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td></tr><tr><td>BDI</td><td>[54,7,104,9,69,19]</td><td>✓</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td></tr><tr><td>eBDI</td><td>[7,104,9,69]</td><td>✓</td><td>✓</td><td>×</td><td>×</td><td>×</td><td>×</td></tr><tr><td>BOID</td><td>[7,104,69]</td><td>✓</td><td>×</td><td>✓</td><td>×</td><td>×</td><td>×</td></tr><tr><td>BRIDGE</td><td>[7,69]</td><td>✓</td><td>≈</td><td>≈</td><td>×</td><td>×</td><td>×</td></tr><tr><td>EMIL-A</td><td>[7,104,69]</td><td>✓</td><td>×</td><td>✓</td><td>✓</td><td>×</td><td>≈ (considered)</td></tr><tr><td>Consumat</td><td>[7,69]</td><td>✓</td><td>≈ (values and money)</td><td>×</td><td>✓</td><td>×</td><td>✓</td></tr><tr><td>CLARION</td><td>[7,104]</td><td>✓</td><td>×</td><td>×</td><td>✓</td><td>×</td><td>×</td></tr></tbody></table>

'X' means that the feature is **not accounted** in the framework, '$\approx$' means that the feature is **partially accounted**, and '✓' means that the feature is **part** of the framework.
## 2.2 Data-Driven Agents and Data-Driven ABMs

The extracted rule-sets and information from psychological theories that agents utilize and collect to update their internal model during simulation serve a crucial role in producing *data-driven* or *adaptive agents*. In addition, the data used to compose the entire ABM defines whether an ABM is data-driven or not. Data-driven ABMs are a relatively new advancement (i.e., the first theoretical methodology was detailed in 2007 [53]) and are not consistently defined in Modeling & Simulation (i.e., researchers have differing concepts of what comprises a data-driven agent or ABM). For instance, a variety of works define a data-driven agent as an agent that is constructed and initialized from a plethora of data [85,46]. Moreover, a data-driven ABM has the initial environment constructed at the very start from the available big data (Figure 1-a). These approaches appear to be more static, as the agents and their environment derive rules and attributes during initialization from a variety of analytic methods and/or *Machine Learning* (ML). In contrast, other works view data-driven agents more dynamically (Figure 1-b), as entities continually learn from their observations of their surroundings (e.g., other agents, the environment) with the use of Machine Learning [50] (Table 3). Our paper is rooted in this dynamic view.

<figure><img src="image_3.png" /><figcaption>Fig. 1: Difference between initializing a model from *Machine Learning* (a; static) and having agents adapt through a simulation by ML (b; dynamic)</figcaption></figure>

In a dynamic process, the agents start by making observations through their *initial* ruleset. The observations are used as training data for the ML model, which aids in updating the decisions of each *adaptive* agent [1,105]. Consequently, the initial ruleset can shift as it is updated by ML at each step [1,105], which allows each agent to gradually differentiate its behavior based on its local physical and social environment. Note that ‘adapting’ is used loosely since it can lead an agent to make a decision from which it does not fully benefit (i.e., a ‘wrong’ decision). For example, obesity is occasionally presented as ‘maladaptation to’
<table><caption>Table 3: Different data-driven agents found in the literature</caption><thead><tr><td>Data-driven approach</td><td>Example studies</td></tr></thead><tbody><tr><td>Agents with Big-Data</td><td>Created a new agent-based modeling approach that incorporates big data at the individual-level to generate agent behavior rules and initialize agent attributes [50].</td></tr><tr><td>Agents with Reinforcement Learning</td><td>Agents are implemented with no knowledge and learn iteratively while observing their surroundings while using reinforcement learning [3].</td></tr><tr><td>Agents with Policy Trees</td><td>Agents are integrated with interactive dynamic influence diagrams to construct decision making processes with clustering methods and policy trees [77].</td></tr></tbody></table>

a modern world', but agents can become obese (and may make a simulation more realistic) if they adapt to an obesogenic environment where peers have unhealthy habits (Figure 2); they are socially adapted, at the detriment of their own health. The integration of ML and evidence based rule-sets in ABMs has demonstrated higher performance compared to ABMs that exclusively use expert-driven rulesets, or only derive rules from data [47]. However, this integrated approach is an emerging area of research, so its benefits and drawbacks continue to be assessed [41].

<figure><img src="image_4.png" /><figcaption>Fig. 2: A data-driven agent observes its surroundings and, between two equally likely discriminating factors, makes an error in the choice of feature. This example is only illustrative; in reality, experts consider that “you can’t outrun your fork” since one’s weight is primarily determined by diet rather than exercise[30], which primarily helps with physical well-being (e.g., cardiovascular system).</figcaption></figure>
# 3 Framework

## 3.1 Errors represented

Our framework was developed by integrating four particular human errors. These errors are motivated by the growing evidence that humans use social information sub-optimally despite the vast expected benefits, such as obtaining an accurate representation of the world without incurring costly individual explorations [72] or reusing solutions that have been honed by peers. We account for over-generalization, which happens when a person forms a conclusion from insufficient observations. To operationalize over-generalization, we represent the observations made by an agent in the form of a table where each observation is a row and its characteristics (or features) are tracked by columns; for example, in **Figure 2**, the table would have at most three rows (since three peers are observed) and two columns (what they eat, whether they exercise). One error happens when an agent has an *insufficient samples*, that is, too few rows. In **Figure 2**, the agent may only be observing the two neighbors above, who only eat pizza, and hence never learn about the virtues of exercising. Another error happens when an agent makes *superficial observations* and transpires when a human has access to enough samples, but pointedly determines a position from only a portion of the characteristics. In **Figure 2**, the agent may look at all three neighbors, but only pay attention to what they eat (i.e., account for only one of two features). In short, the data received by the agent is either limited in number of rows (insufficient samples) or in number of columns (superficial observations). The third error is *inaccurate perception*, which happens when an agent does not perfectly make an observation. From a tabular viewpoint, the error is applied on a cell. For instance, an agent may observe what others eat, but would not be able to perfectly determine the amount of calories. This covers distortions due to measurement errors and uncertainty in human perceptions. We stress that this error is about observations, rather than attitudes or expectations (e.g., an agent incorrectly evaluating flooding risks or acceptable insurance premiums [58]).

Finally, humans cannot necessarily form accurate models even when they are provided with complete and flawless observations. We represent this as *limited ability* to capture that the capacity of the agent cannot match the complexity of its observations, hence a simplification occurs. Consider the following example: an agent walks into a restaurant with friends and must order at the counter from dozens of potential items, while other customers are waiting in line behind. The agent does not have the mental capacity to quickly review all options and pick the optimal one, hence the agent may just have the same as its peers or opt for the 'special of the day'. In fact, obesity research has repeatedly emphasized that "to promote healthier eating, the healthiest option could be set as the default option" since individuals are overwhelmed with choices and simplify significantly [65,103].

The presence of errors do not necessarily mean that the decisions will be worst for the agents. For example, forced simplifications due to limited ability mean that an agent will generate a model that does not follow the data too
closely; the model is thus less likely to over-fit, hence it may be more generalizable and the agent can reuse it in a variety of settings. Further note that despite our presentation of the four errors as separate, they can happen jointly in a given model; illustrative examples are provided in the next section. Accumulating several errors does not necessarily imply poorer decisions. For instance, if measurements are noisy, then a limited ability can be an asset by avoiding an overfit to noise [34]. Conversely, if there are insufficient samples and, in addition, superficial observations, then the errors may have a cumulative negative effect.

## 3.2 Operationalization via Machine Learning

The foundation of our framework builds upon data-driven agents which are incorporated in every case study. We implement data-driven agents that dynamically update their rule-sets and change their actions after observing the attributes and actions of agents in their environment and sending these observations to a variety of ML models. All agents start by collecting data in a perfect manner (i.e., no missing rows or columns, no errors in the cells). For the first three errors given in section 3.1, the data table is altered as follows. First, *insufficient samples* consist of taking a random percentage of the observed data (e.g., 5%, 15%) and discarding the rest, as in previous studies [68]. Although *superficial observations* could be operationalized through a random subset, the literature does not usually eliminate features randomly. Indeed, a subset of features is identified either based on perceived value [96] (e.g., via feature selection algorithms) or from model-specific questions (e.g., 'how would population weight change if individuals tried to match their peers' weight based on nutrition only'). Our framework thus allows the user to select specific features to disregard when agents observe their peers. *Inaccurate perceptions* are operationalized by applying noise to the data. We use a Gaussian distribution (i.e., 'white noise'), in line with previous works [49,64]. By setting the parameters of the distribution, users can include common phenomena such as systematically overestimating calories [42] or systematically underestimating the weight status of overweight and obese peers [76]. For flexibility, we allow users to select the features onto which noise will be applied [49,64]. This reflects that humans do not make the same amount of mistakes depending on what they attempt to quantify; for example, weight may be vastly underestimated but height could be accurate.

Once the three errors have been applied to the data, the table can be processed by a machine learning algorithm. The choice and parameters of the algorithm reflect the *limited ability* of the agents. For example, a decision tree with an insufficient depth would coerce agents into making simplifications. Simplifications could also be caused by certain parameter values in a penalized regression, or by having too few (or small) layers in a neural network. Our framework thus allows the user to pass an ML model of their choice and to set limits on its parameters (e.g., depth of the tree, number of layers).
## 3.3 Implementation

A *core network* is used to position the agents. Each *node* of the core network can contain a set of agents, which can be empty when no agent occupies this position. An *edge* in the core network signifies that an agent can either reach the other node (if a model requires mobility) and/or observe the behaviors of agents residing in the other node. The core network is a flexible representation as it can be used to capture two common scenarios:

(a) A *physical network* (**Figure 3-a**). Each node serves as a location, which is occupied by agents. A modeler can restrict the edges to only support mobility, thus limiting an agent to observe its peers who are in the same physical location.

(b) A *social network* (**Figure 3-b**). By creating a one-to-one mapping between nodes and agents, each node comes to represent an agent, while edges capture social tie. In this application, social ties may specify observable peers rather than mobility.

Although none of the case studies in the next section need it, a *secondary network* is also supported by our framework. This enables applications that require both a network for mobility (where individuals see each other if they share a physical location) and a social network (where individuals can be in contact regardless of physical locations).

<figure><img src="image_5.png" /><figcaption>Fig. 3: In the core network, each node can contain a (possibly empty) set of agents. When any number of agents can be in a node, it can be used to represent a physical environment (a). In (a), the central location (dashed/red) contains three agents, who can see each other. The top-right location (green agent) has a single agent, who is able to directly move into three locations. When each node contains exactly one agent, it serves as a social network (b).</figcaption></figure>

Our framework is built in **Python 3.10**. This choice is driven by the growth of ABM packages built on the **Python** programming language [51,29,17,48], thus indicating familiarity with this language from our intended user base. Similarly to the Python **Mesa** package, our framework “seamlessly integrates with popular
data science tools such as Jupyter notebooks and Pandas for ease of analysis of data" and we also use NumPy arrays to accelerate computations [51]. Specifically, at each simulation tick, an agent adds the new observation of its peers to a growing record in the form of a NumPy array. After synchronous observations have taken place, each agent independently runs a machine learning model on its array, via scikit-learn. Actions are then decided accordingly and the new states of the agents are computed. These states may be stored in a Pandas dataframe (e.g., to accumulate the number of agents who are happy/unhappy at each step) to visualize simulation results at the end. Users are expected to provide custom code to encapsulate the logic of their model, in line with recent frameworks [8]. The list of libraries (i.e., dependencies) used in our framework is provided in (Table 4).

<table><caption>Table 4: Modules used for the simulation</caption><thead><tr><td>Module</td><td>Version used</td><td>Use</td></tr></thead><tbody><tr><td>Jupyter Notebook</td><td>6.4.8</td><td>Writing a specific ABM</td></tr><tr><td>NetworkX</td><td>2.7.1</td><td>Modeling of physical and social networks</td></tr><tr><td> numpy</td><td>1.21.5</td><td>Data manipulation</td></tr><tr><td> pandas</td><td>1.4.2</td><td>Store the overall state of an environment</td></tr><tr><td> scikit-learn</td><td>1.0.2</td><td>Machine learning</td></tr><tr><td> seaborn</td><td>0.11.2</td><td>Results graphing</td></tr><tr><td> matplotlib</td><td>3.5.1</td><td>Results graphing</td></tr><tr><td> plotly</td><td>5.6.0</td><td>Results graphing</td></tr></tbody></table>

# 4 Case Studies

We use three models to exemplify (i) which errors are applicable to a given simulation model and (ii) how they work within our framework. The models cover Schelling's model of segregation [40], the Axelrod model of culture [6], and a Covid case. In the same way as Chattoe-Brown, we used classic models because they are "widely known in the ABM community and simple enough to demonstrate relevant issues clearly without 'bogging down' in potentially divisive modeling detail" [14]; the Covid model is more complex but captures an application area that has recently brought ABMs to attention in a wider scientific community. Each model is provided on our repository as a dedicated Jupyter Notebook.

## 4.1 Schelling Model of Segregation

The *purpose* of the well-known Schelling model is to illustrate how agents in society can become highly segregated based on a seemingly mild preference towards being surrounded by similar neighbors. As the model has been covered
<figure><img src="image_6.png" /><figcaption>Fig. 4: Visualization of a Schelling simulation from our Jupyter Notebook.</figcaption></figure>

abundantly elsewhere [88,40,31], our succinct description allows us to focus on
the nature and inclusion of errors. In short, the core logic is that each agent
belongs to one of two groups (abstracted as colors such as blue and red) and
wants the fraction of at least τ nearby peers to be in the same group. The use of
colors helps to visualize the emergence of segregation patterns. We implement
it by structuring the environment as a 25 × 25 grid, where each node represents
an agent location at each time step. The nodes are empty (black; 12% of nodes)
or occupied with an agent (blue or red). At initialization, agents are assigned
one of the two colors equally at random (i.e., 88% of the grid is occupied by
agents who are 50% blue and 50% red) and then given an initial location on the
grid (Figure 4-a). This visualization allows users to ensure the total population
is segregating over time.

During an *update*, agents synchronously observe their neighbors. We use Moore's definition of a neighborhood, whereby each agent is surrounded by eight neighbors; the network topology is thus created as in **Figure 3-a**, where the central node (red/dashed) is connected to eight neighbors. Since we use closed boundaries, nodes on the edges and corners have fewer neighbors. For each agent, the observation consists of counting the share of its neighbors that have the same color. If that fraction is above a user-defined threshold (known as 'Preferred Proportion' and set to ⅓ in our example), then the agent is seen as happy and stays in its current location. Conversely, unhappy agents will move to an empty location at the next round; we handle their relocation by creating a queue of agents who seek to move and matching them with a shuffled queue of available locations. At each step, we record the amount of happy agents. The simulation stops when this number stabilizes and agents no longer relocate (**Figure 4-b**) or 100 steps are reached, whichever comes first.
Each agent uses a decision tree classifier, where the only feature is the num-
ber of neighbors with the same color, and the prediction is a binary outcome
of (un)happiness. Since there is a single feature, this model is not eligible to a
perceptual error of superficial observations. We thus focus our example on the
impact of insufficient observations, limited ability, and the combination of in-
sufficient observations and limited abilities on model trajectory. For insufficient
observations, each agents' decision tree was given access to a random percent-
age of data observed during the simulation (set to 5%, 10%, 20%, 40%, 60%,
80%, 100%). To represent the baseline (i.e., simulation outcomes without errors),
100% percent of the data was utilized to update the agents' internal models. For
limited ability, every agent's decision tree was constrained by a maximum depth
(set to 1, 2, 3, 4). Note that in this application scenario, an agent does not need
to surpass a depth of 2, so we expect depths of 3 and 4 to have no impact;
visualizations should reveal this effect. Finally, we combined both insufficient
and limited ability by limiting the decision tree depth in each simulated run at
specific percentages of observation. (e.g., 5% with depths 1, 2, 3, 4). Note that
since each agent runs its own ML model, the decision process is no longer the
same for everyone, so the inclusion of errors contributes to addressing the issue
of heterogeneity discussed in previous works [14].

4.2 Axelrod model of culture

The *purpose* of the Axelrod model is to reflect the dissemination of culture in a population; the model can also be interpreted as spreading opinions. Each node of the network represents a village, characterized by an array of cultural features, each of which has several possible values (known as ‘traits’). These cultural features can abstract a variety of properties (e.g., index 0 can be language, index 1 stand for religion) and their numerical values represent various states of each property (e.g., language could be comprised of English, French, Chinese). Nearby villages (i.e., adjacent nodes) interact with a rate proportional to the number of shared feature values, and they become more similar as a result. Said otherwise, *homophily* governs the selection of dyadic interactions, and one agent adopts a trait value from the other agent as a result of *social influence*. In the *initialization*, we create a 2D grid (set to 8 × 8 in this example) and equip each node with 5 feature categories, each with 10 possible values.

During an *update*, an agent is selected at random and we measure the ratio of cultural features shared with each neighbor. To measure this ratio, each feature value must match exactly: for example, if an agent has the array [3, 5, 6, 7, 0] and a neighbor has [1, 3, 6, 7, 1] then they share two features out of five, hence a ratio of $\frac{2}{5}$. A neighbor is then selected with a probability weighted based on the ratio of shared features. The agent randomly picks from one of the features with a mismatch and aligns its value with the neighbor; in the example, the first feature would be replaced from its value of 3 (mismatch) into 1 (Figure 5). In a similar vein to the Schelling model, the Axelrod model runs until cultural regions are established, or for at most 100 steps.
<figure><img src="image_7.png" /><figcaption>Fig. 5: Given a randomly picked agent (long dashes / red), a neighbor is selected (short dashes / green) with a probability proportional to the ratio of shared features. One feature with a different value is selected at a random and the difference is solved.</figcaption></figure>

Because of the numerical distance between features, each agent learns by performing a logistic regression with stochastic gradient descent. Each observation consists of the agent-neighbor pair, the time step, the absolute differences between features of the pair (e.g., in the example above we would have [2, 2, 0, 0, 1]), the ratio of shared features (60% in this example), and whether the neighbor was selected. Note that neither the pair nor the time step would be used in decision-making; they are only included in order to guarantee that observations are unique. The ML model learns whether to select a neighbor based on the absolute differences between features and the ratio. For instance, when agents have five characteristics, the ML model is given 5 + 1 = 6 features. Since ML needs some observations to start learning, we run the first step of the simulation based on the standard Axelrod rules and then start applying the ML process.

This application allowed us to test all four errors: insufficient and superficial observations, inaccurate perception, and limited ability. Insufficient observations were produced by only allowing the machine learning model to have access to a random sample of data, in the same way as the Schelling model. For superficial observations, agents could drop 1, 2, 3, or 4 of the features at random when computing the cultural similarity. Inaccurate perception consisted of adding a Gaussian noise (5%, 10%, 20%, 40%, 80%, 100%) to the perceived values of some features in a neighbor; values were then rounded up, since they had to be integers. Limited ability was generated in the same manner as the Schelling Model where we limited the depth of the decision tree. Errors were combined by pairing each random sample of observations to a specific amount of dropped features, added percentage of noise, and various depths.

## 4.3 COVID case study

Agent-based modeling emerged as one of the main computational techniques to study the COVID-19 pandemic [35], which has resulted in an abundance of new ABMs [66]. As a result, core concepts of ABM have now reached new research
<figure><img src="image_8.png" /><figcaption>Fig. 6: Each agent moves in its Moore neighborhood (a) into an empty cell that offers a safe distance (b) to visibly ill peers. Agents have different masks, immune status, and symptoms (c). The process accounts for disease avoidance, direct and indirect transmissions, and ventilation (d).</figcaption></figure>

communities [33], who may not have been familiarized with the Schelling or Axelrod models through traditional training. We address this audience by exemplifying errors in a COVID model whose *purpose* is to track the spread of infections in a room. In a similar manner to previous COVID-19 ABMs dedicated to indoor transmission, the space is modeled as a large square (without walls) [20]. Agents can contaminate each other through direct contact or indirectly via aerosols, which are affected by ventilation systems [28]. Spatially explicit mechanisms for disease avoidance steer agents away from peers with symptoms [102], while individual attributes such as wearing certain types of masks or having acquired immunity mediate the level of aerosols expelled and the risk of infection [63].

In the initialization, 250 agents are randomly assigned positions in a 50 × 50 closed grid (Figure 6-a) with Moore neighborhood (Figure 3-a), as used in the Schelling model. The agents initially wear masks of different types (cloth, surgical, N95), have acquired immunity either by recovering from infection or from vaccines, and infected agents may present symptoms or not (Figure 6-c); initial percentages are listed in Table 5. During an *update*, each agent scans moves in a nearby empty location that puts a safe distance with any visibly ill agent. Specifically, available cells are sorted by their Euclidean distance (Figure 6-b) to the nearest symptomatic agent in the neighborhood. Note that it allows an agent to move (unknowingly) next to a person who is infected but asymptomatic, or into a location with a high density of aerosols. The process continues (Figure 6-d) with direct transmission of infection, then indirect transmission as infected agents cough (thus dispersing droplets in nearby cells depending on their masks)
and susceptible agents have a risk proportional to the density of aerosols; in both cases, transmission risk is impacted immune status and mask wearing. Finally, the full outdoor air supply rates provided by optimal ventilation systems remove aerosols containing viral particles. Each simulation tick represents one minute, and the simulation stops after two hours.

The decision tree of each agent governs its steering behavior. That is, each agent decides whether to move into a particular cell based on the perceived distance to an infectious agent. In order to store unique observations in the agent's array, we also record the agent's ID and the simulation step, but this information is not used for decision making. Three errors can be present: insufficient samples, inaccurate perceptions, and limited ability; they are handled in the same manner as in the previous two models. In the same way as the Axelrod model, the model runs initially runs with the baseline ruleset (for five steps) so that agents have made observations, then they start differentiating via ML.

<table><caption>Table 5: Variables used in the COVID-19 model</caption><thead><tr><td>Description of the variable</td><td>Default value</td><td>Source</td></tr></thead><tbody><tr><td>Size of the grid</td><td>2500</td><td>User-defined</td></tr><tr><td>N (Number of agents)</td><td>250</td><td>User-defined</td></tr><tr><td>Fraction of initial agents with immunity</td><td>0.62</td><td>[70]</td></tr><tr><td>Vaccine compliance (fully vaccinated)</td><td>0.67</td><td>[13]</td></tr><tr><td>Fraction of initial agents with infection</td><td>0.5</td><td>User-defined</td></tr><tr><td>Strength of ventilation in the closed area</td><td>0.8</td><td>[83]</td></tr><tr><td>Chance of infecting of other agents</td><td>0.04</td><td>[39]</td></tr><tr><td>Chance of coughing</td><td>0.05</td><td>User-defined</td></tr><tr><td>Infection chance for immune agents</td><td>0.3</td><td>[16]</td></tr><tr><td>Chance of being asymptomatic</td><td>0.6</td><td>[43]</td></tr><tr><td>Reduction factor for cloth mask</td><td>0.2</td><td>[57]</td></tr><tr><td>Reduction factor for surgical mask</td><td>0.1</td><td>[5]</td></tr><tr><td>Reduction factor for N95 mask</td><td>0.09</td><td>[5]</td></tr><tr><td>Distribution of cloth masks</td><td>0.2</td><td>User-defined</td></tr><tr><td>Distribution of surgical masks</td><td>0.4</td><td>User-defined</td></tr><tr><td>Distribution of N95 masks</td><td>0.4</td><td>User-defined</td></tr><tr><td>Number of prerun steps</td><td>5</td><td>User-defined</td></tr></tbody></table>

# 5 Results

By definition of the *Schelling model*, when agents only look at *some* of their neighbors, the condition of 'moving only if neighbors are too dissimilar' is no longer applied exactly. This is akin to introducing uncertainty in the decision to move, as has been studied by Sahasranaman and Jensen, who found that it affects dynamics by making it harder to produce segregated clusters [84]. **Figure 7**
confirms this effect, as the amount of time to stabilize is inversely proportional to the percentage of samples. To understand the effect of limited abilities, we measured the depth of the decision tree in the baseline simulation, where it was 0.95 ± 0.25 over 50 simulation runs. Hence we expected a difference between limiting the depth of the tree to 1 and 2, but no effect beyond this. The heatmap in **Figure 8** shows the joint consequence of limited abilities and insufficient samples: there is mostly a gradient along the x-axis (percentage of samples) and very little effect along the y-axis (limited abilities), which confirms that outcomes are primarily affected by insufficient samples rather than by limited abilities.

<figure><img src="image_9.png" /><figcaption>Fig. 7: baseline (a); observations using all (100%) or part (5, 10, 20%) of the data (b); observations using all or part (40, 80, 100%) of the data (c); and limited abilities as constrained by the depth of the decision tree (d).</figcaption></figure>

In the *Axelrod model*, the concept of noise has often been studied but it was operationalized in diverse ways. Several studies of the Axelrod model [22,56]
<figure><img src="image_10.png" /><figcaption>Fig. 8: Heatmap of the average number of steps for 10 runs on different percentages of data available (insufficient samples) and different depths of tree (limited ability) for the Schelling model.</figcaption></figure>

and related opinion spread models [18] consider noise as the probability that an agent spontaneously changes its own values (known as ‘cultural drift’), which is different from the notion of noise in observing a neighbor’s values. When models include noise in the interactions (e.g., destroying and recreating links, hesitating), they often find that a homogeneous state is reached after a much longer time than in the initial Axelrod model [100,36], and it may even become impossible to stabilize [78]. Our results on insufficient samples confirm these previous findings, as the number of changes before stabilization is inversely proportional to the sampling rate (Figure 9c–d). The model is visibly robust to small inaccuracies in measurement (Figure 9e), but deviations are observed from an error of 40% and onward (Figure 9f). Superficial observations have a noticeable impact (Figure 9b).

The impact of errors on a *COVID model* is more mixed in the nascent literature. For example, meta-modeling studies have shown that in *some* cases, a small sample of observations from an entire simulation sufficed to characterize it, but in other cases a much higher sampling rate was necessary [68]. While other studies have examined errors in several models, they were concerned with *software* errors (i.e., bugs), which are not our focus [81]. Given the lack of referential, our observations are based solely on results in **Figure 10**. Of all three models, the COVID case is the only one where trends are preserved regardless of the nature or intensity of the errors. This suggests that, despite its relative sophistication in several aspects (e.g., various masks, direct and indirect transmissions), the decision-making component for each agent is ultimately so rudimentary that it is hardly swayed by errors. Results may be different if the mobility of agents was more extensively data-driven [79].
# 6 Discussion

As people, we only pay attention to some of our surroundings and make mistakes when we record this information [12,75]. These errors are profoundly human traits, hence cognitive social simulations may be more adequate when they account for such perceptual errors. However, ABMs do not systematically account for these errors [27]. In this paper, we used Machine Learning as a conduit to systematically represent four types of errors for social learning in ABMs (i.e., how agents learn from information acquired via social ties): insufficient number of observations, superficial observations that ignore certain features, mistakes in recording the observations, and a limited ability to process complex information from the world. The errors were exemplified on three ABMs, thus showing which errors are applicable to a given model and which consequences we may expect. Although our focus is on the perceptual errors of individual agents, we have repeatedly emphasized that such individual errors do not necessarily lead to erroneous simulation results for the population. Indeed, at the level of the collective, perceptual errors may lead to more diversity in decision-making, ultimately contributing to a population that is more adaptable; this hypothesis has been confirmed on several occasions, such as in biological and socio-ecological systems [38].

From a computational standpoint, users of our open source framework would need to write all model-specific code in Python. While this language is now well-understood in the ABM community as evidenced by a growing set of libraries, there are software solutions to avoid being language-specific. For instance, Bhat-tacharya and colleagues used Apache Arrow so that users could write the decision making module in any language and link it with the framework [8]. Most interestingly for simulationists, extensions of the framework may be used to pinpoint where an agent made errors, if modelers wish to investigate why some agents erred. For example, we could record when an agent took the 'wrong branch' in a decision tree, enabling the model to later flag where the error occurred.

The variety of errors that could be represented in human perceptions is almost boundless, hence our framework does not claim to be all-encompassing. For instance, real-world individuals may not be relocating as frequently as agents in the Schelling model, and cognition may be affected by other attributes such as age. Future work can reuse and extend our framework based to account for specific cognitive theories, for example in the representation of emotions. When it comes to the transmission of information, two broad mechanisms are involved and can be detailed: *cognitive biases* and *status asymmetries* [91]. Indeed, one of the reasons for which we do not pay attention to all peers or all of their attributes is because social learning is *selective*. As explained through the notion of 'selective filters' and the handling of conflicts (e.g., via balance theory), this selection depends in part on what an individual deems compatible with existing knowledge [45]. The inclusion of cognitive biases in our framework would require extending how the cognition of an agent is represented. Status asymmetries explains why individuals do not pay equal attention to all of their peers; that is, the likelihood that some peers make an impact is not uniform, unlike in the current
framework. Social ties are different in nature and frequency, as some peers may
be close friends who are often seen, some may be acquaintances with whom we
seldom interact, and we may even include celebrities whose interactions may be
rare and distant yet impact decision-making [71]. However, accurately capturing
the structure and function of social ties is a research domain in itself, which goes
beyond our framework.

7 Conclusion

To enhance the realism of a cognitive social simulation, modelers may account for imperfections in individual decision-making processes. Our framework combines four types of errors and allows to analyze the change in model trajectory once ‘perfect’ agents become more error-prone, like their real-world counterparts. By illustrating the practicality of data-driven ABMs and the importance of including human errors in practice, our study seeks to motivate researchers to further the development of more realistic models and expand upon the framework we created.

8 Acknowledgements

This manuscript benefited from discussion on perceptual errors in ABMs with
Drs Piper Jackson (Thompson Rivers University, Canada), Ashkan Nagahban
(The Pennsylvania State, USA), Andrew Crooks (University at Buffalo, USA),
Nicolas Verstaevel (University of Toulouse, France), William Kennedy and Hamdi
Kavak (George Mason University, USA).

References

1. Abdulkareem, S.A., Mustafa, Y.T., Augustijn, E.W., Filatova, T.: Bayesian networks for spatial learning: a workflow on using limited survey data for intelligent learning in spatial agent-based models. *GeoInformatica* **23**(2), 243–268 (Apr 2019). https://doi.org/10.1007/s10707-019-00347-0

2. Aldinhas Ferreira, M.I.: Cognitive Architectures: The Dialectics of Agent/Environment, p. 1–12. Springer International Publishing (Sep 2018). https://doi.org/10.1007/978-3-319-97550-4_1

3. Amini, A., Gilitschenski, I., Phillips, J., Moseyko, J., Banerjee, R., Karaman, S., Rus, D.: Learning robust control policies for end-to-end autonomous driving from data-driven simulation. *IEEE Robotics and Automation Letters* **5**(2), 1143–1150 (Apr 2020). https://doi.org/10.1109/lra.2020.2966414

4. Anderson, J.R., Lebiere, C.J.: The Atomic Components of Thought. Psychology Press (Jan 2014). https://doi.org/10.4324/9781315805696

5. Asadi, S., Cappa, C.D., Barreda, S., Wexler, A.S., Bouvier, N.M., Ristenpart, W.D.: Efficacy of masks and face coverings in controlling outward aerosol particle emission from expiratory activities. *Scientific Reports* **10**(1) (Sep 2020). https://doi.org/10.1038/s41598-020-72798-7
6. Axelrod, R.: The dissemination of culture: A model with local convergence and global polarization. Journal of Conflict Resolution **41**(2), 203–226 (Apr 1997).
https://doi.org/10.1177/0022002797041002001

7. Balke, T., Gilbert, N.: How do agents make decisions? a survey. Journal of Artificial Societies and Social Simulation **17**(4) (2014).
https://doi.org/10.18564/jasss.2687

8. Bhattacharya, P., de Mooij, A.J., Dell'Anna, D., Dastani, M., Logan, B., Swarup, S.: PanSim + Sim-2APL: A Framework for Large-Scale Distributed Simulation with Complex Agents, pp. 1–21. Springer International Publishing (2022).
https://doi.org/10.1007/978-3-030-97457-2_1

9. Bourgais, M., Taillandier, P., Vercouter, L.: Enhancing the Behavior of Agents in Social Simulations with Emotions and Social Relations, p. 89–104. Springer International Publishing (2018). https://doi.org/10.1007/978-3-319-91587-6_7

10. Bourgais, M., Taillandier, P., Vercouter, L.: BEN: An Agent Architecture for Explainable and Expressive Behavior in Social Simulation, pp. 147–163. Springer International Publishing (2019). https://doi.org/10.1007/978-3-030-30391-4_9

11. Bourgais, M., Taillandier, P., Vercouter, L.: Ben: An architecture for the behavior of social agents. Journal of Artificial Societies and Social Simulation **23**(4) (2020).
https://doi.org/10.18564/jasss.4437

12. Burden, D., Savin-Baden, M.: Virtual Humans: Today and Tomorrow. Chapman and Hall/CRC (Jan 2019). https://doi.org/10.1201/9781315151199

13. C.D.C.: Cdc covid data tracker: Vaccinations in the us.
https://covid.cdc.gov/covid-data-tracker/#vaccinations_vacc-total-admin-rate-total (2022), accessed: 2022-08-07

14. Chattoe-Brown, E.: Un Drôle De Type: The Schelling Model, Calibration, Specification, Validation and Using Relevant Data, p. 243–255. Springer International Publishing (2021). https://doi.org/10.1007/978-3-030-61503-1_23

15. Cimellaro, G.P., Mahin, S., Domaneschi, M.: Integrating a human behavior model within an agent-based approach for blasting evacuation. Computer-Aided Civil and Infrastructure Engineering **34**(1), 3–20 (Apr 2018).
https://doi.org/10.1111/mice.12364

16. Collie, S., Champion, J., Moultrie, H., Bekker, L.G., Gray, G.: Effectiveness of bnt162b2 vaccine against omicron variant in south Africa. New England Journal of Medicine **386**(5), 494–496 (Feb 2022). https://doi.org/10.1056/nejmc2119270

17. Collier, N.T., Ozik, J., Tatara, E.R.: Experiences in developing a distributed agent-based modeling toolkit with python. In: 2020 IEEE/ACM 9th Workshop on Python for High-Performance and Scientific Computing (PyHPC). p. 1–12.
IEEE (Nov 2020). https://doi.org/10.1109/pyhpc51966.2020.00006

18. Crokidakis, N.: Role of noise and agents’ convictions on opinion spreading in a three-state voter-like model. Journal of Statistical Mechanics: Theory and Experiment **2013**(07), P07008 (Jul 2013). https://doi.org/10.1088/1742-5468/2013/07/p07008

19. Crooks, A., Heppenstall, A., Malleson, N., Manley, E.: Agent-Based Modeling and the City: A Gallery of Applications, p. 885–910. Springer Singapore (2021).
https://doi.org/10.1007/978-981-15-8983-6_46

20. Cuevas, E.: An agent-based model to evaluate the covid-19 transmission risks in facilities. Computers in Biology and Medicine **121**, 103827 (Jun 2020).
https://doi.org/10.1016/j.compbiomed.2020.103827

21. Dastani, M., Torre, L.V.D.: A Classification of Cognitive Agents, p. 256–261. Routledge (Apr 2019). https://doi.org/10.4324/9781315782379-81
22. De Sanctis, L., Galla, T.: Effects of noise and confidence thresholds in nominal and metric axelrod dynamics of social influence. Physical Review E **79**(4) (Apr 2009). https://doi.org/10.1103/physreve.79.046108

23. Dignum, F., Morley, D., Sonenberg, E., Cavedon, L.: Towards socially sophisticated bdi agents. In: Proceedings Fourth International Conference on MultiAgent Systems. p. 111–118. ICMAS-00, IEEE Comput. Soc (2000). https://doi.org/10.1109/icmas.2000.858442

24. Dignum, V., Dignum, F.: Agents are dead. long live agents! In: Proceedings of the 19th International Conference on Autonomous Agents and MultiAgent Systems. pp. 1701–1705. AAMAS ’20, International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC (2020)

25. Dionne, S.D., Gooty, J., Yammarino, F.J., Sayama, H.: Decision making in crisis: A multilevel model of the interplay between cognitions and emotions. Organizational Psychology Review **8**(2–3), 95–124 (May 2018). https://doi.org/10.1177/2041386618756063

26. Djenontin, I.N.S., Ligmann-Zielinska, A., Zulu, L.C.: Landscape-scale effects of farmers’ restoration decision making and investments in central malawi: an agent-based modeling approach. Journal of Land Use Science **17**(1), 281–306 (Jan 2022). https://doi.org/10.1080/1747423x.2022.2076948

27. Evans, A.: Uncertainty and Error, pp. 309–346. Springer Netherlands (Oct 2011). https://doi.org/10.1007/978-90-481-8927-4_15

28. Farthing, T.S., Lanzas, C.: Assessing the efficacy of interventions to control indoor sars-cov-2 transmission: An agent-based modeling approach. Epidemics **37**, 100524 (Dec 2021). https://doi.org/10.1016/j.epidem.2021.100524

29. Foramitti, J.: Agentpy: A package for agent-based modeling in python. Journal of Open Source Software **6**(62), 3065 (Jun 2021). https://doi.org/10.21105/joss.03065

30. Freedhoff, Y.: The diet fix: Why diets fail and how to make yours work. Random House Canada (2014)

31. Gaudiano, M.E., Revelli, J.A.: On the role of structured initial conditions in the schelling model. Physica A: Statistical Mechanics and its Applications **587**, 126476 (Feb 2022). https://doi.org/10.1016/j.physa.2021.126476

32. Giabbanelli, P.J.: Solving challenges at the interface of simulation and big data using machine learning. In: 2019 Winter Simulation Conference (WSC). p. 572–583. IEEE (Dec 2019). https://doi.org/10.1109/wsc40007.2019.9004755

33. Giabbanelli, P.J., Badham, J., Castellani, B., Kavak, H., Mago, V., Negaahban, A., Swarup, S.: Opportunities and challenges in developing covid-19 simulation models: Lessons from six funded projects. In: 2021 Annual Modeling and Simulation Conference (ANNSIM). p. 1–12. IEEE (Jul 2021). https://doi.org/10.23919/annsim52504.2021.9552089

34. Gigerenzer, G., Gaissmaier, W.: Decision Making: Nonrational Theories, pp. 911–916. Elsevier (2015). https://doi.org/10.1016/b978-0-08-097086-8.26017-0

35. Gnanvi, J.E., Salako, K.V., Kotanmi, G.B., Glèlè Kakaï, R.: On the reliability of predictions on covid-19 dynamics: A systematic and critical review of modelling techniques. Infectious Disease Modelling **6**, 258–272 (2021). https://doi.org/10.1016/j.idm.2020.12.008

36. Gracia-Lázaro, C., Quijandría, F., Hernández, L., Floría, L.M., Moreno, Y.: Co-evolutionary network approach to cultural dynamics controlled by intolerance. Physical Review E **84**(6) (Dec 2011). https://doi.org/10.1103/physreve.84.067101
37. Grantham, E.O., Giabbanelli, P.J.: Creating perceptual uncertainty in agent-based models with social interactions. In: Spring Simulation Conference (SpringSim 2020). pp. 1–12. Society for Modeling and Simulation International (SCS) (May 2020). https://doi.org/10.22360/springsim.2020.hsaa.010

38. Grêt-Regamey, A., Huber, S.H., Huber, R.: Actors’ diversity and the resilience of social-ecological systems to global change. Nature Sustainability 2(4), 290–297 (Mar 2019). https://doi.org/10.1038/s41893-019-0236-z

39. Harvard Healthy Buildings Program: Covid-19 risk calculator - covid-19. https://covid-19.forhealth.org/covid-19-transmission-calculator/ (2022), accessed: 2022-08-07

40. Hatna, E., Benenson, I.: The schelling model of ethnic residential dynamics: Beyond the integrated - segregated dichotomy of patterns. Journal of Artificial Societies and Social Simulation 15(1) (2012). https://doi.org/10.18564/jasss.1873

41. Hauff, M., Lurz, A.: Agent-based models using artificial intelligence: A literature review (2022)

42. Horne, D., Palermo, R., Neumann, M.F., Housley, R., Bell, J.: Can people accurately estimate the calories in food images? an optimised set of low- and high-calorie images from the food-pics database. Appetite 139, 189–196 (Aug 2019). https://doi.org/10.1016/j.appet.2019.04.017

43. IHME: Ihme covid-19 insights blog — institute for health metrics and evaluation. https://www.healthdata.org/news-events/blogs/covid-19-insights-blog (2022), accessed: 2022-08-07

44. Jager, W.: Enhancing the realism of simulation (eros): On implementing and developing psychological theory in social simulation. Journal of Artificial Societies and Social Simulation 20(3) (2017). https://doi.org/10.18564/jasss.3522

45. Jansson, F., Aguilar, E., Acerbi, A., Enquist, M.: Modelling cultural systems and selective filters. Philosophical Transactions of the Royal Society B 376(1828) (May 2021). https://doi.org/10.1098/rstb.2020.0045

46. Jiang, G., Feng, X., Liu, W., Liu, X.: Clicking position and user posting behavior in online review systems: A data-driven agent-based modeling approach. Information Sciences 512, 161–174 (Feb 2020). https://doi.org/10.1016/j.ins.2019.09.053

47. Johora, F.T., Cheng, H., Müller, J.P., Sester, M.: An agent-based model for trajec-tory modelling in shared spaces: A combination of expert-based and deep learning approaches. In: Proceedings of the 19th International Conference on Autonomous Agents and MultiAgent Systems. p. 1878–1880. AAMAS ’20, International Foun-dation for Autonomous Agents and Multiagent Systems, Richland, SC (2020)

48. Kaiser, K.E., Flores, A.N., Vernon, C.R.: Janus: A python package for agent-based modeling of land use and land cover change. Journal of Open Research Software 8(1), 15 (Jun 2020). https://doi.org/10.5334/jors.306

49. Kaur, N., Gonzales, M., Alcaraz, C.G., Barnes, L.E., Wells, K.J., Gong, J.: Theory-guided randomized neural networks for decoding medication-taking behavior. In: 2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI). pp. 1–4. IEEE (Jul 2021). https://doi.org/10.1109/bhi50953.2021.9508614

50. Kavak, H., Padilla, J.J., Lynch, C.J., Diallo, S.Y.: Big data, agents, and machine learning: towards a data-driven agent-based modeling approach. In: Proceedings of the Annual Simulation Symposium. ANSS ’18, Society for Computer Simulation International, San Diego, CA, USA (2018)

51. Kazil, J., Masad, D., Crooks, A.: Utilizing Python for Agent-Based Modeling: The Mesa Framework, p. 308–317. Springer International Publishing (2020). https://doi.org/10.1007/978-3-030-61255-9_30
52. Kendal, R.L., Boogert, N.J., Rendell, L., Laland, K.N., Webster, M., Jones, P.L.: Social learning strategies: Bridge-building between fields. Trends in Cognitive Sciences **22**(7), 651–665 (Jul 2018). https://doi.org/10.1016/j.tics.2018.04.003

53. Kennedy, C., Theodoropoulos, G., Sorge, V., Ferrari, E., Lee, P., Skelcher, C.: AIMSS: An Architecture for Data Driven Simulations in the Social Sciences, p. 1098–1105. Springer Berlin Heidelberg (2007). https://doi.org/10.1007/978-3-540-72584-8_144

54. Kennedy, W.G.: Modelling Human Behaviour in Agent-Based Models, p. 167–179. Springer Netherlands (Oct 2011). https://doi.org/10.1007/978-90-481-8927-4_9

55. Khademi, A., Zhang, D., Giabbanelli, P.J., Timmons, S., Luo, C., Shi, L.: An Agent-Based Model of Healthy Eating with Applications to Hypertension, p. 43–58. Springer International Publishing (2018). https://doi.org/10.1007/978-3-319-77911-9_3

56. Klemm, K., Eguíluz, V.M., Toral, R., Miguel, M.S.: Global culture: A noise-induced transition in finite systems. Physical Review E **67**(4) (Apr 2003). https://doi.org/10.1103/physreve.67.045101

57. Konda, A., Prakash, A., Moss, G.A., Schmortl, M., Grant, G.D., Guha, S.: Aerosol filtration efficiency of common fabrics used in respiratory cloth masks. ACS Nano **14**(5), 6339–6347 (Apr 2020). https://doi.org/10.1021/acsnano.0c03252

58. de Koning, K., Filatova, T., Bin, O.: Capitalization of flood insurance and risk perceptions in housing prices: An empirical agent-based model approach. Southern Economic Journal **85**(4), 1159–1179 (Mar 2019). https://doi.org/10.1002/soej.12328

59. Kotseruba, I., Tsotsos, J.K.: 40 years of cognitive architectures: core cognitive abilities and practical applications. Artificial Intelligence Review **53**(1), 17–94 (Jul 2018). https://doi.org/10.1007/s10462-018-9646-y

60. Kremmydas, D., Athanasiadis, I.N., Rozakis, S.: A review of agent based modeling for agricultural policy evaluation. Agricultural Systems **164**, 95–106 (Jul 2018). https://doi.org/10.1016/j.agsy.2018.03.010

61. Laird, J.E., Newell, A., Rosenbloom, P.S.: Soar: An architecture for general intelligence. Artificial Intelligence **33**(1), 1–64 (Sep 1987). https://doi.org/10.1016/0004-3702(87)90050-6

62. Lee, S., Jain, S., Ginsbach, K., Son, Y.J.: Dynamic-data-driven agent-based modeling for the prediction of evacuation behavior during hurricanes. Simulation Modelling Practice and Theory **106**, 102193 (Jan 2021). https://doi.org/10.1016/j.simpat.2020.102193

63. Li, J., Giabbanelli, P.: Returning to a normal life via covid-19 vaccines in the united states: A large-scale agent-based simulation study. JMIR Medical Informatics **9**(4), e27419 (Apr 2021). https://doi.org/10.2196/27419

64. Liang, Y., Guo, C., Ding, Z., Hua, H.: Agent-based modeling in electricity market using deep deterministic policy gradient algorithm. IEEE Transactions on Power Systems **35**(6), 4180–4192 (Nov 2020). https://doi.org/10.1109/tpwrs.2020.2999536

65. Liu, P.J., Wisdom, J., Roberto, C.A., Liu, L.J., Ubel, P.A.: Using behavioral economics to design more effective food policies to address obesity. Applied Economic Perspectives and Policy **36**(1), 6–24 (Oct 2013). https://doi.org/10.1093/aeppt/ppt027

66. Lorig, F., Johansson, E., Davidsson, P.: Agent-based social simulation of the covid-19 pandemic: A systematic review. Journal of Artificial Societies and Social Simulation **24**(3) (2021). https://doi.org/10.18564/jasss.4601
67. Luo, J., Dastani, M.: Modeling affective reaction in multi-agent systems. In: Proceedings of the 21st International Conference on Autonomous Agents and Multiagent Systems. p. 1681–1683. AAMAS ’22, International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC (2022)

68. Lutz, C.B., Giabbanelli, P.J.: When do we need massive computations to perform detailed covid-19 simulations? Advanced Theory and Simulations 5(2) (Nov 2021). https://doi.org/10.1002/adts.202100343

69. Mercuur, R., Dignum, V., Jonker, C.M.: Integrating social practice theory in agent-based models: A review of theories and agents. IEEE Transactions on Computational Social Systems 7(5), 1131–1145 (Oct 2020). https://doi.org/10.1109/tcss.2020.3007930

70. Moghadas, S.M., Sah, P., Shoukat, A., Meyers, L.A., Galvani, A.P.: Population immunity against covid-19 in the united states. Annals of Internal Medicine 174(11), 1586–1591 (Nov 2021). https://doi.org/10.7326/m21-2721

71. Moraes, M., Gountas, J., Gountas, S., Sharma, P.: Celebrity influences on consumer decision making: new insights and research directions. Journal of Marketing Management 35(13–14), 1159–1192 (Jul 2019). https://doi.org/10.1080/0267257x.2019.1632373

72. Morin, O., Jacquet, P.O., Vaesen, K., Acerbi, A.: Social information use and social information waste. Philosophical Transactions of the Royal Society B 376(1828) (May 2021). https://doi.org/10.1098/rstb.2020.0052

73. Negahban, A.: Neural networks and agent-based diffusion models. In: 2017 Winter Simulation Conference (WSC). p. 1407–1418. IEEE (Dec 2017). https://doi.org/10.1109/wsc.2017.8247884

74. Negahban, A., Giabbanelli, P.J.: Hybrid agent-based simulation of adoption behavior and social interactions: Alternatives, opportunities, and pitfalls. IEEE Transactions on Computational Social Systems 9(3), 770–780 (Jun 2022). https://doi.org/10.1109/tcss.2021.3101794

75. Nyblade, B., O'Mahony, A., Sieck, K.: Building on social science: Theoretic foundations for modelers (Mar 2019). https://doi.org/10.1002/9781119485001.ch4

76. Oldham, M., Robinson, E.: Visual weight status misperceptions of men: Why overweight can look like a healthy weight. Journal of Health Psychology 21(8), 1768–1777 (Jul 2016). https://doi.org/10.1177/1359105314566257

77. Pan, Y., Tang, J., Ma, B., Zeng, Y., Ming, Z.: Toward data-driven solutions to interactive dynamic influence diagrams. Knowledge and Information Systems 63(9), 2431–2453 (Aug 2021). https://doi.org/10.1007/s10115-021-01600-5

78. Perrier, R., Gandica, Y., Hernández, L.: The consequences of hesitation: Axelrod model with intrinsic noise. PLOS ONE 16(11), e0259295 (Nov 2021). https://doi.org/10.1371/journal.pone.0259295

79. Pesavento, J., Chen, A., Yu, R., Kim, J.S., Kavak, H., Anderson, T., Züfle, A.: Data-driven mobility models for covid-19 simulation. In: Proceedings of the 3rd ACM SIGSPATIAL International Workshop on Advances in Resilient and Intelligent Cities. p. 29–38. SIGSPATIAL ’20, ACM (Nov 2020). https://doi.org/10.1145/3423455.3430305

80. Pokahr, A., Braubach, L., Haubeck, C., Ladiges, J.: Programming BDI Agents with Pure Java, pp. 216–233. Springer International Publishing (2014). https://doi.org/10.1007/978-3-319-11584-9_15

81. Rahman, A., Farhana, E.: An exploratory characterization of bugs in covid-19 software projects (2020). https://doi.org/10.48550/ARXIV.2006.00586
82. Ramshani, M., Li, X., Khojandi, A., Treffert, L.: An optimization via agent-based simulation framework to integrate stochastic programming with human introduced uncertainty. In: 2019 Winter Simulation Conference (WSC). p. 809–818. IEEE (Dec 2019). https://doi.org/10.1109/wsc40007.2019.9004909

83. Refrigerating, Institute, A.N.S.: Thermal environmental conditions for human occupancy, vol. 55. American Society of Heating, Refrigerating and Air-Conditioning Engineers (2004)

84. Sahasranaman, A., Jensen, H.J.: Dynamics of transformation from segregation to mixed wealth cities. PLOS ONE 11(11), e0166960 (Nov 2016). https://doi.org/10.1371/journal.pone.0166960

85. Sajjad, M., Singh, K., Paik, E., Ahn, C.W.: A data-driven approach for agent-based modeling: Simulating the dynamics of family formation. Journal of Artificial Societies and Social Simulation 19(1) (2016). https://doi.org/10.18564/jasss.2988

86. Samsonovich, A.V.: Intellectual Agents Based on a Cognitive Architecture Supporting Humanlike Social Emotionality and Creativity, pp. 39–50. Springer International Publishing (Oct 2018). https://doi.org/10.1007/978-3-030-01328-8_3

87. Samsonovich, A.V.: Socially emotional brain-inspired cognitive architecture framework for artificial intelligence. Cognitive Systems Research 60, 57–76 (May 2020). https://doi.org/10.1016/j.cogsys.2019.12.002

88. Schelling, T.C.: Models of segregation. The American economic review 59(2), 488–493 (1969)

89. Schindler, J.: On emergent errors in agent-based models-the need for fundamental research (2011)

90. Simon, H.A.: A behavioral model of rational choice. The Quarterly Journal of Economics 69(1), 99 (Feb 1955). https://doi.org/10.2307/1884852

91. Singh, M., Acerbi, A., Caldwell, C.A., Danchin, E., Isabel, G., Molleman, L., Scott-Phillips, T., Tamariz, M., van den Berg, P., van Leeuwen, E.J.C., Derex, M.: Beyond social learning. Philosophical Transactions of the Royal Society B 376(1828) (May 2021). https://doi.org/10.1098/rstb.2020.0050

92. Sun, R.: The CLARION cognitive architecture: Extending cognitive modeling to social simulation, pp. 79–99. Cambridge University Press, New York, NY, USA (2006)

93. Sun, R.: Cognitive Modeling. SAGE Publications Ltd (2020). https://doi.org/10.4135/9781526421036869642

94. Sun, R.: Cognitive social simulation for policy making. Policy Insights from the Behavioral and Brain Sciences 5(2), 240–246 (Aug 2018). https://doi.org/10.1177/2372732218785925

95. Swarup, S.: Adequacy: What makes a simulation good enough? In: 2019 Spring Simulation Conference (SpringSim). pp. 1–12. IEEE (Apr 2019). https://doi.org/10.23919/springsim.2019.8732895

96. Sánchez-Maroño, N., Alonso-Betanzos, A., Fontenla-Romero, O., Polhill, J.G., Craig, T.: Empirically-Derived Behavioral Rules in Agent-Based Models Using Decision Trees Learned from Questionnaire Data, p. 53–76. Springer International Publishing (2017). https://doi.org/10.1007/978-3-319-46331-5_3

97. Thorve, S., Hu, Z., Lakkaraju, K., Letchford, J., Vullikanti, A., Marathe, A., Swarup, S.: A framework for the comparison of agent-based models. Autonomous Agents and Multi-Agent Systems 36(2) (May 2022). https://doi.org/10.1007/s10458-022-09559-5

98. Torrens, P.M., Nara, A.: Modeling gentrification dynamics: A hybrid approach. Computers, Environment and Urban Systems 31(3), 337–361 (May 2007). https://doi.org/10.1016/j.comenvurbsys.2006.07.004
99. Tsarkov, V.S., Enikeev, V.A., Samsonovich, A.V.: Toward a socially acceptable model of emotional artificial intelligence. Procedia Computer Science **190**, 771–788 (2021). https://doi.org/10.1016/j.procs.2021.06.090

100. Vazquez, F., González-Avella, J.C., Eguíluz, V.M., San Miguel, M.: Time-scale competition leading to fragmentation and recombination transitions in the coevolution of network and states. Physical Review E **76**(4) (Oct 2007). https://doi.org/10.1103/physreve.76.046120

101. Vendome, C., Rao, D.M., Giabbanelli, P.J.: How do modelers code artificial societies? investigating practices and quality of netlogo codes from large repositories. In: Spring Simulation Conference (SpringSim 2020). pp. 1–12. SpringSim’20, Society for Modeling and Simulation International (SCS) (2020). https://doi.org/10.22360/springsim.2020.hsaa.007

102. Williams, C.R., Mikler, A.R.: Incorporating Disgust as Disease-Avoidant Behavior in an Agent-Based Epidemic Model, pp. 107–116. Springer International Publishing (2016). https://doi.org/10.1007/978-3-319-39931-7_11

103. Yang, Y.T., Benjamin-Neelon, S.E.: Recent progress in children’s meals law in restaurants in baltimore city and california state: Making a healthy beverage option the default choice. Preventive Medicine **123**, 160–162 (Jun 2019). https://doi.org/10.1016/j.ypmed.2019.03.031

104. Ye, P., Wang, S., Wang, F.Y.: A general cognitive architecture for agent-based modeling in artificial societies. IEEE Transactions on Computational Social Systems **5**(1), 176–185 (Mar 2018). https://doi.org/10.1109/tcss.2017.2777602

105. Zhang, H., Vorobeychik, Y., Letchford, J., Lakkaraju, K.: Data-driven agent-based modeling, with application to rooftop solar adoption. Autonomous Agents and Multi-Agent Systems **30**(6), 1023–1049 (Jan 2016). https://doi.org/10.1007/s10458-016-9326-8
<figure><img src="image_11.png" /><figcaption>Fig. 9: Impact of various errors on the number of changes achieved to stabilize the Axelrod model. Note that superficial observations (b) report the number of features *ignored*, hence zero is equivalent to baseline (no feature ignored).</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>Fig. 10: Behavior of the COVID model at baseline (a), under limited abilities as constrained by the depth of the decision tree (c), by using a few (c) or most (d) of the observations (including the baseline of 100%), with (e) small or (f) large inaccuracies in perception.</figcaption></figure>