Keywords

1 Introduction

One of the common problems in distributed systems is to establish a kind of distributed coordination among competing players in accessing a limited resource [1, 2]. In absence of a central coordinator, different players have to establish a coordination mechanism to optimize resource usage by avoiding excessive accesses or leaving the resource underused. In systems with unknown players or in cases where the players do not know each other, the coordination problem has to be addressed without communication among the participants. That is, the players are not able to communicate with each other to share their previous history of accessing the resource or their intentions. The El Farol Bar [3] and minority games [4] (which are inspired by El Farol Bar Problem) are the games that try to address the problem of coordinating a set of selfish players to regulate cooperation in accessing a resource in the absence of communications. The lack of a suitable coordination mechanism may result in congestion, starvation, or degradation in social and individual utilities of the players.

The classic El Farol Bar Problem [3] happens in Santa Fe city, where every Thursday one hundred citizens (agents) have to decide whether to attend the city bar or not. The bar has a limited capacity (60 seats). If the attendees are more than the capacity, no one will have a pleasant time. Therefore, each agent thinks of the bar situation before making a decision. He will go to the bar if he thinks that the bar is not crowded. Otherwise, he would prefer to stay at home. The individual utility of an agent for each iteration (week) is the result of his decision. If he stays at home, the value of his individual utility is equal to zero. If he decides to go to the bar and the bar was over-crowded, he will receive \(-1\). Otherwise, he will get \(+1\) for his individual utility in that iteration. The social utility of the city for an iteration is the sum of the individual utilities of all agents. The challenging issue is that agents cannot communicate before making their decisions. In other words, no one is aware of the bar’s condition before going to the bar. Moreover, there is no central coordination controller.

The main objective of any candidate solution is to converge the number of attendees to the bar capacity. Consequently, the system will achieve the highest social utility. An alternative goal is to decrease the convergence time, which yields the maximization of the total social utility (sum of social utilities for all of the iterations). Another important factor is to increase individual utility, which implies that all agents benefit from the resource fairly. Finally, the starvation of agents is the last evaluation metric that illustrates the fairness level in smaller time units for the resource distribution among agents. For instance, it is possible to have a high individual utility for most agents, but a minority of them do not have any access to the resource for a long period of time. To analyze the metric, the maximum starvation length of agents has to be monitored.

Some research concentrates on providing solutions for the generic El Farol problem. They can be classified into several categories [5]. One category of researches is named predictor based [3, 6, 7]. These solutions have a top-down view, and the decision-making process is performed by predicting the aggregated system behavior. In another category of the solutions [8,9,10,11], the agent’s individual information is in the center of attention. These solutions have a bottom-up view of the problem. The analyses reveal several drawbacks. Firstly, the level of being over-crowded does not have a significant effect on the decision-making process. For instance, in iteration x, twenty persons above the bar capacity wanted to attend, and in iteration y only one extra attendee intended to join the bar. The level of being over-crowded in iteration x is different from iteration y, but both cases are treated the same. Secondly, studies such as [3] are that the optimization of individual utility is not considered as the objectives. Similarly, minimizing the starvation length is not addressed in [3, 6,7,8,9]. Finally, in some of the methods such as [10, 11], the scalability in terms of the number of agents is an issue.

In this paper, we devise a new approach, called Social Coordination (SoCo) that uses a bottom-up view. To differentiate the impact of the previous iterations in terms of the level of being over-crowded, it uses a second dimension and defines a new function called \( Effect (t)\). The function returns the coefficient (impact) of iteration t that discriminates the over-crowded situations from each other as well as the under-crowded ones. We also define a new coordination factor that defines the optimum limit of attendance for an agent according to the bar’s condition and its capacity. The factor is called \(C_a\) and defines the social coordination among agents to maintain the optimum number of attendance and it is calculated according to the history of agent’s experiences. It leads to the distribution of resource among agents in a balanced manner. Finally, in SoCo, the decision strategies are designed in a way that hinders the starvation.

The rest of the paper is organized as follows: In Sect. 2, we review some of the outstanding work. Section 3 is dedicated to the problem definition. Then, the details of SoCo are explained, and the performance is analyzed in Sects. 4 and 5, respectively. Finally, Sect. 6 concludes the paper.

2 Related Work

Several researchers studied the El Farol Bar Problem due to its capabilities in modeling real-world applications. Some of the studies concentrated on addressing the classic problem, while others employ it in applications. This section briefly reviews some of the distinguished researches.

The El Farol Bar Problem was introduced by Arthur et al. in [3] for the first time. In his paper, the behavior of agents is considered in a complex system with limited decision-making information. It is explained that deductive reasoning is not sufficient, and inductive reasoning can be used in such an environment. The decision-making is performed using predictors such as “same as last week” and “an average of four recent weeks”. Then, the system uses the predictors for inductive reasoning and estimates the number of agents, which go to the bar. The goal is to converge the number of attendees to the bar capacity. The shortcomings of the solution are that it does not consider minimizing agent starvation and maximizing individual utility.

The agent starvation is investigated in the Adaptive Parasitized approach [9]. The idea is to add behaviosit to alter the behavior of the agent. The main objective of the behaviosit is to decrease the attending period of an agent, which intends to go to the bar in the far future. That is if the attending period of an agent is above a predefined threshold, the behaviosit is added, and consequently, the attending period starts to decrease. This leads to the mitigation of the starvation problem in accessing the bar. Similar to the Adaptive method [8], the Adaptive Parasitized does not exploit complex predictors.

The researchers in [7] applied cognitive modeling to equip agents with human-inspired ability. The authors used the cognitive emotion theory [12, 13], which is relied on belief and desire concepts. The belief shows the level of confidence to the reliability of the strategy, and the desire represents the agent’s tendency for maintaining and operating the current strategy. In the beginning, each agent chooses a strategy randomly among the same set of strategies. The agent predicts the system situation according to the selected strategy and performs the specified action. If the action is correct, the belief will increase accordingly, and the agent keeps repeating the current strategy. Otherwise, it will decrease. If the decreased belief falls below the threshold, the agent will decide to change the current strategy. One of the interesting features of the approach is supporting the heterogeneity of agents. The authors in their next work in [14] analyze the effect of extending the memory size and did not find any clue for improvement of system performance.

Szilagyi in [15] solved the El Farol Bar Problem as a special case of the N-person battle of sexes. He modeled agents as stochastic learning cellular automata. The interacting environment of the agents is described with cellular automata, and stochastic learning rules are used for the agents’ behavior. In the described model a range of different personality profiles can be used, such as Pavlovian, stochastically predictable (angry, benevolent, and unpredictable), accountant, conformist, and greedy.

Shu-Heng et al. in [10] defined a good society equilibrium with economic efficiency and economic equality characteristics. The authors propose the probability of achieving this equilibrium by a suitable topological network and agents with social preferences. The network of agents is established using the Von Neumann Network. Additionally, agents have extrinsic or intrinsic preferences. In the first one, agents are described by the minimum attendance threshold, while in the second one the awareness of inequity is formed through interactions with neighbors by averaging the attendance frequencies of the neighbors. That is, the original El Farol Bar Problem model is changed to the bi-dimensional one, which will boost the emergence of the good society. The authors performed a sensitivity analysis of the approach in [11], and study the effects of size-related parameters such as network size (number of agents), number of each agent’s neighbors, and agent’s memory size on the equilibrium. The main drawback is that, for large networks, the chance of reaching equilibrium is low compared to small networks. For very large networks, this chance is almost zero. Moreover, the other size related parameters do not have a considerable effect on achieving the equilibrium.

Overall, the main objective in most of the studies is the optimization of resource efficiency, while the individual utility and starvation are not in the center of attention.

3 Problem Definition

In the original El Farol Bar Problem [3], a set of n agents is considered. Let A denote the set of agents and \(a_i\) be a sample one. Each agent (\(a_i\)) may tend to go to the bar every Thursday. Each week is defined by an iteration (\(E^t\)), where \(1\le t \le T\), and T is the total number iterations. Each agent has a memory that remembers his last h iterations (history). The decision of agent i at iteration t is denoted as \(d_i^t\). If the agent decides to attend the bar, the value of \(d_i^t\) is 1, otherwise, the value is 0. The bar has a limited capacity (C), and if the number of attendees at the iteration t (\(att^t\)) exceeds more than C, the bar will be over-crowded (\(att^t=\sum _{i=1}^{n}(d_i^t)>C\)). Hence, all the attending agents will have an unpleasant time and will receive a negative utility. On the other hand, when the bar is under-crowded (\(att^t=\sum _{i=1}^{n}(d_i^t) \le C\)), the visiting agent will have a pleasant time.

Definition 1:

The individual utility of an agent (\(a_i\)) at iteration t is denoted by \(r_i^t\) and is calculated according to Eq. 1.

$$\begin{aligned} r^t_i = {\left\{ \begin{array}{ll} \text {+1} &{}\quad \, att^t \le C , d_i^t=1\\ \text {0} &{}\qquad \qquad \, d_i^t=0 \\ \text {-1} &{}\quad att^t > C , d_i^t=1 \end{array}\right. } \end{aligned}$$
(1)

Definition 2:

The total individual utility (tiu) of an agent \(a_i\) is the sum of his individual utilities in every iteration (Eq. 2).

$$\begin{aligned} tiu_i = \sum _{t=1}^{T}r_i^t \end{aligned}$$
(2)

Definition 3:

The social utility (\(su^t\)) of the system at iteration t is the sum of all agents’ individual utility at that iteration (Eq. 3). The upper bound of \(su^t\) is C and the lower bound is -n (\(-n\le su^t \le C\)).

$$\begin{aligned} su^t=\sum _{i=1}^{n}r_i^t \end{aligned}$$
(3)

Definition 4:

The total social utility (tsu) is defined as the summation of the social utilities in all iterations (Eq. 4).

$$\begin{aligned} tsu=\sum _{t=1}^{T}su^t \end{aligned}$$
(4)

Definition 5:

The starvation length of an agent \(a_i\) is the maximum number of consecutive iterations in which the agent does not get any positive individual utility, and it is denoted by \(x_i\) (Eq. 5). This definition is more rigorous compared to the definition provided in [9].

$$\begin{aligned} \forall p,q: p\le t \le q, r_i^t \le 0; \exists m,n: m\le t \le n, r_i^t \le 0; | n-m \ge q-p \Rightarrow x_i=n-m \end{aligned}$$
(5)

The maximum starvation length (X) of the system is the maximum of \(x_i\) for all agents.

$$\begin{aligned} X=Max_{i=1}^{n}(x_i) \end{aligned}$$
(6)

The main constraint of the problem is that agents do not know what the other agents’ actions are for the current iteration, and the situation of the bar is not revealed before attending. Furthermore, the system does not have any central coordinating entity.

The main goal of a candidate solution is to establish a self-coordination mechanism that:

  1. 1.

    Leads the system to converge the number of attendees (\(att^t\)) to the bar capacity (C): Fast convergence toward the bar capacity results in a higher total social utility.

  2. 2.

    Maximizes the total individual utility: It is expected that the total individual utility of an agent \(a_i\) reaches a floor threshold (a specific portion of the summation of the bar capacity in all iterations). This objective is to ensure that each agent gets a fair share of the bar. The ideal value of the threshold is \(\frac{tsu}{n}\). But, practically the total individual utility is bounded by \(\frac{tsu}{n}\pm \varepsilon \) (Eq. 7). A fair approach has an \(\varepsilon \) value close to zero.

    $$\begin{aligned} \frac{tsu}{n}-\varepsilon \le tiu_i \le \frac{tsu}{n}+\varepsilon \end{aligned}$$
    (7)
  3. 3.

    Minimizes the maximum starvation length of agents: It is worth pointing out that a low starvation length will not necessarily lead to a high total individual utility. On the other hand, an agent may not attend the bar in half of the consecutive iterations but joins the bar for all the iterations of the second half. Therefore, the maximum starvation length is \(x_i= T/2\), but the total individual utility may reach above the floor threshold.

4 The Devised Social Coordination Method

We devised a two-dimensional method that uses agents’ previous experiences to make a decision about the next action. The objective of the first dimension is to differentiate the over-crowded situations from each other along with the under-crowded ones. We define the \( Effect ()\) function that considers the number of attendees for each iteration. The second dimension examines the experiences of an agent independently from other agents. We define a new parameter called social coordination constraint (\(C_a\)), which is the optimum times that an agent attends the bar in his last h iterations. In the rest of this section, the \( Effect ()\) function is introduced, then the social coordination constraint is described. Finally, the decision-making process is explained in detail.

4.1 The \( Effect ()\) Function

The effect of iteration t is defined as the subtraction of the number of attendees (\(att^t\)) from the bar capacity (\(Effect(t) = C - att^t\)). The function is used for the last h iteration to calculate the impact of previous experiences of the agent. The \( Effect ()\) value can be positive, zero, or negative for each iteration according to the following situations:

  • Under-crowded case (\(att^t<C\) \(\Rightarrow Effect(t)>0\)): The positive value indicates that the previous decision was right, and the agent tends to continue this trend. The value also indicates the number of free seats in the bar. The closer the value is to the zero, the closer the system is to the equilibrium.

  • The same number of attendees as the bar capacity (\(att^t=C\) \( \Rightarrow Effect(t)=0\)): The value of the function at iteration t is equal to zero. That is, the number of attending agents is the same as the bar capacity. This is the ideal case where the participating agents made the right decision, as they get positive individual utilities. Moreover, agents who choose to stay at home have also made a correct decision, since the bar was not under-crowded, and in case they decided to participate, the bar would be over-crowded. The value of the \( Effect ()\) function for both types of agents must be equally the same for their right decision.

  • Over-crowded case (\(att^t>C\) \(\Rightarrow Effect(t)<0\)): In the last case, the negative value implies the over-crowded situation of the bar, and shows the incorrect decision. The value presents the number of extra attendees that made the bar crowded. Hence, the agent is willing to change the decision in future iterations.

The Effect value of the agent who did not attend the bar is considered zero, regardless of the status of the bar. The main reason is to preserve the condition that an agent that stayed at home should not have any information about the over-crowded or under-crowded situation of the bar.

To show how the \( Effect ()\) function discriminates over-crowded cases as well as under-crowded ones, consider an agent \(a_i\)’s experiences in two different iterations of \(t_1\) and \(t_2\). The \(Effect(t_1)\) and \(Effect(t_2)\) have the same sign. If they both are positive (\(0<Effect(t_1)<Effect(t_2)\)), the one with lower value (\(t_1\)) will be close to equilibrium. The value of the \( Effect ()\) function illustrates the number of needed agents to complete the bar capacity. Besides, the social utility of \(t_1\) is higher, since the number of free seats is less. In the second case, if they both are negative (\(Effect(t_2)<Effect(t_1)<0\)), the one with higher value (\(t_1\)) is favored. The reason is that the \( Effect ()\) function represents the number of extra attendance. To conclude, the distance of the value from zero shows how far the system is to the equilibrium.

4.2 The Social Coordination Constraint

Potentially, the \( Effect ()\) function can be used to lead the system to equilibrium, but it does not inhibit the starvation problem. Assuming a case in which a group of agents always attend the bar and the rest of them do not try it at all is a good example. To cope with this issue, a new constraint is defined, which is called social coordination (\(C_a\)). Agents that reach \(C_a\) accesses to the bar, will abstain themselves for new access attempts to prevent possible congestions. It defines an optimum limit and a fair quota for an agent in attending the bar without facing any congestion.

The \(C_a\) is computed according to the bar capacity (C), the population of agents (n), and the history length (h). In Eq. 9, \(C_a\) is the total bar capacity during the h iterations (Eq. 8) divided by the number of agents.

$$\begin{aligned} C_h=h \times C \end{aligned}$$
(8)
$$\begin{aligned} C_a=\frac{C_h}{n}=\frac{h \times C}{n} \end{aligned}$$
(9)

4.3 Decision-Making Process

In the devised method, the decision process of an agent has a two-dimensional approach. The first dimension is the Effect value of each iteration. The second dimension is the history of an agent during the past h iterations. To combine these factors, we define a pre-decision parameter \(pd_i^t\) that denotes the pre-decision of agent \(a_i\) at iteration t. It is computed according to Eq. 10. It is worth mentioning that if an agent does not attend the bar in an iteration (\(d^\tau _i=0\)), it will not have any effect on the pre-decision parameter.

$$\begin{aligned} pd_i^t=\sum _{\tau =t-h}^{t-1}(Effect(\tau ) \times d_i^\tau ) \end{aligned}$$
(10)

In the first h iterations, agents randomly choose to join the bar or stay at home. After these setup iterations, agents select a proper strategy according to their pre-decision value. In the following, these cases are introduced.

The Negative Value of Pre-decision: The negative value of \(pd_i^t\) indicates that the over-crowded experiences dominate the pleasant ones. Thus, \(a_i\) decides to stay at home to prevent the continuity of this situation (Eq. 11).

$$\begin{aligned} \mathbf{Strategy 1: } pd_i^t <0 \Rightarrow d_i^t=0 \end{aligned}$$
(11)

The Zero Value of Pre-decision: There are two cases in which the zero value for the pre-decision parameter can be obtained. In the first case, the summation of the positive Effect values and the negative ones is zero. The case implies that neither the positive Effect values are encouraging enough to attend the bar, nor the negative Effect values are strong enough to stay at home. Therefore, \(a_i\) will decide to stay at home (Eq. 12).

$$\begin{aligned} \mathbf{Strategy 2: } (pd_i^t=0) and (\exists \tau :t-h\le \tau<t ,Effect(\tau )<0) \Rightarrow d_i^t=0 \end{aligned}$$
(12)

In the second case, all the \( Effect ()\) values of the past h iterations are zero. This is due to the prevention of the agent from going to the bar, or the equilibrium state of the bar is reached. Therefore, the agent considers the number of times that he/she attends the bar, and compares it with the social coordination constraint. If the value is below the \(C_a\) threshold, it has not benefited enough from the bar. So, he will decide to go to the bar (Eq. 13). On the other hand, if he has attended equal to or more than the \(C_a\) threshold, he will decide to stay at home to prevent further congestion (Eq. 14). In this case, \(C_a\) constraint plays a social coordination role among agents.

$$\begin{aligned} \mathbf{Strategy 3: } (pd_i^t=0) &and (\forall \tau :t-h\le \tau <t ,Effect(\tau )=0) \nonumber \\&and (\sum _{\tau =t-h}^{t} d_i^\tau \ge C_a) \Rightarrow d_i^t=0 \end{aligned}$$
(13)
$$\begin{aligned} \mathbf{Strategy 4: } (pd_i^t=0) &and (\forall \tau :t-h\le \tau<t ,Effect(\tau )=0) \nonumber \\&and (\sum _{\tau =t-h}^{t} d_i^\tau < C_a) \Rightarrow d_i^t=1 \end{aligned}$$
(14)

The Positive Value of Pre-decision: In the last case, the value of \(pd_i^t\) is positive. It indicates that the overall effects of the previous experiences are positive and the agent is encouraged to continue this trend. The main obstacle is the starvation of the other agents. To avoid the problem, the agent counts the number of times he attended the bar. If the number is below the \(C_a\), he will attend the bar (Eq. 15), otherwise, he will choose to stay at home (Eq. 16).

$$\begin{aligned} \mathbf{Strategy 5: } (pd_i^t>0) and (\sum _{\tau =t-h}^t d_i^\tau \ge C_a ) \Rightarrow d_i^t=0 \end{aligned}$$
(15)
$$\begin{aligned} \mathbf{Strategy 6: } (pd_i^t>0) and (\sum _{\tau =t-h}^t d_i^\tau < C_a ) \Rightarrow d_i^t=1 \end{aligned}$$
(16)

4.4 Discussion on the Convergence Stability

The stability of El Farol after reaching equilibrium is analyzed with an example. Table 1 exhibits five consecutive sample iterations that the system converges to an equilibrium, where each row of the table presents ten agents. Let the bar capacity be sixty, and the number of agents is one hundred, where each agent remembers his last five iterations. The number of attendees in each iteration is sixty. The optimum number of participation for each agent in five iterations is three (according to Eq. 9). It is expected for each agent to go to the bar three times during every five consecutive iterations in an equilibrium state (Eq. 17).

$$\begin{aligned} \frac{h \times C}{n}=\frac{5 \times 60}{100}=3 \end{aligned}$$
(17)
Table 1. The bar condition in a five sample consecutive iterations

Considering that the system is in the optimum state, we analyze the situation of agents in iteration \(E^{t6}\). To make a decision for the next iteration (\(E^{t6}\)), each agent checks its last four iterations (\(E^{t2}\) to \(E^{t5}\)). If he went to the bar three times during the last four iterations, he would not attend the bar for the current one to protect his individual utility as well as the social utility. Consequently, there will be no congestion. According to Table 1, sixty agents attend the bar in the first iteration. These are agents that join the bar only two times from \(E^{t2}\) to \(E^{t5}\), and will decide to go to the bar again. On the other hand, the rest of agents that do not join the bar in the first iteration, have already gone to the bar for three times from \(E^{t2}\) to \(E^{t5}\), and will decide to stay at home.

It has to be mentioned that we used five setup iterations with an equilibrium status, but in the real world, these iterations happen randomly. That is the reason for the distinction between this example and our simulations in the next section.

5 Evaluation and Discussion

Before analyzing the performance of SoCo, we first present the simulation environment and its configuration. Then, the evaluation parameters and the comparing approaches are introduced. Finally, we present the simulation scenarios and discuss the results.

5.1 The Simulation Environment

We use Matlab R2012b to simulate the El Farol Bar Problem environment. It is a discrete time simulator that fits well with the problem. The main reason is its capabilities in modeling the problem as a set of matrices, and its speed in running thousands of iterations. Similar to the original definition of the El Farol Bar Problem [3], the number of agents is set to one hundred. But to analyze the scalability, we also use 200, 300, and 400 agents as well. The initial value of the bar capacity is sixty, and for the scalability scenarios, we apply 120, 180, and 240 seats. The applied values for agents’ memory size (history) are 3, 5, 7, 9, 11, 13, and 15. Finally, the total number of iterations for each experiment is 2000 to reflect the behavior of the methods during the time. To reduce the effect of randomness, we repeated each experiment one hundred times, and present the mean values. The simulation configuration is presented inTable 2.

Table 2. The simulation configuration

The evaluation parameters are social utility (which is the average over all iterations) (Eq. 4), total individual utility (Eq. 2), maximum starvation length (Eq. 6), and the scalability in the number of agents. We compare the performance of our approach with the researches presented in [9, 10]. The study presented in [10] is one of the latest work on the El Farol Bar Problem that studied the effect of network topology (Von Neumann network) in social networks. Also, the work [9] is selected due to its emphasis on the starvation issue.

Table 3. The effect of history size

5.2 The Effect of History Size

Table 3 demonstrates the effect of history size on the individual and social utilities as well as the maximum starvation length in seven different history sizes. We repeated the simulations for one hundred times for each case and averaged the results. The results show that larger history sizes lead to longer starvation. The history length of five performs the best individual and social utilities. Besides, it has a comparatively low starvation length. Due to this, we used \(h=5\) in the rest of the simulations.

5.3 The Analysis of Social Utility

The main objective of the El Farol Bar Problem is to maximize social utility. Figures 1, 2, and 3 demonstrate the overall performance of the methods according to this metric. The X axis shows the iterations (weeks), and the Y axis is the social utility of the iterations. The social utility of agents in each iteration for Adaptive Parasitized method is presented in Fig. 1. The figure shows that it is relatively low in the starting iterations and slowly rises until it reaches near the optimum point. The main reason for the low social utility at early iterations is the randomly chosen parameters of \(C_i\) (frequency of attendance for agent \(a_i\)) and \(P_i\) (time step until the next attendance of agent \(a_i\)). The average social utility of the system during the 2000 iteration is 19.09. Its minimum number is 5.24, and the maximum is 49.12.

Fig. 1.
figure 1

The social utility of Adaptive Parasitized [9].

Fig. 2.
figure 2

The social utility of Good Society [10].

Fig. 3.
figure 3

The social utility of SoCo.

Figure 2 demonstrates the social utility of the Good Society method for each iteration. The utility fluctuates between positive and negative values. The main reason is that the numbers of attendees oscillate around the bar capacity. Although in some iterations the number of attendees is near the optimum, in some others the over-crowded case happens. Therefore, all agents get negative points, and it results in the poor social utility of the system. The average social utility of the method is \(-5.74\), and the values are bounded to \(-28.54\) and 48.40.

Figure 3 shows the results for SoCo, which is closer to the optimum point compared to the other two methods. The social coordination mechanism (\(C_a\)) suppresses the participants that cause congestion. Besides, the Effect function persuades agents to attend the bar based on the previous iterations. The mean social utility of the system in this method is 46.56. The minimum and maximum values of the gained social utility are 42.71 and 50.11.

Fig. 4.
figure 4

The total individual utility of agents in Adaptive Parasitized [9].

Fig. 5.
figure 5

The total individual utility of agents Good Society [10].

Fig. 6.
figure 6

The total individual utility of agents in SoCo.

Fig. 7.
figure 7

The total individual utility of agents in SoCo (magnified).

5.4 The Analysis of Total Individual Utility

In this simulation, we analyze the performance of the methods from the total individual utility point of view. Figures 4, 5, and 6 depict the achieved results for Adaptive Parasitized, Good Society, and SoCo methods in 2000 iterations (weeks), respectively. The horizontal axis shows agents, and the vertical one is the gained total individual utility of agents. Due to small fluctuations of SoCo method in Fig. 6, we heightened the chart in Fig. 7.

According to the achieved results, the individual utilities of agents in Adaptive Parasitized are bounded to 334.30 and 452.62 with the average value of 381.83. The Good Society method does not provide promising results. The best value gained by an agent is \(-93.23\), and worst value is \(-136.73\). Considering that the bar has sixty seats, in the best case, each agent may receive total individual utility of 1200 in 2000 iterations. In the proposed method, the total individual utilities of agents are between 906.74 and 986.40 with the mean value of 931.29. The distance between the highest and the lowest achieved values are \(30.07\%\) in Adaptive Parasitized and \(8.41\%\) in SoCo.

Fig. 8.
figure 8

The maximum starvation length agents in Adaptive Parasitized [9].

Fig. 9.
figure 9

The maximum starvation length of agents in Good Society [10].

Fig. 10.
figure 10

The maximum starvation length of agents in SoCo.

5.5 The Maximum Starvation Length

One of the secondary goals of the devised method is to minimize the starvation length of agents in accessing the bar. Figures 8, 9, and 10 present the results for Adaptive Parasitized [9], Good Society [10], and SoCo, respectively. The horizontal axis represents agents, and the vertical one shows the maximum starvation length of the agent during the 2000 iterations.

In the Adaptive Parasitized method, a less rigorous definition of maximum starvation length is provided, which indicates the maximum consecutive times that an agent does not intend to join the bar. The definition does not consider the cases in which an agent attends the over-crowded bar. The maximum starvation length of the method, according to the above definition, is equal to the threshold, which is set to 15 to achieve the best social utility. We rigorously redefine the maximum starvation length. Based on the new definition, the maximum starvation length of agents in Adaptive Parasitized method is bounded to 19.87 and 22.52 with the mean value of 21.10. Figure 8 reveals the results.

Figure 9 depicts the outcome of the Good Society method. The mean value of maximum starvation of agents is 31.23. The highest value is 37.82, and the lower one is 26.26.

The SoCo achieves the best results. They are bounded to 2.36 and 2.88 with an average of 2.63. It is almost eight times less than Adaptive Parasitized method, and about eleven times less than Good Society method. Moreover, Adaptive Parasitized method needs to divide the agents into casual and regular classes, whereas SoCo method does not require any classification of agents. The winning point of our devised approach is the social coordination factor (\(C_a\)), which brings equilibrium in accessing the bar.

Fig. 11.
figure 11

The individual utility of agents for n = 100.

Fig. 12.
figure 12

The individual utility of agents for n = 200.

5.6 Scalability

The last evaluation scenario is the scalability of the devised method. Figures 11, 12, 13, and 14 show the results for 100, 200, 300, and 400 agents, respectively. We used the total individual utility metric to compare these cases since its range does not change with the number of agents. In Fig. 11, one hundred agents are competing for seats of the bar. The total individual utility of agents are in the range of 866.60 and 1000.30. Figure 12 shows a similar experiment for 200 agents in which their gained total individual utility is between 999.20 and 1000.5. The results for 300 and 400 agents are similar to the previous ones. The simulation outcome demonstrates that the devised approach is scalable in terms of the number of participating agents. This is in contrast to good society method, where the performance degrades by surging the number of agents.

Fig. 13.
figure 13

The individual utility of agents for n = 300.

Fig. 14.
figure 14

The individual utility of agents for n = 400.

6 Conclusion

In the lack of a central coordinator, the establishment of a self-coordination mechanism for accessing a limited resource is a common problem that a variety of systems are facing. The classic El Farol Bar Problem models the situation, where a number of citizens may decide to go to the bar with a limited capacity. According to the number of attendees, they may receive a negative utility if the bar is over-crowded, positive utility if it is not over-crowded, or zero utility if they do not attend the bar. Agents’ decision is only based on their previous experiments. In this paper, we introduced a new method that applied a two-dimensional approach. The main idea was to use some details of each iteration as well as the agents’ past experiences. For the first case, we defined a new function called \( Effect ()\) that discriminates over-crowded cases from each other, as well as under-crowded ones. For the second case, we introduced a new social coordination parameter that hindered agents from overusing the resource. The simulation results showed the performance of the devised approach in terms of convergence speed, social utility, total individual utility, starvation length.

As future work, we are going to apply this method to various applications such as energy consumption in smart homes, public transportation, and network traffic.