
94% of researchers rate our articles as excellent or good
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.
Find out more
ORIGINAL RESEARCH article
Front. Big Data , 26 February 2025
Sec. Medicine and Public Health
Volume 8 - 2025 | https://doi.org/10.3389/fdata.2025.1519369
This paper presents an epidemiological extension of the El Farol Bar problem, where both a social and an epidemiological dimension are present. In the model, individual agents making binary decisions—to visit a bar or stay home—amidst a non-fatal epidemic. The extension of the classic social dilemma is implemented as an agent-based model, and it is later explored by sampling the parameter space and observing the resulting behavior. The results of this analysis suggest that the infection could be contained by increasing the information available in the underlying social system and adjusting its structure.
The appearance of COVID-19 pandemic brought a greater interest on the spread of epidemics in social systems, which has ascended as a research imperative (Squazzoni et al., 2020). The pandemic has especially highlighted the presence of an interplay between disease dynamics and socio-behavioral patterns (Kreulen et al., 2022). Consequently, understanding and strategizing against the spread of epidemics in interconnected social systems have become paramount to safeguarding global health and socio-economic stability (Maharaj and Kleczkowski, 2012).
Mathematical models (Kermack and McKendrick, 1927), and subsequently, simulation models (Bagni et al., 2002), have long been pivotal tools in epidemic management, offering the capacity to predict (Colizza et al., 2006), analyze (Colizza et al., 2007), and strategize (Ibarra-Vega, 2020) against the spread of infectious diseases (Ferreri et al., 2014). The computational implementation of an epidemiological model enables the analysis of disease transmission dynamics (Rahmandad and Sterman, 2008) through the systematic examination of epidemiological variables, even when they are not analytically tractable (Bobashev et al., 2007). In this perspective, simulations can serve two main interrelated goals, although a more precise taxonomy can be defined (Epstein, 2008; Edmonds et al., 2019). First, by incorporating real-world data and multifaceted parameters, simulations provide a computational platform to assess possible outcomes and interventions in real-world systems (Bertolotti and Roman, 2024). Second, simulations can be employed to assess the reliability of hypotheses and to refine the objectives of empirical studies and treatments (Georgescu, 2012).
The El Farol Bar problem (Arthur, 1994), a seminal example in complexity science (Casti, 1996), exemplifies the use of toy models to study the unpredictability of the dynamics of seemingly simple social systems (Lorenz, 1963). In the original form of the problem, multiple agents all face the same binary decision, that each of them has to make without the possibility to agree or to share information with the others: either to visit a bar with limited capacity or to stay home, where a threshold is set and known to all agents above which they no longer find it enjoyable to visit the bar. The binary outcome—either the visit was enjoyable if the bar was not too crowded or viceversa—is known to each attending agent after the event, and the time series of the outcomes of repeated events is the basis for predicting the next outcome and a decision of each accordingly.
In this paper, the dilemma has been modified and enrich with a new epidemiological dimension. Individuals must decide whether or not to engage in social activities amidst a contagious disease outbreak, as it happened during the COVID-19 pandemic (Kluwe-Schiavon et al., 2021). To the best of the authors' knowledge, interactions between the underlying mechanisms of social decision-making and the epidemiological dynamics in such scenarios are largely unexplored (Pullano et al., 2020), and the El Farol bar problem was never investigated from an epidemiological perspective.
The El Farol Bar problem extension has been implemented into an agent-based model (Bonabeau, 2002). This specific methodology embodies a bottom-up approach, allowing for the representation of heterogeneous behaviors and leading to the emergence of complex system-wide phenomena (Siegenfeld and Bar-Yam, 2020), and it is widely employed across multiple fields, including ecology (Goodman et al., 2023), economics (Arthur, 2006), social sciences (Marwal and Silva, 2023), and epidemiology (Squazzoni et al., 2020). The computational implementation was needed to generate simulated data, with the purpose of contributing to the understanding of the entangled nature of socio-epidemiological systems.
The results suggest that epidemic survival rate is strongly dependent on the experimental configuration, given that with the specific parameters' space employed only a small fraction of simulations resulting in persistent infections. This indicates that system dynamics are governed more by the setup of the configuration space than by external environmental factors. Parameters affecting infection survival display varied behaviors, monotonic and non-monotonic. Environmental co-effects highlight regions of increased infection persistence, particularly in configurations with higher population densities and prolonged infection durations. The results emphasizes the role of information flow and the structural dynamics of social systems, where short-term memory and agent presence significantly affect infection survival probabilities.
This paper is structured as follows: The agent-based model is first introduced and a detailed description of its components provided. The model exploration process is then outlined, emphasizing the methodology employed to generate the results. Finally, we present and discuss the outcomes and draw conclusions from our research.
Social dilemmas exist with the purpose of improving our understanding of how people interact in a resource-bounded environment (Van Lange et al., 2013), especially where there is a conflict between bounded rational entities which are metabolically dependent from a shared environment (Valentinov and Chatalova, 2016). At the best of our knowledge, Dawes (1980) was the first to introduce the concept of social dilemma, even thought a similar framework was already present in previous works (Hardin, 1968; Olson, 1974). Dawes describes social dilemmas as scenarios where individual decision-makers possess a dominant strategy that leads to non-cooperation and, if everyone adopt this dominant strategy, the outcome would be universally poorer, leading to a suboptimal equilibrium. The final rate of cooperation usually depends on the payoff structure (Rand et al., 2012); even then, it is an approximation and usually requires a certain number of iterations to be reached (Capraro, 2013).
The concept of the social dilemma is not confined to a single field of study. In economics, they encompass a range of perspectives and findings, such as investigating the difference between rational behavior and social norm (Weber et al., 2004; Biel and Thøgersen, 2007). Also, social norms have been employed for addressing environmental policies (Cerutti, 2017), conflict management strategies (Sitkin and Bies, 1993), social learning (Mobius and Rosenblat, 2014), and knowledge sharing (Razmerita et al., 2016). Ecology has a long tradition of using social dilemmas as well (Eshel and Motro, 1988; Woodall et al., 2000), especially in light of the pervasive presence of cooperation in natural species (Gokhale and Hauert, 2016). These settings can help in understanding the origin of sociality (Purcell et al., 2012) or group foraging strategies (Bach et al., 2006). Also, social dilemmas have been employed as the border between ecology and social sciences, to study how success in species conservation depends as much on individuals can collaborate to a common purpose (Di Chio et al., 2008; Cumming, 2018) and to use classic economic concepts such as signaling and contract theory to interpret evolutionary biology (Archetti et al., 2011).
While El Farol Bar problem (Arthur, 1994) is a classic example of social dilemma with decision-making under uncertainty, it already presents several extensions. Statistical approaches have been used to improve agents' decision-making strategies, particularly in dynamic environments with evolving population behaviors (Challet and Zhang, 1997). Also, many approaches have been proposed to model the prediction mechanisms and agent behaviors in contexts such as resource allocation (Challet and Zhang, 1997) and market dynamics (Johnson et al., 1998). A variant of the El Farol bar problem has recently been used to examine the fairness of social distancing measures introduced during the COVID-19 pandemic (Schosser, 2022). However, this analysis did not consider the potential for agents to become infected.
Although the fields of epidemiology and social dilemmas have not traditionally intersected extensively, recent years have seen a burgeoning interest in the interplay between these disciplines, particularly highlighted by global health crises such as the COVID-19 pandemic (Tanimoto and Tanimoto, 2018). The application of social dilemma frameworks has proven insightful for examining the relationship between individual behaviors and collective outcomes, notably in the context of vaccination rates within populations (Tanimoto, 2021). These analyses utilize various models to illuminate the impact of factors such as replicator dynamics (Kabir, 2021), social efficiency (Kabir, 2021; Khan and Tanimoto, 2023), and diffusion structures (Wei et al., 2019) on vaccination uptake. Human behavior has been indicated as critical in shaping epidemic trajectories (Ferguson et al., 2020), emphasizing how deviations from optimal behavior can lead to suboptimal public health outcomes (Meloni et al., 2011), how different cooperation styles affect the achievement of herd immunity (Gharakhanlou and Hooshangi, 2020), or the interplay between individual and collective behavior (Palomo-Briones et al., 2022). Furthermore, empirical studies highlight how cooperative behaviors may be amplified by the accelerated transmission of disease (Rychlowska et al., 2022). Additionally, the exploration of oscillatory behaviors within social dilemmas reveals how perceived infection risks can drive a collective shift toward more cautious approaches to social interaction, such as increased adherence to social distancing measures (Glaubitz and Fu, 2020).
This section presents a description of the model of an epidemiological version of the El Farol Bar and the exploration methodology employed to generate results.
In this section an agent-based model of an epidemiological version of the El Farol Bar problem is described and the method employed to explore the model is presented.
In addressing how epidemics affects the social dynamics in the El Farol Bar problem, agent-based modeling serves for two compelling reasons: as an approach traditionally employed to address social dilemmas, it is an effective means of communication within the scientific community; and it is particularly well-suited for capturing individual behaviors and their effects on an overall epidemic spread. This enables to get insights from the global co-effect of individual (i.e., agent-related) epidemic and social variables.
At each time step t, the model implements a sequence of actions, as depicted in the flowchart (see Figure 1). The first concerns the decision-making process regarding bar attendance: evaluating agents' memory of past attendance, estimating the expected crowd level, and making a decision accordingly. The second is about the dynamics of infection as induced by the interactions among the agents given their health states, where an infectious pathogen could be transmitted to those who decide to attend the bar, influenced by the density of the crowd and the duration of exposure.
Together, these two sets of actions capture a dual aspect of agent behavior: social decision making influenced by past experiences and the epidemiological implications of these social choices. The model thus provides a framework for examining the interplay between individual decision making based on memory of previous states and the collective outcomes in terms of disease transmission, offering insights into how individual behaviors aggregate to impact public health.
The proposed model includes a single kind of agents, representing the individuals that could decide to attend the bar in any given week (the time step of the model) and thus possibly be infectious. The agents' behavior is modeled according to the hypotheses of the original El Farol Bar problem. First, the only decision each agent can make each week is whether to attend the bar, and the decision is always executed. Second, agents like to attend the bar, if it is not too crowded, and do it as much as they can: hence, each agent decides each week whether to attend the bar depending upon its expectation of the total number of agents who will attend. Third, agents interact with each other only at the bar, and therefore when their decision to attend has been already made.
The model introduced by this paper incorporates several hypotheses concerning agents' behavior. First, agents make a binary decision, as they can either choose to attend a bar or not; no other actions are included in the model, to focus on a specific aspect of social behavior. Second, agents inherently enjoy attending the bar and will do so as much as they can, but their preference is tempered by the bar's occupancy; agents are averse to overcrowding. Therefore, the decision to attend the event is influenced by their expectations regarding how crowded the bar will be. In time, this introduces a feedback loop where the average attendance of the bar inversely affects its attractiveness while it is directly influenced by it; a dynamic seen in many real-world social scenarios. Third, agents' interaction is solely defined by the shared presence in the crowded space of the bar, and there are no interpersonal communications or relationships affecting their attending decision.
The information about past attendance plays a crucial role in shaping agents' expectations, as it is used to estimate the number of agents likely to attend the bar in the subsequent week, as follows. For agents attending the event, the new value is the actual number of agents at the bar, while for agents that did not attend the new element of the memory is a random value, which stands for an educated guess made by agents which can not communicate with each other.
The agent's decision whether to attend the event or not is taken comparing an attendance threshold and the expectation regarding the future attendance. The attendance threshold ta is a parameter of the model that depicts venue saturation level above which agents would consider unpleasant to be in the bar, consequently not attending the event.
Each agent i (where i goes from 1 to n, the total number of agents) generates an expectation regarding how many agents will attend the bar at the next time step memorizing the number of agents present at the bar during the last m times it attended the bar, with m being the memory length, and assigning weights to generate a prediction. In cases where the agent does not attend the bar, the value saved in memory is the one hypothesized by the agent, namely, the one generated with the 'expected attendance'. Let si, k be the k-th element of the memory of agent i (with k∈{0, 1, ..., t}) and w the list of weight wk used to the define importance of each memory element, which increases with k. So, the attendance—which is the number the agent i expects to be at the event at time t+1—is therefore given by:
where aj is the participation of the agent j to the event at time t+1, is the total attendance at time t+1 and is the expectation of the total attendance from agent i at time t+1. Consequently, from the expected attendance is possible to determine also the expected filling f of the venue at the time t+1
where Cmax is the maximum capacity of the venue. Given the expected filling, at each time step an agent i attends the event whenever Ei[fi, t+1] < ta.
In epidemiological models, each agent is typically (but not necessarily) in one of three states: susceptible, infectious, or recovered. These class of models accounts for the possibility of waning immunity after an infection, and eventually become susceptible again, modeling diseases where immunity, either natural or vaccine-induced, can be acquired and diminishes over time. Figure 2 depicts this transition.
The epidemiological dimension of this model is based on several key modeling hypotheses. Firstly, the contagion process is assumed to be uniform across all agents, characterized by a consistent duration and an initially uniform level of infectiousness. This simplification negates individual variations in disease progression and response to infection. Secondly, the model posits that the disease in question is non-lethal; agents cannot die as a result of contracting the illness. This assumption is critical as it focuses the model on the dynamics of disease spread rather than mortality rates, and the overall number of individual in the system remains the same. Despite the absence of mortality and the maintenance of agent numbers over time, a disease that infects multiple agents has the potential to reduce the number of agents available for social interaction at any given time. Furthermore, the model assumes the absence of long-term physical or psychological effects post-infection. Recovered agents are not hindered in their ability to participate in normal activities, such as attending a bar, indicating that the disease does not cause lasting health impacts. Psychologically, the model assumes that agents do not experience fear or behavioral changes as a result of the infection. They continue to frequent the events without any alteration in their behavior due to the experience of being infected. The sole variable that the agent takes into account when determining whether or not to attend the bar is their own contagion level ci. Indeed, should an agent's ci be too high, they may elect not to attend the bar due to the symptoms of the disease. Finally, a crucial aspect of this model is the agents' ignorance of the epidemic. Agents lack information about the total number of infected individuals and do not consider the risk of infection in their decision-making process. This implies a lack of adaptive behavior in response to the epidemic, which significantly influences the model's predictions about disease spread. By ignoring potential changes in social behavior and risk assessment, the model strictly focuses on the deterministic spread of the disease under constant behavioral patterns. This approach simplifies the modeling process but may overlook important dynamics present in real-world scenarios where awareness and behavioral adaptations play a crucial role in disease transmission.
Agents can get infected only by participating in an event. So, the epidemic transmission happens solely at the bar, and only if at least one infectious is attending. The number of new infected agents it at time t is
where is St the number of agents in susceptible state attending the bar at time t, and α is the level of contagiousness of the infection.
In the proposed model, social relationships among agents are not considered, leading to a uniform infection probability for all individuals attending the bar at time t. Consequently, the selection of new it infected agents at each time step is randomized from those present, not considering individual interactions or relationships.
Whenever, an agent becomes infected, the infection follows this dynamics. Initially, the contagion level of the newly infected agent i is set to ci = 1. Given an infection duration di, the contagiousity of agents decreases linearly by 1/di at each time step.
In the progression of the disease modeled, two critical thresholds, ts and tc, play pivotal roles in influencing agent behavior and the spread of the infection, as outlined in Figure 3. The first threshold, ts, represents the infection level at which an agent exhibits sufficient symptoms to deter them from attending the bar. The second, tc, indicates the infection level beyond which agents can spread the infection. The spread of the infection is most influenced by the agents with tc < ci < ts, so with a contagious level between these two thresholds. This is because it encapsulates the period when agents are infectious but may not have anymore the level of symptom severity or self-awareness to avoid social gatherings, thereby contributing to the disease transmission dynamics. Notable, the contagious level is taken into account only for the ni agents which infection level is greater than tc.
In the modeled scenario, infected agents undergo a recovery process after a duration of ti time steps. Upon recovery, these agents are conferred a temporary immunity lasting tr time steps. However, this immunity is not permanent; after the elapse of tr time steps, the agents once again become susceptible to infection. In this model, the transition from immune to susceptible is unambiguous; thus, an immune agent will invariably possess a null probability of becoming infected. This cyclical pattern of recovery and renewed susceptibility underscores the transient nature of immunity within the model.
The results from the simulation model were generated by means of a grid sampling exploration of the parameter space, to collect the model outputs from different parameters' combination (Collins et al., 2013). Grid sampling from a parameter space involves systematically selecting a finite subset of parameter values that aims at comprehensively represent the entire parameter space. The idea underlying the use of this technique is to facilitate the exploration of system behavior across distinct parameter combinations, especially in cases where not a specific behavior is expected or researched. Table 1 presents the parameters tested in the simulation and their explored ranges. Each parameter has been sampled from a uniform distribution. The data are collected by simulating the agent-based model 100, 000 times. A preliminary analysis was conducted to assess the sensitivity to seed variation with specific parameter combinations (Bertolotti et al., 2020). It was observed that the variability of the metrics due to seed changes was practically zero, indicating that the mean or the presence of interesting behavior in the time series was not dependent on the random number generator. Consequently, multiple experiments were not conducted for each random seed.
Even if the model is stochastic, each simulation was initialized with a specific random seed, that was stored as well. Consequently, the results were reproducible at a later stage, and the time series for each configuration of interest was observable. Furthermore, the initial number of infected is not fixed; rather, it is 10% of the population. This ensures that the infection will commence, and that any subsequent extinction will not be contingent on the initial number being insufficient, even if preliminary analysis has shown that this value does not have an effect on the results.
From each simulation run, two time-series were collected: A, which is the number of attending agent at each time-step t, and I, the number of infected agents at each step of the simulation. From each time-series two output were extracted: the mean value of the series E[A] and E[I], which are used to assess the overall status of the system in time.
The model, the exploration code and the data analysis are all implemented in Python 3.11.
As illustrated in Figure 4, the epidemic did not persist until the conclusion of the simulation in the majority of instances when the specific experimental configuration was employed. The specific configuration of the model exploration plays a more significant role than the specific features of the model or the specific environmental parameters in determining the outcome. The percentage of surviving infections is highly dependent on the experimental configuration. Although it could be adjusted to achieve higher survival rates, the primary objective was to study the behavior of the system under the current conditions. Keeping specific configurations that increase the likelihood of infection survival would limit the study of dynamics and introduce bias by artificially inflating survival rates.
Figure 4. Share of runs where I(t = 200) > 0, i.e. where the infection lasted until the end of the simulation.
One might be surprised that only a small proportion of runs result in a lasting infection (Figure 5 shows an example of the model time series for a case where the infection lasted until the end and where it did not), and thus conclude that the existence of infection in social systems is merely coincidental. This line of reasoning fails to consider the potential for biological specimens to adapt, which could result in the emergence of new infectious diseases. Such adaptations may occur through evolutionary processes, resulting in the evolution of new pathogens that are better equipped to survive and disseminate within a given environment. An alternative hypothesis is that these adaptations could either result in the evolution of a more resilient pathogen or in the extinction of the pathogen. In a scenario where the infecting entity is not adapting, the observed consequences are the result of a previous adaptation. Therefore, the parameters configuration in Table 2 should be considered in this context, particularly with regard to the epidemiological elements.
Figure 5. Behavior of A and I in two four different simulations. In the simulation on the left, the infection does not last to the end, which is what happens in the simulation on the right.
It is then possible to label of the simulation outcomes into two distinct groups based on their characteristics and behaviors;: Sa, which includes all the simulation results, serving as a comprehensive dataset to which to make confrontations; and Si, containing those simulations where the epidemiological output I(t = 200) > 0. Table 2 provides a detailed comparison between two scenarios, and it was constructed by collecting the mean values of the input parameters, segmented into the two observed output scenarios. Given that these mean values were generated from a random grid sampling experiment across the parameter space, the difference can identify parameters' effect on scenario output. The third column of the table represents the relative difference between the mean input values for the two scenarios, providing a quantitative measure of each parameter's influence on the system's behavior. These quantitative results are also reflected in the description of Figure 6, where they are discussed later.
Figure 6 shows the effect of each parameter to the infection surviving, illustrating the distribution of each parameter exclusively for simulation runs for Si. Given that each parameter has been sampled from a uniform distribution, the presence of diverse shapes suggests that there is an actual effect of each parameters upon the infection continuation, and that this effect may vary. It confirms the finding from Table 2.
For instance, the infection duration (di), contagiousness of the infection (α), and the number of agents in the simulation (n) all exert a growing monotonic influence on the infection's ability to survive. While the effect of di and α is intuitive, the impact of an increasing number of individuals is less clear, especially given that the capacity is not fixed but depends on n. This observation could depend on increased opportunities for interactions between agents, the potential for delayed saturation, and the presence of a buffer for randomness. Conversely, the significance of the most recently encoded event in the decision-making process of the agents (m) is univocally monotonically decreasing, indicating that a more rapid reaction time could diminish the probability of an infection's survival, even when considering solely the overall attendance and the absence of knowledge regarding the number of infected agents.
The remaining four parameters exhibit non-monotonic behavior. The threshold of contagion below which the infection is not spread (tc) or not perceived (tp) plays a role only for specific values, functioning as enabling factors. Finally, it can be observed that the attendance threshold, ta, and the recovery time, tr, exhibit a non-symmetric "bell" shape. In the first case, the dependence may be attributed to the fact that insufficient attendance does not result in the establishment of a critical mass at the bar, thereby preventing the constant dissemination of the epidemic. Conversely, when the value is excessively high, the epidemic rapidly eliminates all susceptible individuals, leading to extinction following a primary surge. With regard to the recovery time, it is evident that the proportion of surviving infections declines as this variable increases. However, it is counterintuitive that, at low values of this variable, there is an increase in the proportion of surviving infections. It may be the case that this is due to the fact that it reduces the size of the infection waves by reducing infection synchronization, thus allowing them to persist for longer without being extinguished due to the absence of non-infected agents.
In Figure 7, histogram on the left depicts the mean number of agents infected over the course of a simulation in which the infection was sustained, while the one on the right decomposes the data as a function of the percentage capacity of the bar, which can be only cp = 0.5 or cp = 1. The symmetrical shape of the histogram (a) could suggest a relatively balanced distribution of infection rates, with few extreme cases of very low or very high infection levels, but histogram (b) reveals that it depends strongly from the bar capacity, given that it is the combination of two distribution ranging from 0 to 1 with respectively a left and a right tail.
Figure 7. The distribution of the share of infected agents at the conclusion of the simulation I(t = 200) for Si, aggregated (A) and divided by the percentage capacity of the venue relative to the total number of agents cp (B).
It is evident that there is a co-effect between the environmental parameters, which can be visualized in Figure 8. The gradient of the simulation in the top-left part of Figure 8 exhibits a pronounced clustering of elevated values in the top right quadrant, with a gradual decline in the lower left. This suggests that, within the confines of this experimental configuration, it is highly improbable to observe a simulation characterized by low population density and minimal infection duration. Analogously, the top-right subfigure illustrates that, for a given configuration of infection threshold (tc) and attendance threshold (ta), the probability of infection survival is higher when the majority of runs occur at a specific point.
Figure 8. The number of simulations conducted for a configuration of parameters in Si. The lighter the heatmap, the more simulations there are at that location in parameter space. In contrast, a darker color describes a location in the parameter space where there are no simulations.
This paper introduces a modified version of the El Farol Bar social dilemma with an added epidemiological dimension, where individuals must choose whether to engage in social activities during a disease outbreak. The simulation results indicate two key messages. The first is the importance of the rate of information available in the social system, which can be observed in the role of short-term memories and personal awareness regarding the infective status. This is not unexpected when the model is viewed as a decision-making context, and there is a long tradition of research exploring how an entity's capacity to gather and process information affects their actions. This aligns with Soros's conceptual framework, particularly the 'principle of fallibility,' which asserts that individuals' perceptions of reality are inherently flawed due to biases or inconsistencies (Soros, 1988, 2013). In the context of social systems, these imperfect views influence decision-making processes, shaping the outcomes of collective actions. Also, the effect can be explained by the “principle of reflexivity" (Soros, 1988, 2013), which plays a pivotal role by illustrating how individual beliefs—such as misconceptions about infection risks—not only influence personal behaviors but also modify the dynamics of the social and epidemiological systems as a whole. For example, if a majority of agents underestimate its contagiousness, their actions can exacerbate disease spread, thus reshaping the trajectory of the epidemic and the social structure itself (Beinhocker, 2013).
The second element is the need for taking explicitly into account social system structure, which in this case derives from agents' numerosity and dynamics. From a topological perspective, an agent can be situated in one of two states: present or absent from the event. Agents that are present are interconnected, at least potentially, while those that are absent are not. This situation undergoes change at each time step. These elements can change in accordance with both social and epidemic features, which in turn give rise to a diversification of the system structure and, consequently, an increase in the probability of an infection lasting. Also, the results indicate a positive effect between population size and infection surviving. Given than, by design, the model is a structured representation of a closed systems, this finding suggests that an efficient strategy could be involve sectoral management by dividing larger systems into smaller, manageable units. Such an approach would facilitate easier control and monitoring of these smaller systems.
Moreover, the role of memory in this model could provide important insights about decision-making in dynamic social-epidemiological systems. On one hand, the implication appears straightforward: agents who focus more on recent events, rather than relying on a longer history of past experiences, are better positioned to make adaptive decisions about whether to attend the bar. This tendency to prioritize the present over distant past events helps break the synchronization of attendance patterns, reducing crowd-induced infection risks and stabilizing system dynamics. However, this insight challenges conventional wisdom in data-driven decision-making. A big data expert might argue that having more data–such as an extended, detailed time series–should lead to better decisions. The model, however, reflects the cognitive constraints of the agents, who function with limited capacity for processing complex information. In scenarios where cognitive capacity is low (or where agents behave as if it is), focusing on the most recent information proves to be a more effective strategy than relying on an exhaustive analysis of historical trends. This finding underscores an important tradeoff: when resources for processing information are constrained, simplicity can be advantageous. It suggests that decision-making entities—whether individuals, organizations, or automated systems–may benefit from heuristics that prioritize recent data over large datasets in certain contexts.
The most negative effect on infection spread is linked to the infectiousness threshold. This is consistent with the expectation that when an infective specimen falls in the area where can be perceived longer than it can be widespread, it has less chances to survive. Furthermore, this underscores again the critical role of information. More informed agents, who are thus more aware of the risks, and so have an higher perception threshold, are more likely to make decisions that would spread the infection, thereby influencing the overall dynamics of disease spread.
The findings from this paper could have practical implications for real-world scenarios, particularly in public health management during epidemics. First, the importance of information flow and short-term memory highlights the need for timely and accurate communication strategies. Public health authorities could design targeted messaging campaigns that provide clear and actionable information to the public, enabling individuals to make informed decisions that reduce disease transmission. Second, insights into how agents' perceptions and crowd dynamics influence infection spread could inform the development of adaptive social distancing measures. For instance, policies that dynamically adjust venue capacity limits based on real-time occupancy or local infection rates could effectively prevent overcrowding and minimize transmission risks. Lastly, the role of personal awareness and memory in decision-making underscores the value of sustained public health campaigns. Educational initiatives that build long-term awareness of health risks and encourage proactive behaviors, such as wearing masks or staying home when symptomatic, can help maintain a higher level of community preparedness and resilience during future outbreaks.
A limitation of this study is the homogeneity of agents' behavior. Future research could explore how the system behaves when agents exhibit diverse behaviors. However, it was deemed unnecessary to include this aspect in the initial analysis. Intuitively, increasing the number of agents would likely result in behavioral heterogeneity being averaged out in a mean-field approximation, which guided the decision to use the current configuration. Nonetheless, this represents a limitation and a potential avenue for future research aimed at validating the results under more heterogeneous scenarios.
Also, the endogeneity of contagion risk perception deserves more exploration. In our model, agents' decisions are based on memory and expectations regarding social attendance but do not incorporate adaptive perceptions of contagion risk. However, in real-world scenarios, individuals often adjust their behavior dynamically based on perceived risk (Busby et al., 2016), which in turn alters the actual spread of the disease. If agents were to update their decision-making based on the prevalence of infections in their environment–either through direct experience or social influence—the model outcomes might change significantly. Higher perceived risk could lead to more cautious behaviors, effectively flattening the epidemic curve, while underestimation of risk could accelerate contagion.
More broadly, the main limitation of this study is that the analyses were conducted within the framework of a social dilemma, rather than on an empirically validated model. While the insights and results derived from this approach are valid, they should be viewed as preliminary suggestions for empirical researchers conducting field experiments. The findings provide a theoretical foundation that can guide future empirical work, but further validation through real-world data is necessary to confirm their applicability.
Future developments can take multiple directions. First, the time-series dynamics of the model could be studied to identify whether specific dynamic equilibria or limit cycles emerge, which could be highly relevant for public decision-makers. Second, an extension to the model could be make, introducing a policy-maker agent that could employ actions for epidemic containment. The results from the synthetic decision-makers' actions could be compared to real-world policy decisions made during the COVID-19 pandemic. Third, an analysis could be conducted to quantify the amount of information (in bits) required by each agent to make informed decisions in such contexts. Finally, a potential extension could explore long-term infections not tied to short-term events like a night out, but where the socio-epidemiological co-dynamics remain critical, such as in diseases like AIDS.
The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found at: https://anonymous.4open.science/r/epielfarol-D880/.
FB: Conceptualization, Formal analysis, Investigation, Methodology, Project administration, Software, Validation, Visualization, Writing – original draft, Writing – review & editing. NK: Software, Visualization, Writing – original draft. LP: Software, Visualization, Writing – original draft. LM: Supervision, Writing – review & editing.
The author(s) declare that no financial support was received for the research, authorship, and/or publication of this article.
The authors would like to acknowledge Sabin Roman for his valuable contributions to the paper's outline.
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
The author(s) declare that Gen AI was used in the creation of this manuscript. We have employed Generative AI to refine the language of the manuscript and proof-reading it.
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Archetti, M., Scheuring, I., Hoffman, M., Frederickson, M. E., Pierce, N. E., Yu, D. W., et al. (2011). Economic game theory for mutualism and cooperation. Ecol. Lett. 14, 1300–1312. doi: 10.1111/j.1461-0248.2011.01697.x
Arthur, W. B. (2006). Out-of-equilibrium economics and agent-based modeling. Handb. Computa. Econ. 2, 1551–1564. doi: 10.1016/S1574-0021(05)02032-0
Bach, L. A., Helvik, T., and Christiansen, F. B. (2006). The evolution of n-player cooperation–threshold games and ess bifurcations. J. Theor. Biol. 238, 426–434. doi: 10.1016/j.jtbi.2005.06.007
Bagni, R., Berchi, R., and Cariello, P. (2002). A comparison of simulation models applied to epidemics. J. Artif. Soc. Soc. Simul. 5. Available at: https://jasss.soc.surrey.ac.uk/5/3/5.html
Beinhocker, E. D. (2013). Reflexivity, complexity, and the nature of social science. J. Econ. Methodol. 20, 330–342. doi: 10.1080/1350178X.2013.859403
Bertolotti, F., Locoro, A., and Mari, L. (2020). “Sensitivity to initial conditions in agent-based models,” in Multi-Agent Systems and Agreement Technologies: 17th European Conference, EUMAS 2020, and 7th International Conference, AT 2020, Thessaloniki, Greece, September 14-15, 2020, Revised Selected Papers 17 (Cham: Springer), 501–508. doi: 10.1007/978-3-030-66412-1_32
Bertolotti, F., and Roman, S. (2024). Balancing long-term and short-term strategies in a sustainability game. iScience 27:110020. doi: 10.1016/j.isci.2024.110020
Biel, A., and Thøgersen, J. (2007). Activation of social norms in social dilemmas: a review of the evidence and reflections on the implications for environmental behaviour. J. Econ. Psychol. 28, 93–112. doi: 10.1016/j.joep.2006.03.003
Bobashev, G. V., Goedecke, D. M., Yu, F., and Epstein, J. M. (2007). “A hybrid epidemic model: combining the advantages of agent-based and equation-based approaches," in 2007 winter simulation conference (Washington, DC: IEEE), 1532–1537. doi: 10.1109/WSC.2007.4419767
Bonabeau, E. (2002). Agent-based modeling: methods and techniques for simulating human systems. Proc. Natl. Acad. Sci. USA 99(Suppl 3), 7280–7287. doi: 10.1073/pnas.082080899
Busby, J. S., Onggo, B. S., and Liu, Y. (2016). Agent-based computational modelling of social risk responses. Eur. J. Oper. Res. 251, 1029–1042. doi: 10.1016/j.ejor.2015.12.034
Capraro, V. (2013). A model of human cooperation in social dilemmas. PLoS ONE 8:e72427. doi: 10.1371/journal.pone.0072427
Casti, J. L. (1996). Seeing the light at el farol: a look at the most important problem in complex systems theory. Complexity 1, 7–10. doi: 10.1002/cplx.6130010503
Cerutti, N. (2017). Social dilemmas in environmental economics and policy considerations: a review. Ethics Prog. 8, 156–173. doi: 10.14746/eip.2017.1.10
Challet, D., and Zhang, Y.-C. (1997). Emergence of cooperation and organization in an evolutionary game. Phys. A Stat. Mech. Appl. 246, 407–418. doi: 10.1016/S0378-4371(97)00419-6
Colizza, V., Barrat, A., Barthelemy, M., Valleron, A.-J., and Vespignani, A. (2007). Modeling the worldwide spread of pandemic influenza: baseline case and containment interventions. PLoS Med. 4:e13. doi: 10.1371/journal.pmed.0040013
Colizza, V., Barrat, A., Barthélemy, M., and Vespignani, A. (2006). The role of the airline transportation network in the prediction and predictability of global epidemics. Proc. Nat. Acad. Sci. 103, 2015–2020. doi: 10.1073/pnas.0510525103
Collins, A. J., Seiler, J., Gangel, M., and Croll, M. M. (2013). Applying Latin hypercube sampling to agent-based models: understanding foreclosure contagion effects. Int. J. Housing Markets Anal. 6, 422–437. doi: 10.1108/IJHMA-Jul-2012-0027
Cumming, G. S. (2018). A review of social dilemmas and social-ecological traps in conservation and natural resource management. Conserv. Lett. 11:e12376. doi: 10.1111/conl.12376
Dawes, R. M. (1980). Social dilemmas. Annu. Rev. Psychol. 31, 169–193. doi: 10.1146/annurev.ps.31.020180.001125
Di Chio, C., Di Chio, P., and Giacobini, M. (2008). “An evolutionary game-theoretical approach to particle swarm optimisation," in Workshops on Applications of Evolutionary Computation (Cham: Springer), 575–584. doi: 10.1007/978-3-540-78761-7_63
Edmonds, B., Le Page, C., Bithell, M., Chattoe-Brown, E., Grimm, V., Meyer, R., et al. (2019). Different modelling purposes. J. Artif. Soc. Soc. Simul. 22:6. doi: 10.18564/jasss.3993
Epstein, J. M. (2008). Why model? J. Artif. Soc. Soc. Simul. 11:12. Available at: https://www.jasss.org/11/4/12.html
Eshel, I., and Motro, U. (1988). The three brothers' problem: kin selection with more than one potential helper. 1. The case of immediate help. Am. Nat. 132, 550–566. doi: 10.1086/284871
Ferguson, N. M., Laydon, D., Nedjati-Gilani, G., Imai, N., Ainslie, K., Baguelin, M., et al. (2020). Impact of non-pharmaceutical interventions (NPIS) to reduce COVID-19 mortality and healthcare demand. imperial college COVID-19 response team. Imp. Coll. COVID-19 Response Team 20:77482. doi: 10.25561/77482
Ferreri, L., Bajardi, P., Giacobini, M., Perazzo, S., and Venturino, E. (2014). Interplay of network dynamics and heterogeneity of ties on spreading dynamics. Phys. Rev. E 90:012812. doi: 10.1103/PhysRevE.90.012812
Gharakhanlou, N. M., and Hooshangi, N. (2020). Spatio-temporal simulation of the novel coronavirus (COVID-19) outbreak using the agent-based modeling approach (case study: Urmia, Iran). Inform. Med. Unlocked 20:100403. doi: 10.1016/j.imu.2020.100403
Glaubitz, A., and Fu, F. (2020). Oscillatory dynamics in the dilemma of social distancing. Proc. R. Soc. A 476:20200686. doi: 10.1098/rspa.2020.0686
Gokhale, C. S., and Hauert, C. (2016). Eco-evolutionary dynamics of social dilemmas. Theor. Popul. Biol. 111, 28–42. doi: 10.1016/j.tpb.2016.05.005
Goodman, J. R., Caines, A., and Foley, R. A. (2023). Shibboleth: an agent-based model of signalling mimicry. PLoS ONE 18:e0289333. doi: 10.1371/journal.pone.0289333
Hardin, G. (1968). The tragedy of the commons. Science 162, 1243–1248. doi: 10.1126/science.162.3859.1243
Ibarra-Vega, D. (2020). Lockdown, one, two, none, or smart. modeling containing COVID-19 infection. a conceptual model. Sci. Total Environ. 730:138917. doi: 10.1016/j.scitotenv.2020.138917
Johnson, N. F., Hart, M., and Hui, P. M. (1998). Crowd effects and volatility in a competitive market. arXiv [Preprint] arXiv:cond-mat/9811227. doi: 10.48550/arXiv.cond-mat/9811227
Kabir, K. A. (2021). How evolutionary game could solve the human vaccine dilemma. Chaos Solitons Fractals 152:111459. doi: 10.1016/j.chaos.2021.111459
Kermack, W. O., and McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proc. R. soc. Lond. Ser. A-Contain. Pap. Math. Phys. Character. 115, 700–721. doi: 10.1098/rspa.1927.0118
Khan, M. M.-U.-R., and Tanimoto, J. (2023). Investigating the social dilemma of an epidemic model with provaccination and antivaccination groups: an evolutionary approach. Alex. Eng. J. 75, 341–349. doi: 10.1016/j.aej.2023.05.091
Kluwe-Schiavon, B., Viola, T. W., Bandinelli, L. P., Castro, S. C. C., Kristensen, C. H., Costa da Costa, J., et al. (2021). A behavioral economic risk aversion experiment in the context of the covid-19 pandemic. PLoS ONE 16:e0245261. doi: 10.1371/journal.pone.0245261
Kreulen, K., de Bruin, B., Ghorbani, A., Mellema, R., Kammler, C., Vanhée, L., et al. (2022). How culture influences the management of a pandemic: a simulation of the COVID-19 crisis. J. Artif. Soc. Soc. Simul. 25:6. doi: 10.18564/jasss.4877
Lorenz, E. N. (1963). Deterministic nonperiodic flow. J. Atmos. Sci. 20, 130–141. doi: 10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2
Maharaj, S., and Kleczkowski, A. (2012). Controlling epidemic spread by social distancing: do it well or not at all. BMC Public Health 12, 679–679. doi: 10.1186/1471-2458-12-679
Marwal, A., and Silva, E. A. (2023). City affordability and residential location choice: a demonstration using agent based model. Habitat Int. 136:102816. doi: 10.1016/j.habitatint.2023.102816
Meloni, S., Perra, N., Arenas, A., Gómez, S., Moreno, Y., and Vespignani, A. (2011). Modeling human mobility responses to the large-scale spreading of infectious diseases. Sci. Rep. 1:62. doi: 10.1038/srep00062
Mobius, M., and Rosenblat, T. (2014). Social learning in economics. Annu. Rev. Econ. 6, 827–847. doi: 10.1146/annurev-economics-120213-012609
Olson, M. (1974). The Logic of Collective Action. Harvard Economic Studies. Cambridge, MA: Harvard University Press.
Palomo-Briones, G. A., Siller, M., and Grignard, A. (2022). An agent-based model of the dual causality between individual and collective behaviors in an epidemic. Comput. Biol. Med. 141:104995. doi: 10.1016/j.compbiomed.2021.104995
Pullano, G., Valdano, E., Scarpa, N., Rubrichi, S., and Colizza, V. (2020). Evaluating the effect of demographic factors, socioeconomic factors, and risk aversion on mobility during the covid-19 epidemic in France under lockdown: a population-based study. Lancet Digit. Health 2, e638–e649. doi: 10.1016/S2589-7500(20)30243-0
Purcell, J., Brelsford, A., and Avilés, L. (2012). Co-evolution between sociality and dispersal: the role of synergistic cooperative benefits. J. Theor. Biol. 12, 44–54. doi: 10.1016/j.jtbi.2012.07.016
Rahmandad, H., and Sterman, J. (2008). Heterogeneity and network structure in the dynamics of diffusion: comparing agent-based and differential equation models. Manage. Sci. 54, 998–1014. doi: 10.1287/mnsc.1070.0787
Rand, D. G., Greene, J. D., and Nowak, M. A. (2012). Spontaneous giving and calculated greed. Nature 489, 427–430. doi: 10.1038/nature11467
Razmerita, L., Kirchner, K., and Nielsen, P. (2016). What factors influence knowledge sharing in organizations? A social dilemma perspective of social media communication. J. Knowl. Manag. 20, 1225–1246. doi: 10.1108/JKM-03-2016-0112
Rychlowska, M., van der Schalk, J., and Manstead, A. S. (2022). An epidemic context elicits more prosocial decision-making in an intergroup social dilemma. Sci. Rep. 12:18974. doi: 10.1038/s41598-022-22187-z
Schosser, J. (2022). Fairness in the use of limited resources during a pandemic. PLoS ONE 17:e0270022. doi: 10.1371/journal.pone.0270022
Siegenfeld, A. F., and Bar-Yam, Y. (2020). An introduction to complex systems science and its applications. Complexity 2020, 1–16. doi: 10.1155/2020/6105872
Sitkin, S. B., and Bies, R. J. (1993). Social accounts in conflict situations: Using explanations to manage conflict. Hum. Relat. 46, 349–370. doi: 10.1177/001872679304600303
Soros, G. (2013). Fallibility, reflexivity, and the human uncertainty principle. J. Econ. Methodol. 20, 309–329. doi: 10.1080/1350178X.2013.859415
Squazzoni, F., Polhill, J. G., Edmonds, B., Ahrweiler, P., Antosz, P., Scholz, G., et al. (2020). Computational models that matter during a global pandemic outbreak: a call to action. J. Artif. Soc. Soc. Simul. 23:10. doi: 10.18564/jasss.4298
Tanimoto, J. (2021). Sociophysics Approach to Epidemics, Volume 23. Cham: Springer. doi: 10.1007/978-981-33-6481-3
Tanimoto, J., and Tanimoto, J. (2018). “Social dilemma analysis of the spread of infectious disease," in Evolutionary Games with Sociophysics: Analysis of Traffic Flow and Epidemics, ed. Jun Tanimoto (Cham: Springer), 155–216. doi: 10.1007/978-981-13-2769-8_4
Valentinov, V., and Chatalova, L. (2016). Institutional economics and social dilemmas: a systems theory perspective. Syst. Res. Behav. Sci. 33, 138–149. doi: 10.1002/sres.2327
Van Lange, P. A., Joireman, J., Parks, C. D., and Van Dijk, E. (2013). The psychology of social dilemmas: a review. Organ. Behav. Hum. Decis. Process. 120, 125–141. doi: 10.1016/j.obhdp.2012.11.003
Weber, J. M., Kopelman, S., and Messick, D. M. (2004). A conceptual review of decision making in social dilemmas: applying a logic of appropriateness. Pers. Soc. Psychol. Rev. 8, 281–307. doi: 10.1207/s15327957pspr0803_4
Wei, Y., Lin, Y., and Wu, B. (2019). Vaccination dilemma on an evolving social network. J. Theor. Biol. 483:109978. doi: 10.1016/j.jtbi.2019.08.009
Keywords: agent-based modeling, El Farol Bar problem, social dilemma, epidemiological modeling, simulation, computational social science
Citation: Bertolotti F, Kadera N, Pasquino L and Mari L (2025) An epidemiological extension of the El Farol Bar problem. Front. Big Data 8:1519369. doi: 10.3389/fdata.2025.1519369
Received: 29 October 2024; Accepted: 10 February 2025;
Published: 26 February 2025.
Edited by:
Alessandro Bria, University of Cassino, ItalyReviewed by:
César García-Díaz, Pontifical Javeriana University, ColombiaCopyright © 2025 Bertolotti, Kadera, Pasquino and Mari. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Francesco Bertolotti, ZmJlcnRvbG90dGlAbGl1Yy5pdA==
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
Research integrity at Frontiers
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.