1 Introduction

The El-Farol Bar (hereafter, EFB) problem or the congestion problem, initiated by [1], has been regarded as a classic model for the study of the allocation or the use of public resources, particularly when central or top–down coordination is not available. Through the modeling and simulation of the EFB problem, one hopes to have a general understanding of when and how a good coordination can emerge from the bottom up. While over the last two decades various agent-based models have been proposed to address the EFB problem, most of them have been concerned with the overuse (congestion) or the underuse (idleness) of public resources. Efficiency certainly is one important concern of the coordination problem, but it is not the only one. The one concern missing in the literature is equity or fairness; after all, public resources belong to all members of a community, not just a few of them.

Chen and Gostoli [2] reformulate the original one-dimensional EFB problem into a two-dimensional one; hence, both efficiency and equity have been taken into account in evaluating the emerging bottom–up coordination. In their study, it is found that the social network plays an important role for as an efficient means of coordination, i.e., an outcome with neither idleness nor congestion. However, many of these efficient outcomes are not equitable, so that the public resource is not equally shared by all community members. A typical example is the emergence of two clusters of agents; one always goes to the bar, and one never goes to the bar, a familiar phenomenon known as social segregation or exclusion. They, nonetheless, found that if some agents can be endowed with a kind of social preference, then both efficient and equitable outcomes become likely. Specifically, they studied two kinds of social preferences, namely, the inequity-aversion preference and the KUJ (standing for ‘Keeping-up-with-the-Joneses’) preference. They found that, as long as a proportion of the community members has these kinds of social preferences, then the convergence to the equilibrium which is both efficient and equitable is guaranteed. They refer to this outcome as the ‘good-society’ equilibrium.

While the result of the emergence of the good-society equilibrium is profound, this result has not been examined thoroughly, considering the inherent complexity of the model. Chen and Gostoli [2] were aware that their agent-based model may be closely related to cellular automata [7] in that a set of simple rules employed by agents can generate a large variety of outcomes. However, their original purpose was simply to demonstrate that the proposed model has promising features which deserve further analysis, rather than to provide a full analysis of the model. Hence, their simulation is limited to a single set of parameters, for example, a single fixed number of agents, a single fixed value for the size of the neighborhood, and a single fixed value of the memory of agents. In this paper, we attempt to move one step forward and to engage in an in-depth exploration of the results found in the earlier work, in particular, the emergence of the good-society equilibrium.

More precisely, we shall examine how sensitive the good-society result is with respect to the change in the following three parameters: network size (number of agents), neighborhood size (number of connections or neighbors), and memory size (length of memory on which the decision is based). By choosing these three, we do not exclude the significance of other parameters; nonetheless, the three considered by us are all related to size. Therefore, at this stage of the analysis, we want to have a focus on size, and leave other non-size parameters to future analysis.

As a matter of fact, the role of these three size-related parameters in sensitivity analysis has already received much attention in the agent-based literature. First, for the number of agents, we are aware that some simulation results are not size-free or cannot be scaled-up. This property is already well-known in agent-based computational economics [6]. Second, the number of neighbors or the range of interactions can also matter because that could affect the flow and the spread of the information [5]. Third, the memory capacity has constantly been regarded as an important parameter in various models of learning and has been operated in different ways. In our model, it determines how frequently a strategy will be evaluated and hence has an effect on the speed of learning. The relevance of speed learning is also referred to in the literature [3, 4]. Therefore, in this paper, we shall begin our sensitivity analysis with these three parameters.

The rest of the paper is organized as follows. In Sect. 2, we shall provide a review of the agent-based model of EFB games proposed by [2]. The sensitivity analysis of the model will then be conducted with respect to three determinants: the number of agents (the network size) in Sect. 3, the number of neighbors (the connections or the degree) in Sect. 4, and, finally, the memory size (memory capacity) in Sect. 5. The simulation results will be comprehensively discussed in Sect. 6, and followed by the concluding remarks in Sect. 7.

2 The agent-based model of the El Farol Bar game

2.1 Network-based decisions

As in the original El Farol Bar problem, we consider a population composed of N agents and set the bar attendance threshold \(B/N=\alpha\). Each agent can ‘see’ the actions, the strategies and the strategic performances of his neighbors, which are determined by the given social network. The network topology applied in this paper is the von Neumann network (von Neumann neighborhood), with the agents occupying a cell in a bi-dimensional grid covering the surface of a torus. The agent is connected to four neighbors, denoted by N1, N2, N3 and N4.

Each agent is assigned, at the beginning of the simulation, only one strategy z, randomly chosen from the whole strategy space. Our representation of the strategy is based on the binary string as normally used in cellular automata. The idea is that each agent will first look at what his R neighbors did in the previous period and only then decide what he will do in the current period, i.e., a mapping from the neighbors’ previous decisions to his current decision. Denote the action “going to the bar” by 1 and “staying at home” by 0. Then there are \(2^{R}\) possible states, each corresponding to one combination of the decision “1” or “0” made by the R neighbors. Each strategy is composed of \(2^{R}\) rules specifying the action D the agent has to take in the current period, one rule for each state. If \(R=4\), each strategy can be represented by a 16(\(2^{4})\)-bit long string. If we fix the numbering order of the 16 (\(2^{4}\)) states, then the corresponding 16-bit representation for the strategy exemplified there is simply, for example, “0010001110101110”, i.e., an array of the decisions corresponding to each of the sixteen states, respectively. Altogether, there are \(2^{2^{R}}\) possible strategies in the strategy space.

We define the variable \(d_{i}(t)\) as the action taken by agent i in period t: it takes the value 1 if the agent goes to the bar and the value 0 otherwise. Moreover, we define the variable \(s_{i}(t)\) as the outcome of agent i’s decision in period t: it takes the value 1 if the agent made the right decision (that is, if he went to the bar and the bar was not crowded or if he stayed at home and the bar was too crowded) and it takes the value 0 if the agent made the wrong decision (that is, if he went to the bar and the bar was too crowded or if he stayed at home and the bar was not crowded). The agents are endowed with a memory of length m. This means that they store in two vectors, \(\mathbf d\) and \(\mathbf s\) of length m, the last m values of d and s, respectively. So, at the end of any given period t, agent i’s vectors \(\mathbf d_{i}\) and \(\mathbf s_{i}\), are composed, respectively, of \(d_{i}(t),d_{i}(t-1),\ldots ,d_{i}(t+1-m)\), and of \(s_{i}(t),s_{i}(t-1),\ldots ,s_{i}(t+1-m)\).

Agent i’s attendance frequency over the most recent m periods, \(a_{i}\), is defined by (1):

$$\begin{aligned} a_{i} = \frac{1}{m}\sum \limits _{j=t+1-m}^{t}d_{i}(j). \end{aligned}$$
(1)

The attendance frequency’s value can go from 1, if the agent always went to the bar, to 0, if the agent never went to the bar, in the last m periods. Moreover, agent i’s decision accuracy rate, \(f_{i}\), is given by (2):

$$\begin{aligned} f_{i} = \frac{1}{m}\sum \limits _{j=t+1-m}^{t}s_{i}(j). \end{aligned}$$
(2)

The decision accuracy rate can go from 1, if the agent always made the right decision, to 0, if the agent always made the wrong decision, in the last m periods. We define the duration of agent i’s current strategy (the number of periods the agent is using his current strategy) as \(r_{i}\). In order for the average attendance and the decision accuracy associated with any strategy to be computed, it has to be adopted for a number of periods equal to the agents’ memory size m: so, we can think of m as the trial period of a strategy.

Agents in our model may have an inequity-aversion preference, which is characterized by a parameter called the minimum attendance threshold, denoted by \(\alpha _{i}\), that is, a fair share of the access to the pubic resources or a fair attendance frequency expected by the agent. It can take any value from 0, if the agents do not care about their attendance frequency, to \(\alpha\). We do not consider a higher value than \(\alpha\) because these agents with equity concerns do not claim to go with an attendance frequency higher than the bar threshold \(\alpha\).

2.2 Learning

Differing from the traditional El Farol Bar problem setup, the agents’ strategies are not fixed, but they evolve through both social learning (imitation) and individual learning (mutation). So, the social network plays a role both in the agents’ decision process, allowing the agents to gather information regarding their neighbors’ choices, and, in the agents’ learning process, allowing the agents to imitate their neighbors’ strategies. In any given period, an agent i imitates the strategy of one of his neighbors if the following six conditions are met:

  1. (a)

    \(f_{i} < 1\) and/or \(a_{i} < \alpha _{i}\)

  2. (b)

    \(r_{i} \ge m_{i}\)

and the agent has at least one neighbor j for which the following conditions are verified:

  1. (c)

    \(f_{j} > f_{i}\)

  2. (d)

    \(a_{j} \ge \alpha _{i}\)

  3. (e)

    \(r_{j} \ge m_{j}\)

  4. (f)

    \(z_{j} \ne z_{i}\)

Condition (a) is quite obvious. It simply states that the agent will have the tendency to imitate if he is not satisfied with his current situation (strategy). There are two possibilities which may cause this dissatisfaction. First, there are errors in his decision (\(f_{i} < 1\)) so that there is room for an improvement, and, second, he is not satisfied with his attendance frequency (\(a_{i} < \alpha _{i}\)). Notice that, by this later qualification, the agent may still look for change even though all his decisions are accurate (\(f_{i} = 1\)). Condition (b) shows that the agent will not change his strategy frequently and will consider doing so only if the strategy has been tested long enough, i.e., after or upon the completion of the trial period with a given duration of \(m_{i}\).

When imitating neighbors, agent i will only consider those strategies which not only lead to more accurate outcomes, but also lead to a satisfactory attendance frequency [Conditions (c) and (d)]. The above promising strategy should be based on long testing, with a duration of \(m_{j}\) periods, rather than sheer luck [Condition (e)]. Finally, agent i will not imitate the same strategy which he is currently using. Condition (f) is to avoid this repetition.

If the first two conditions are met but at least one of the last four is not, or, alternatively put, if the agent has not yet reached the optimal strategy and in the current period he cannot imitate any of his neighbors, then the agent, with a probability p (\(p< < 1\)), will mutate a randomly chosen rule on its strategy while with probability \(1-p\) he will keep using his present strategy. While the imitation process ensures that the most successful strategies are spread among the population, the mutation process ensures that new, eventually better, strategies are introduced over time. Once the agent has adopted a new strategy (either through imitation or mutation) he will reset his memory to zero and will start keeping track of the new strategy’s fitness. The agent stops both the imitation and the mutation processes if the following two conditions are met:

  1. (a)

    \(f_{i} = 1\)

  2. (b)

    \(a_{i} \ge \alpha _{i}\)

When these two conditions are verified for all the agents, the system reaches the equilibrium: no further change in the agents’ behavior takes place after this point as the agents always make the right decision and go to the bar with a satisfying attendance frequency.

2.3 Social preferences

Some agents are assumed to have a kind of social preference. For these agents, they expect a minimum bar attendance frequency, and, if their actual attendance is below the threshold, they will find a way to change their original decision rule. Agents who do not have such a kind of social preference do not care about their attendance frequency. For them, the same learning mechanism applies but with the minimum attendance threshold set to 0 (\(\alpha _{i}=0\)). Accordingly, these agents without such a kind of social preference decide whether or not to imitate their neighbors only on the basis of the strategies’ accuracy rates.

For those agents who are endowed with social preferences, we further consider two kinds: the inequity-averse agents and the KUJ (‘keeping-up-with-the-Joneses’) agents. For the inequity-average agents, we assume that their minimum bar attendance frequency is exogenously given as \(\alpha\). For the KUJ agents, their expected minimum bar attendance frequency is determined endogenously and socially in a ‘keeping-up-with-the-Joneses’ manner; they will find their own reference based on the attendance frequency averaged over their neighbors, and use that as their own minimum attendance threshold. In other words, the agents characterized by the ‘keeping-up-with-the-Joneses’ behavior do not, among those in their neighborhood, want to be those going to the bar with a frequency lower than the average. Since neighbors’ attendance frequencies change over time, this threshold, unlike the previous exogenous setting, is no longer fixed. The number of the inequity-averse agents and the number of the KUJ agents are denoted by the parameters \(N_{\alpha }\) and \(N_{KUJ}\), respectively.

2.4 Simulation settings

We conduct a sensitivity analysis of the above agent-based model with three different considerations, coded as Series A, B, and C. They are summarized in Table 1. Each of these three series has one focused parameter to explore; it is the number of agents (N) for series A, the number of neighbors (R) for Series B, and the length of memory window (m) for Series C.

Table 1 Simulation designs and tableau of control parameters

3 Number of agents

3.1 Does size matter?

The sensitivity analysis of N needs to be addressed at three different levels: efficiency, distribution of equilibria, and the emergence of the good society (1C equilibrium). First, the result with regard to the perfect coordination (efficiency) is robust. For each N in Design A1, Table 1, out of all the 1000 simulations, we always have the perfectly coordinated outcomes in the sense that the attendance rate is equal to the bar’s threshold. In these simulations the society always segregates into different numbers of clusters of agents (from one to eight, as shown in Fig. 1), who self-organize themselves well in their bar attendance schedule and frequency. Second, while the exact histogram will have some mild changes with respect to different numbers of agents, equilibria with lower numbers of clusters constantly play a major role in the histogram, in particular, the dominant 2C equilibria. Hence, this topography of the histogram is also robust to the number of agents.

Third, what is not robust is the chance of having the 1C (good-society) equilibrium. It is well noted that the chance of observing the 1C equilibrium declines with the number of agents. It becomes increasingly difficult to achieve the 1C equilibrium when the population of agents becomes larger; for example, when \(N=225\) or 400, none of the 1000 runs is able to converge to the 1C equilibrium, indicating that the core result, the emergence of the good-society equilibrium, is not size independent and the coordination efforts required for achieving the good-society equilibrium may depend on the number of agents.

Fig. 1
figure 1

Histogram of the C equilibria with respect to different numbers of agents. The figure above gives the histogram of the C equilibria with N (number of agents) = 25, 100, 225, and 400, respectively. They are separated by different colors, which, starting from the left to the right, are black (\(N=25\)), light grey (\(N=100\)), dark grey (\(N=225\)), and black again (\(N=400\)). The x-axis gives the number of clusters in the equilibrium (C), and the y-axis gives the corresponding frequency

3.2 Social preferences: No longer works?

Regardless of its sensitivity to the number of agents, the ‘good society’ will not always emerge even though the numbers of agents is small. Therefore, the most profound finding of [2] is that when there is a sufficient number of agents, who expect to keep a minimum bar attendance which is socially determined, then the ‘good society’ will always emerge. They considered two such kinds of social preferences, namely, inequity aversion and ‘keeping-up-with-Joneses’ (KUJ), and found that as long as there is a proportion of agents, say, 20–30 %, who have inequity-aversion preference or have the KUJ preference, one can always have the 1C equilibrium. It is, therefore, interesting to know whether this result is also sensitive to the number of agents.

We, therefore, conducted another two series of simulations, Designs A2 and A3 (Table 1), involving different numbers of agents with these traits, one series for the inequity-averse agents (A2) and one series for the KUJ agents (A3). Figure 2 shows the effect of the presence of the inequity-averse agents on the emergence of the 1C equilibrium and other types of efficiency outcomes. Here, we find some new patterns which we have not seen before. First, unlike what was found in [2], the presence of the inequity-averse agents totally fails to result in any convergence to the 1C equilibrium when the network size is large (\(N=225\)). Second, although there is still a chance of achieving other perfectly-coordinated (many-C) equilibria, this chance also declines with the number of inequity-averse agents. The red curve in the figure indicates that that chance starts with 80 % out of all 100 runs when \(N_{\alpha , 0.6}\) is low, but completely disappears when \(N_{\alpha , 0.6}\) is high. Third, the blue curve further shows that when \(N_{\alpha , 0.6}\) is higher up to a point, the chance of having perfect coordination (the efficient outcome) also disappears. Hence, both equity and efficiency are ‘impossible’ to achieve, and the presence of the inequity-averse agents can actually have an adverse effect on the coordination of the use of public resources.

Fig. 2
figure 2

Frequencies of various C equilibria under different numbers of inequity-averse agents. The three lines above show the frequency of 2C equilibria (the red line), 3C equilibria (the green line), and all C equilibria (the blue line) with respect to different numbers of inequity-averse agents (\(N_{\alpha , 0.6}=1,2,\ldots ,22\)) when the network size is 225 (\(N=225\)). The frequencies are calculated based on the result of 100 runs for each value of \(N_{\alpha , 0.6}\) (color figure online)

Therefore, what is interesting in that it is found here is that the presence of agents with social preferences has a totally different effect, depending on the size. When the size is small (\(N=100\)), in addition to perfect coordination, their presence strongly facilitates the emergence of the good-society equilibrium; however, when the size becomes large (\(N=225\)), the presence of them can even prevent any possible perfect coordination.

3.3 Social preferences: further explorations

The reason we choose \(N=25\), 100, 225, and 400 is because these Ns can work well with the original bar threshold, i.e., 0.6, given by Arthur [1]. In fact, in order for the 1C equilibrium to emerge, the multiplication of N and the threshold (\(\alpha\)) must be an integer. The four aforementioned Ns are all satisfied with this requirement (they, multiplied by 0.6, become 15, 60, 135, and 240, respectively). However, the threshold 0.6 does not work with many other Ns, such as \(N=36\), 64, 144, 196. If we also want to extend our sensitivity analysis to these numbers, then we have to change a threshold, and a good candidate is the threshold used in the minority game, i.e., 0.5.

This compromise to a different bar threshold allows us to explore a larger variety of network sizes, and can further explore the effect of the presence of agents with social preferences. Of course, this may imply that we may no longer be able to compare our results with the previous findings based on \(\alpha =0.6\). The best that we can do is to ditto the case of \(N=100\) using the new threshold, 0.5. Hence, by setting \(\alpha =0.5\), we, therefore, run another series of simulations for \(N= 36, 64, 144, 196\), in addition to \(N=100\) (Designs A4 and A5, Table 1). The results are summarized in Fig. 3.

Fig. 3
figure 3

Social preferences and the number of agents. The two panels above show the frequency of the emergence of the good-society equilibrium when certain proportions of the agents are the inequity-averse type (the left panel) or the KUJ (keeping-up-with-the-Joneses) type (the right panel). In each panel, from left to right, we consider the proportions of these agents from 0 to 40 %, at an increment of 5 %, as shown on the x-axis. The five bars associated with each proportion is the empirical distribution of the emergence of the 1C equilibrium under the five different network sizes (Ns): 36, 64, 100, 144, and 196; they are distinguished by different degrees of greyness. The empirical distribution is derived based on 100 runs for each parameter setting

The results are not entirely what we expect: here, the effect of the presence of the agents with social preferences seems to be quite robust to the network size. It shows that the likelihood of the emergence of the good-society equilibrium consistently increases with the number of either the inequity-averse agents (Fig. 3, upper panel) or the KUJ agents (Fig. 3, lower panel). This increasing tendency is independent of the network size; specifically, when the network size comes to 196 (\(14 \times 14\)), i.e., very close to the case of 225 (\(15 \times 15\)), this tendency remains valid. Hence, the conclusion that, under a large network, social preferences fail to promote the emergence of the good-society equilibrium, as seemingly suggested in Sect. 3.2, needs to be qualified. Here, the additional parameter which can contribute to the complexity of network behavior and make a general result hard to obtain, is the bar threshold (\(\alpha\)), a parameter largely ignored in the literature.

3.4 Bar thresholds

The results from the simulation series A4 and A5 indicate that the reason we fail to reach the 1C equilibrium (within 1 million periods), say, in the case of \(N=225\), but can reach it in the case of \(N=196\), is related to the different threshold used in these cases. It seems much more difficult to reach the 1C equilibrium with a threshold of 0.6 than to reach it with a threshold of 0.5. This conjecture is confirmed by the simulation series A6 and A7 (Table 1), where we perform with an N of \(20\times 20\). The simulation results of A6 and A7 show that the society has a high probability of reaching the 1C equilibrium with a threshold of 0.5 (Fig. 4).

Fig. 4
figure 4

Effects of the number of agents. The three lines above show the frequency of the 1C equilibrium (the blue line), 2C equilibria (the red line), and 3C equilibria (the green line) with respect to different percentages of inequity-averse agents (the left panel) and KUJ agents (the right panel), from 1 to 25 % at an increment of 1 %, when the network size is 400 (\(N=400\)). The frequencies are calculated based on the result of 100 runs for each percentage (color figure online)

4 Number of neighbors

The simulation of Series B (B1–B3, Table 1) concerns the effect of the number of neighbors (R). Figure 5 shows the simulation results of Series B1. We can see that there is little qualitative effect of changing the neighborhood size. It has no effect on the efficient outcome. All runs lead to perfect coordination, although with different numbers of clusters. The many-cluster equilibria have a mild tendency to increase with the neighborhood size. For example, with a neighborhood size of 5, the likelihood of reaching an equilibrium with more than three clusters becomes 20 %. Nevertheless, the 2C equilibria, irrespective of the number of neighbors, remain the major type.

Series B2 and B3 test the sensitivity of the coordination effect of social preferences. Chen and Gostoli [2] have shown that increasing the number of agents with social preferences ensure eventually the emergence of the good-society (1C) equilibrium. This property has been extensively examined in Series A. This result seems to be robust to the perturbation of neighborhood size when N is fixed at 100. As we can see from Fig. 6, increasing the number of neighbors (from 3 to 5) does not change the increasing frequency of having 1C equilibria with the increase in \(N_{\alpha , 0.6}\) (upper left panel) and \(N_{KUJ}\) (upper right panel).

Fig. 5
figure 5

Effects of the number of neighbors. The figure above gives the histogram of the C equilibria with respect to R (number of neighbors) being 3, 4, and 5, respectively. They are distinguished by different colors: black (\(R=3\)), light grey (\(R=4\)), and dark grey (\(R=5\)). The x-axis gives the number of clusters in the equilibrium (C), and the y-axis gives the corresponding frequency

However, the number of times the system reaches any equilibrium within the first 1 million periods is influenced by the number of neighbors. In particular, while for a low number of inequity-averse agents (below 10) the system always reaches the equilibrium (within the first 1 million periods), as we increase the number of inequity-averse agents it takes increasingly more periods to reach the equilibrium and in some cases the system does not reach it within the first 1 million periods (when the simulation is halted for practical reasons). The negative effect of this intermediate number of inequity-averse agents is stronger as we move from 3 neighbors to 5 neighbors. For example, as shown in Fig. 6 (the lower left panel), with a number of 18 inequity-averse agents in the population the system reaches the equilibrium, in the first 1 million periods, in just 70 out of the 100 runs (and of these 56, i.e., 80 %, are 1C equilibria, as shown in the upper left panel of Fig. 6).

Fig. 6
figure 6

Good society, neighborhood size, and social preferences. The three lines in the upper left panel show the frequency of achieving the 1C equilibrium when \(N_{\alpha , 0.6}\) increases from 1 to 40 under three different neighborhood sizes: R=3 (blue line), 4 (red), and 5 (green). The three lines in the upper right panel show the same frequency except that \(N_{\alpha , 0.6}\) on the x-axis is replaced with \(N_{KUJ}\). Notice that the frequency is based on the runs which have converging results, and not all runs lead to convergence. The bottom left (right) panel gives the number of converging runs under same parameter setting of the upper left (right) one (color figure online)

5 Memory capacity

Length of memory (m) is another key parameter in the EFB system. Figure 7 shows the result of simulation C1. Two features stand out. First, both a small and a large value of m (\(m=5, 20\)) will lessen the chance of observing the 1C equilibrium. Hence, a length of memory, neither too long nor too short, can contribute to the emergence of the good-society equilibrium. Second, while a short memory length contributes little to the 1C equilibrium, it does contribute to the occurrence of the many-cluster equilibria. When \(m=5\), the chance of having 3C equilibria is more than 20 %, and even for 6C equilibria the chance remains as high as 10 %. Such a large probability of observing the many-cluster equilibria is not seen in our other simulations. In other words, short memory is the only parameter found thus far which can cause a highly segregated society. Despite these inequitable results, like the other parameters (N and R), m has no effect on the efficiency results. The perfect coordination result can always be achieved, regardless of the values of m.

As we did in Series B2 and B3, we also test the significance of the presence of agents with social preferences in Series C2 and C3. The result is shown in Fig. 8 (upper panels). Basically, we can see that changes in the length of memory have a rather limited effect; when \(N_{\alpha , 0.6}\) and \(N_{KUJ}\) increase up a size of around 25, the emergence of the 1C equilibrium is almost certain. However, as experienced in Series B2 and B3, not all runs can converge in 1 million periods (lower left and right panels).

Fig. 7
figure 7

Effects of the memory capacity. The figure above gives the histogram of the C equilibria with respect to m (memory capacity or size of memory) = 5, 10, and 15, respectively. The equilibria are distinguished by different colors: black (\(m=5\)), light grey (\(m=10\)), and dark grey (\(m=15\)). The x-axis gives the number of clusters in the equilibrium (C), and the y-axis gives the corresponding frequency

Fig. 8
figure 8

Good society, length of memory, and social preferences. The three lines in the upper left panel show the frequency of achieving the 1C equilibrium when \(N_{\alpha , 0.6}\) increases from 1 to 40 under three different lengths of memory: \(m=5\) (blue line), 10 (red), and 20 (green). The three lines in the upper right panel show the same frequency except that \(N_{\alpha , 0.6}\) on the x-axis is replaced with \(N_{KUJ}\). Notice that the frequency is based on the runs which have a convergence result, and not all runs lead to convergence. The bottom left (right) panel gives the number of convergence runs under the same parameter setting as the upper left (right) one (color figure online)

6 Discussions

The El Farol Bar problem has long been taken as a standard theoretical environment to study the use and the distribution of public resources. The agent-based model is an appropriate representation of the problem. Through the agent-based model or its connection to cellular automata, one can see its inherent complexity, indicating a great variety of possible outcomes or equilibria. From both the efficiency and equity viewpoint, Chen and Gostoli [2] classify the perfectly coordinated equilibria into two basic types, and consider the good society equilibrium (the 1C equilibrium) as the most ‘interesting’ one. Two results have been established in their study: first, this equilibrium can occur probabilistically under a suitable network topology; second, the presence of some agents with social preferences can cause a dramatic change, i.e., this equilibrium is assured.

In this study we carry out a sensitivity analysis of these two fundamental results with three size-related parameters. Alternatives to the good society equilibrium are equilibria with different numbers of clusters. Regardless of the number, all these clustering equilibria indicate that public resources are not equally shared by all community members. Hence, some members dominate in regard to the use of these resources, but some are excluded. The most striking example consists of the 2C (two-cluster) equilibria. In this study, we find that the appearance of the 2C equilibria is rather robust. They dominate other types of equilibria in all settings of parameters. The only exception occurs when the network size is small (\(N=25\)). Hence, these series of simulations (A1, B1, and C1) altogether indicate that, except in a small community, inequity seems to be an inevitable outcome. The good society can happen only occasionally (probabilistically), and the chance becomes zero when the network size is large (\(N=225, 400\)). The first conclusion established by Chen and Gostoli [2], therefore, remains quite robust to almost all size-related parameters. The only qualification which we add is that the good society equilibrium is most likely to be a small-community property, and exists only there.

It is with this baseline result one can acknowledge the presence of agents with social preferences. The rest of the simulation series (A2–A7, B2–B3, and C2–C3) indicates that social preferences can facilitate the emergence of the good-society (1C) equilibrium. The existence of some agents who are inequity-averse or who tend to ‘keep up with the Joneses’ actually has a social value (a positive externality). It is they who make the emergence of the good society from being an exception to being a rule. Their existence is a disturbing force to any ‘temporal equilibrium’ which is not equitable.

The inequity preference, as a psychological gadget, promotes agents to innovate (to search and to learn) and to acquire new strategies to destroy the above-mentioned ‘temporal equilibrium’, making the bar attendance go up and down, above and below the threshold (the bar capacity). This fluctuation further ‘wakes up’ those who have already given up learning and prefer to stay home, and encourages them to innovate and to learn, too (see Sect. 2.2 for the learning conditions). In other words, these inequity-averse agents ‘inspire’ those who have been completely ‘discouraged’ and have ‘rested’. This on-and-on process changes the stability of the inequitable equilibria (the many-C equilibria, specifically, the 2C equilibria) and re-shapes a large domain of attraction to the good-society equilibrium. Our sensitivity analysis hence shows again that this effect of social preferences is also robust to the change in the size-related parameters.

Nonetheless, as we have seen in a number of scenarios, this on-and-on reshuffling process may go indefinitely long, causing slow convergence or non-convergence. When this happens, the perfect coordination to the ELB problem fails in ‘limited’ time. From Figs. 6 and 8 (lower panels), we have found that this slow convergence or non-convergence property is related to the number of the inequity-averse agents or the number of the KUJ agents in a V-shaped manner, indicating that it happens only when the number of the agents with social preferences is neither sufficiently small nor sufficiently large. As long as we have a sufficiently large number of agents with social preferences the basic results on the convergence to the good-society equilibrium remain unchanged.

7 Concluding remarks

We have long been inquiring of the role of government or the role of central (top–down) intervention and regulation. Is it possible to leave citizens themselves to coordinate and solve an ELB-like problem purely from individual actions, not even making an attempt to form an alliance or union? Can the purely individual actions alone bring in a change for the society? Can the good society emerge under an extremely minimal degree of coordination?

Of course, while the simulation presented in this paper can teach us a lot, it is not equivalent to presenting a formal proof. Therefore, one can always ask how far we can push further and generalize the finding. This is certainly an open-ended question. Generally speaking, we believe that the El Farol Bar problem as a theoretical environment for the study of the coordination problem and as a complex adaptive system can be used to demonstrate how the coordination problem can sometimes be solvable and sometimes be unsolvable. Due to its complexity, a device which Chen and Gostoli [2] have found in a limited study may work in some extensions, but fail in others. As a whole, how social networks coupled with social preferences can facilitate the coordination of the EFB problem remains an interesting and challenging subject for further research.