Keywords

1 Introduction

Throughout history, humans have been interested in natural disasters and the topic of evacuation, because optimizing the evacuation’s strategies has vital importance in reducing the human and social harm, and saving the aid time. During evacuation, there are more than a few decisions which have to be made in a very short period of time, and in the most appropriate way. Significant research efforts have been made in the literature, (see [9]), to deal with evacuation optimization on the basis of deterministic optimization model, nevertheless the cooperative or non-cooperative behavior’s aspects of real-world evacuation have not been taken into account comprehensively. In [5] the authors focused their ideas on the evacuation routes; whereas, in our work we focused on the minimum path and also on the behavior of the crowd. A suitable way to find optimum evacuation routes, during an emergency, is using Ant Colony Optimization (ACO) algorithms [6, 7, 16]. Indeed, humans have faced complex optimization problems such as finding the shortest path between various points, evacuation simulations and optimization, allocating the optimum amount of resources, determining the optimum sequence of the processes in a production line, among others. Ant Colony Optimization algorithms are approximate techniques, belonging to the Swarm Intelligence methods, which imitate the cooperative behavior of real ants to solve optimization problems. Each artificial ant is inspired by the behavior of a real ant and can be seen as an agent of a multi-agent system. Real ants are eusocial insects and use collective behavior to achieve complex task, such as finding shortest paths between food sources and their nest. Using a simple communication mechanism like a chemical trail (pheromone), an ant colony is able to find the shortest path between two points. Initially, ant colony optimization algorithms have been applied to many combinatorial optimization problems, achieving good results in solving different problems, such as graph coloring [2], scheduling [13, 17] and assignment problems [1]. Nowadays, ACO algorithms have also been applied to problems belonging to the class of dynamic optimization problems, in which topology and costs can change during the execution of the algorithm. Routing in telecommunications networks is an example of such a problem [8]. Game theory has been widely used in the research of various scientific disciplines, from biological systems to economic and social networks [4]. With the help of game theory, researchers can conduct extensive studies on the pedestrian and evacuation dynamics [3, 19]. However, game-theoretical models are focused on the study of the crowd’s behavior in evacuation process. Indeed, in [18] the authors study a game-theoretical model to underline the relationship between cooperative and competitive agents in a crowd. Also, [12] discusses the basic principles of multiple robot cooperative system using Game Theory and Ant Colony Algorithms.

The aim of this research work is to study and analyse the collective behavior of a little social group that tries to escape from a disaster situation, such as earthquakes, volcanic eruptions, and/or hurricanes, trying to reach a safe location in the shortest possible time. Therefore, an ACO algorithm has been taken into account to study the behavior of different agents in strictly dynamic situations. Specifically, two different agents have been considered, which act differently: cooperative and non-cooperative agents. Ants colonies are recognized to be the best organized and cooperative social system, able to make their social community work at the best, and able to perform complex tasks, such as, for instance, discovering the shortest path between food and anthill, or defend the own anthill from attack by predators [11]. Moreover, any action of any ant, is related only to its local environment, local interactions with other ants, simple social rules, and in total absence of centralized decisions. These last features, that we find own in catastrophic situations, convinced us to consider ACO as the simulation model suitable for our study, because a sophisticated collective behavior based on local interactions, social rules, and in absence of centralized decisions, becomes crucial in reaching safe locations. Finally, the relationship between ACO and Game Theory aims to find a good solution in the case where agents with different ideas and strategies have to share a particular situation. As happens in an emergency scenario for the crowd, the same happens with a group of ants that tries to achieve the exit as safe as possible.

2 The Model

The Ant Colony Optimization algorithm is a well-known procedure that takes inspiration from the ants’ behavior, when they look for a path between any food source and their anthill. It has been observed that they can identify the shortest path, and communicate it to the others through chemical signals released along the path, called pheromones. In recent years, this behavior has been translated into mathematical and computer language and used to solve different kinds of optimization problems through different versions of the algorithm itself. Despite the different contexts where it has been applied, the mathematical description of the algorithm is quite the same for most of the problems. In particular, the ant’s environment is considered as a graph \(G=(N,L)\), where N is the set of nodes and L is the set of links. A generic ant k is supposed to be placed on a node i, and she must choose a destination node according to her behavior in real life; that is, preferring a path with some pheromone traces. However, this behavior is not deterministic so a proportional transition rule \(p_{ij}^k(t)\) is defined as in Eq. (1). It states that an ant k, on a node i and at a time t will choose a destination node j with a probability that is proportional to the quantity of pheromone on the link connecting i with j, if the link j belongs to the set of possible displacements for k. The probability is 0 otherwise. In formulas, we have:

$$\begin{aligned} p_{ij}^k(t)= {\left\{ \begin{array}{ll} \frac{\tau _{ij}(t)^\alpha \cdot \eta _{ij}^\beta }{\sum _{l\in J_i^k} \tau _{il}(t)^\alpha \cdot \eta _{il}^\beta } &{} \text {if } j \in J_i^k \\ 0 &{} \text {if } j \notin J_i^k. \end{array}\right. } \end{aligned}$$
(1)

As said previously, \(J_i^k\) is the set of possible movements of the ant k. Moreover, \(\eta _{ij}\) is the visibility of node j (defined as the inverse of the distance between two nodes), \(\tau _{ij}(t)\) is the pheromone intensity on a path at a given iteration, while \(\alpha \) and \(\beta \) are two parameters that determine the importance of pheromone intensity with respect to the visibility of a path. Once the ant k arrives at a destination node j, she updates the pheromone trace by releasing at a time t an amount of it proportional to the inverse of the length of the path \(L^k(t)\) (eventually multiplied by a Q-factor) if the link (ij) belongs to the path \(T^k(t)\) of the ant at time t. It is 0 otherwise. In this way, the greater the length of a path is, the less pheromone will be present on it. This feature is described by Eq. (2) in which \(\varDelta \tau _{ij}^k(t)\) represents the amount of pheromone deposited by the ant k.

$$\begin{aligned} \varDelta \tau _{ij}^k(t)= {\left\{ \begin{array}{ll} \frac{Q}{L^k(t)} &{} \text {if } (i,j)\in T^k(t) \\ 0 &{} \text {if } (i,j) \notin T^k(t). \end{array}\right. } \end{aligned}$$
(2)

Finally, a global updating rule \(\tau _{ij}(t+1)\) is applied as in Eq. (3). It states that the intensity of pheromone will be updated considering the intensity \(\tau _{ij}(t)\) of it at a previous step, and decreasing it with an evaporation factor \(\rho \).

$$\begin{aligned} \tau _{ij}(t+1) = (1-\rho ) \cdot \tau _{ij}(t) + \sum _{k=1}^m \varDelta \tau _{ij}^k(t). \end{aligned}$$
(3)

Now, starting from this procedure we have modified and extended ACO rules to fit them in our model. In particular, we have tried to mix concepts of game theory with concepts of optimization, to explore and highlight some novel features still not completely understood. To do this, we have imagined a generic risk situation like the one a group of ants is forced to live if it must solve a labyrinth. In other words, we assume that ants must find the exit of the labyrinth from a certain entrance as soon as possible to survive. We have modelled this escape situation like a game in which every ant can adopt two different strategies to exit from the labyrinth. We have chosen a labyrinth structure, since it generalizes and makes more interesting and challenging the optimization problem of finding the shortest path in a graph. We have realized this model using NetLogo [15], an agent-based model software that allowed us not only to build materially the structure of the labyrinth itself and implement the algorithm, but also to see what was happening during the simulation thanks to an opportune dedicate tab. We have built the labyrinth modifying an existing model proposed in [14]. We have fixed the seed of the random numbers to regenerate, at each run, the same labyrinth. Then, we have created a network underneath the labyrinth and realized more complex labyrinths by strictly modifying the procedure proposed in [14]. This upgraded version can add other links between some nodes with at least two first neighbors and other nodes with at least two first neighbors, in order to prevent the loss of the dead ends. We have repeated this procedure for different kinds of labyrinths with different sets of nodes and links, and grouped them in order to increase complexity. Finally, we have selected for all of them one node on the left part of the labyrinth to be the entrance, and one node on the right part to be the exit. We underline that the entrance and the exit are chosen on the left and on the right, respectively, to give an example to focus on a sample of the labyrinth. In order to generalize the problem, we can put the exit wherever we want or we can rotate the labyrinth, as suitably as we need. Then, we have created two different kinds of ants that act differently, and each of them follow a different strategy to escape from the labyrinth. In particular, we have imagined what would happen if some ants acted cooperatively, while other ants acted non cooperatively. Thus, at first we initialize the set of the whole colony and then, by means of a cooperation parameter f, we establish the fraction of ants who will act cooperatively. It follows that the remaining fraction \((1-f)\) of ants will act non cooperatively. In detail, we set the two strategies, that cannot be changed once the fraction of cooperative ants is defined, as follows:

  • Non-Cooperative: they block a random node of their path. In Fig. 1, non-cooperative ants are colored in blue, while a blocked node is represented as a fire.

  • Cooperative: if they find a damaged node close to their path, they repair it. In Fig. 1, cooperative ants are colored in red.

Fig. 1.
figure 1

In this model the entrance is fixed (always on the left part of the labyrinth), whilst the exit changes, in any position of the labyrinth, in according to the number of prizes on it. Bigger black nodes represent end nodes, i.e. dead ends roads; fires indicate the damaged nodes by the non-cooperative ants; and the black labels on the edges indicate the intensity of pheromone on that route. With red are showed the cooperative ants, and in blue the non-cooperative ones. (Color figure online)

Both of them become safe if and only they arrive at the exit. Every kind of ant is “equipped” with the same transition rule. In other words, each ant chooses the next target node according to the same rule, even if it belongs to different families and acts differently. In particular, the transition rule in (4) defines the probability \(p_{ij}^{k}(t)\) of an ant to go from a starting node i to a destination node j as follows: during the first iteration, the ants explore randomly the labyrinth. They choose to visit a link according to the intensity of pheromone on it that, in the first iteration, is equal to 1 for all the links of the labyrinth.

The first ant of each kind that arrives at the exit releases a trace of pheromone \(\varDelta \tau _{ij}\) along every link of her path. For simplicity, in our model, the intensity of pheromone released by each ant on every link of her path is \(\varDelta \tau _{ij}=1.5\). After that, the other ants of the same kind die, the global updating rule (5) is applied and a new generation is launched. In formulas, we define the transition rule as:

$$\begin{aligned} p_{ij}^{k}(t)= {\left\{ \begin{array}{ll} \frac{\tau _{ij}(t)}{\sum _{l \in J_{i}^{k}} \tau _{il}(t)} &{} \text {if } j \in J_{i}^{k} \\ 0 &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$
(4)

with \(\tau _{ij}\) intensity of pheromone on the link (ij) and \(J^k_{i}\) is the set of allowed links. Finally, the global updating rule is defined as:

$$\begin{aligned} \tau _{ij}(t+1)=(1-\alpha )\cdot \tau _{ij}(t) + \varDelta \tau _{ij}, \end{aligned}$$
(5)

where \(\alpha \) is the evaporation rate, \(\tau _{ij}\) is the pheromone intensity on the link (ij) at the previous step and \(\varDelta \tau _{ij}\) is the amount of deposited pheromone by the winning ant, at each turn, on the same link. In this model, we have also imposed that, once the quantity of pheromone falls below a certain threshold, it remains fixed and does not decrease further. This choice is to prevent the stagnation of the algorithm around a local optimum. Thus, within this situation, we want to analyze how two different strategies evolve in time during a critical situation, namely, in finding the shortest path from the entrance to the exit in the shortest possible time. In the next section, we will discuss about some game theory definitions used in the model. We decide not to consider the gain of a single link, but the aim of one ant is to reach the exit as soon as possible. In fact, the exit, or in our case the shelter, has a capacity that in the algorithm is represented by a prize in the exit. If there are no more prizes on the exit, i.e. capacity in the shelter, the exit will move (with the same budget of prizes) to another edge node of the graph, except the ones on the left part of the labyrinth. We are ruling out the possibility that the exit and the entrance are on the same side of the graph. It is a dynamic case in which not only the ants must be able to find the exit from the maze through the shortest path, but from time to time, they must also have the ability to organize themselves for a new objective that gives the opportunity to collect prizes.

2.1 Evacuees’ Game

Game theory allows one to define how much an agent can gain from its actions and decisions. Indeed, agents are defined to be rational and intelligent and try to reach the highest value of the profit function. In game theory, the profit function models reality so as to give a value to the emotional or economic gain to the agent who adopts a certain strategy. A strategy space for a player is the set of all possible strategies of a player; whereas, a strategy is a complete plan of action for every stage of the game. Formally, we define a payoff function for a player as a map from the cross-product of players’ strategy spaces to reals, i.e. the payoff function of a player takes as its input a strategy profile and yields a representation of payoff as its output.

In this model, we consider an N-players game \((N \ge 2)\). The evacuees represent the players of the game, who have to reach a safe area. We suppose that evacuees can chose either to cooperate (C) or not to cooperate (NC), when attempting to arrive a desired safe area after or during a disaster. Each player starts from the same node and tries to reach an exit using the minimum path. A little group of evacuees tries to arrive in a safe area, which has a capacity K, but only one member of the group can reach that place. When the shelter is full or is not enough safe, we consider a new shelter, placed in another node of the graph, which the evacuees have to reach.

Let \(G = (N, L)\) be the graph associated with the game, where N is the set of nodes and L the set of links. The payoff of the player that finally reaches the safe area depends on a parameter, the pheromone \(\tau _{ij}\) on the edge (ij) used in the Ant Colony Algorithm. According to the strategies we define two different payoff functions, which depend on the strategy that an agent chooses. As a consequence, we define the payoff function of an agent k, who chooses the cooperative strategy \(a_k^C\):

$$\begin{aligned} u_k(a_k^C,a_{-k})= \frac{f\cdot \sum _{i,j}\tau _{ij}}{n}, \quad 0 < f \le 1. \end{aligned}$$
(6)

We define the payoff function of an agent k, who chooses the non-cooperative strategy \(a_k^{NC}\):

$$\begin{aligned} u_k(a_k^{NC},a_{-k})= \frac{(1-f)\cdot \sum _ {i,j}\tau _{ij}}{n}, \quad 0\le f < 1. \end{aligned}$$
(7)

We denote f as the percentage of cooperative players and n as the number of evacuees of a group. We consider \(\sum _ {i,j}\tau _{ij}\) as the sum of the pheromone on the links of the agent path. We underline that \(a_k\) is a generic strategy, that an agent k can choose from (C) or (NC) and we denote \(a_{-k}\) the strategies of all agents, except k.

We group for all k, the cooperative (C) and the non-cooperative ants (NC) respectively, as:

$$u^C= f\cdot \sum _{i,j}\tau _{ij}, \quad 0< f \le 1; \qquad u^{NC}= (1-f)\cdot \sum _ {i,j}\tau _{ij}, \quad 0\le f < 1.$$

Finally, we denote the profit function of the game as the sum of the payoff of all cooperative ants plus the payoff of all non-cooperative ants, i.e. \(U= u^C+u^{NC}\).

3 Experiments and Results

In our simulations, we use ant shape agents according to the implemented algorithm, but this is just a graphic feature that doesn’t affect the correctness of the procedure. It follows that a generation of ants represents a group of people who try to arrive at a shelter or a safe area. At the end of each generation, only one ant of each kind survives. After several preliminary experiments, we choose a set of \(n=10\) agents and perform 10 different simulations for different values of f, starting from \(f=0\) to \(f=1\) and increasing f at a regular interval of 0.20. For our purposes, we consider the trend of ten generations. Figure 2 shows the trend of the average profit function over 10 simulations at different values of f (and correspondingly \((1-f)\)). In each plot, the x-axis indicates the generations number, while in the y-axis are displayed the average profits obtained, respectively, by the cooperative agents (Fig. 2a) and by the non-cooperative ones (Fig. 2b).

Fig. 2.
figure 2

Comparison of the average profit obtained by cooperative agents (plot (a)), compared to obtained one by non-cooperatives (plot (b)).

In particular, the figure represents the comparison of the values of the profit function for each evacuee referred to the percentage of cooperative agents (f). We notice that when the number of cooperative agents increases, the value of profit function increases too, following a linear trend. Furthermore, for \(f=0.8\) and \(f=1.0\), after a few generations, the average profit function grows similarly, reaching the same value after 10 generations. This suggests that a non-cooperative behavior of a few agents can increase the profit of the other ones. In the same way, the plot in Fig. 2b shows that a non-cooperative strategy is good if and only if a lot of agents choose that particular strategy. Also, in this case, the average profit function reaches the best values for \(f=0.2\) and \(f=0.4\), leading to the same evaluation of the previous case.

Fig. 3.
figure 3

Average profit function comparison obtained by the cooperative and non-cooperative agents, at different values of f and \((1-f)\).

In Fig. 3 we can see the average profit function comparison for \(f=0.2\) and \(f=0.8\), both for cooperative evacuees and non-cooperative evacuees. In Fig. 3a, we find the value of f for which are present 2 cooperative evacuees and 8 non-cooperative evacuees, and in Fig. 3e the symmetric situation. The same distinction is present also in Fig. 3 for \(f=0.4\) in Fig. 3b, and \(f=0.6\) in Fig. 3d, but with 4 and 6 different kinds of evacuees in two symmetric situations. For these plots, the average profit function is higher for the larger groups (non-cooperative for \(f<0.5\) and cooperative for \(f > 0.5\)). This can be explained because these plots are calculated for a percentage of cooperation less than \(f=0.5\). In fact, at \(f=0.5\) something special happens. In Fig. 3c the trend of the average profit function for cooperative evacuees starts to be lower than the one for the non-cooperative evacuees, but as the generations increase, the two functions tend to reach the same value.

The Chicken Game supports our considerations. Indeed, the main feature of this game is that players try to avoid appearing as a “chicken”. So each player taunts the others to increase the risk of shame in giving up. However, when a player surrenders, the conflict is avoided and the game is mostly over. Furthermore, the fact that the profit function is the same when half of the population is cooperative and the other is not, leads to compare the Chicken Game with the particular case \(f=0.5\). In fact, the balance of the game is obtained when one player chooses strategy (C) and the other the strategy (NC), that is the opposite strategy. In this situation, no player is considered a “chicken” until the moment when the value of f decreases, and hence the competitive strategy takes advantage. We observe, however, that the game of chicken is considered as a social dilemma [10].

Fig. 4.
figure 4

Average profit function comparison over 10 simulations and over 10 generations for cooperative and non-cooperative evacuees.

To better investigate the meaning of these data, we calculate the average values of the profit function over 10 simulations for each group of evacuees and for each value of f. Figure 4 shows what we have obtained. As we can see, as the percentage of f increases, the average value of the profit function has two different trends. The one for cooperative evacuees increases as f increases. The one for non-cooperative evacuees decreases. In particular, the average value of the profit function for \(f \ge 0.50\) is higher than the ones for \(f \le 0.50\). This means that the average values calculated for two opposite and symmetric configurations are not the same. The two curves are not symmetrical. In fact, the two curves are not symmetrical because they are the outcome of different dynamic scenarios, where the two kinds of agents (cooperative and non-cooperative) act differently. Of course, these effects are strongly affected by the number of the former compared to the latter, and in particular, higher values of the profit function (u) are strictly related to higher values of the parameter f. This, in general, is not a surprising result since is quite common that cooperation means, in most cases, better performances. It is important to say that in game theory there are several examples in which players can choose whether to adopt a more or less cooperative strategy. Let’s consider the classic game of hawks and doves as an example. These sample-animals represent couples of the same type of animals and same population that fly on a prey. Each animal can choose to behave like a hawk or a dove: hawk (strategy H) or dove (strategy D) behavior indicates aggressive or peaceful behavior, respectively. In this example, if the players choose the same strategy then they divide the loot, otherwise, if they both choose the same strategy, one will get the maximum profit the other the minimum profit. From this example we can see how in situations where there is total collaboration, a greater profit is obtained than in a situation in which only one can obtain a good profit. However, in this context, we imagine that better performances can be linked or explained with one evacuee’s willing to improve its profit. It is presumable that in real-life escape situations people tend to act in the same way that is, trying to improve their profit function. Therefore, our results suggest that to do this they should prefer a cooperative strategy.

4 Conclusions

In this paper we analyse the affinity between the behavior of ants and people in a particular situation. Indeed, in an emergency situation, a crowd seems to move in a messy way but inside the crowd there are little groups that try to decide their behavior inside that group. As a consequence, we investigate the cooperative or non-cooperative agents’ choice inside each single group. This original approach consists of correlation between ants and people, that give us the possibility to underline some interesting factors, as the importance of using the sum of the pheromone into the profit function. The payoff’s values, for each agent, lead to significant observations regarding the cooperative and competitive behaviors of the agents, in a difficult situation, where an evacuee has to decide as fast as he can. Furthermore, the idea to insert the percentage of cooperative agents in the profit function represents another innovative aspect that allows us to better understand both the behavior of the agents and the profit they may have as we explain in Sect. 3. In fact, for the first time is used a game theory approach to an evacuation model using an ACO algorithm, to find the solution of the profit function of the game. The quality and safety of the chosen path is directly proportional to the sum of the pheromone along this path. This leads to a profit function that reflects the safety and efficiency of the path chosen by the evacuees. Moreover, during the comparison over 10 simulations and over 10 generations for cooperative and non-cooperative evacuees, we notice that if a lot of evacuees choose cooperative strategies, then the value of the function is higher than the same number of evacuees can gain playing a competitive strategy. The results presented in this paper are just a small part of a bigger study that is still under work. Further studies and simulations have to be made. Especially because our model considers just one winner at each run, which is not a desirable situation in real life.