Ecological Dynamics and Evolution of Cooperation in Vehicular Ad Hoc Networks

: In Vehicular Ad Hoc Networks (VANETs), promoting cooperative behavior is a challenging problem for mechanism designers. Cooperative actions, such as disseminating data, can seem at odds with rationality and may beneﬁt other vehicles at a cost to oneself. Without additional mechanisms, it is expected that cooperative behavior in the population will decrease and eventually disappear. Classical game theoretical models for cooperation, such as the public goods game, predict this outcome, but they assume ﬁxed population sizes and overlook the ecological dynamics of the interacting vehicles. In this paper, we propose an evolutionary public goods game that incorporates VANET ecological dynamics and offers new insights for promoting cooperation. Our model considers free spaces, population density, departure rates of vehicles, and randomly composed groups for each data sender. Theoretical analysis and simulation results show that higher population densities and departure rates, due to minimum differences between pay-offs of vehicles, promote cooperative behavior. This feedback between ecological dynamics and evolutionary game dynamics leads to interesting results. Our proposed model demonstrates a new extension of evolutionary dynamics to vehicles of varying densities. We show that it is possible to promote cooperation in VANETs without the need for any supporting mechanisms. Future research can investigate the potential for using this model in practical settings.


Introduction
In Vehicular Ad Hoc Networks (VANETs), vehicles cooperate by sharing data and acting as routers to improve road safety, transportation security, and intelligent transportation systems. The cooperation, however, faces the tragedy of the commons challenge where vehicles may choose to free-ride [1] on the contributions of other vehicles. This research is critical because finding effective solutions to incentivize cooperation among vehicles is necessary to achieve the desired network performance. To this end, the paper explores the use of game theory and incentive mechanisms to encourage cooperation in VANETs.
The paper reviews several incentive mechanisms that motivate vehicles to cooperate with one another [2]. These mechanisms include the Tit-for-Tat (TFT) mechanism, a multilayer credit-based incentive system, an incentive protocol that offers rewards to participating nodes, creating a honeypot that traps selfish vehicles in the network, an incentive-based protocol based on coalition game theory, and an incentive system that uses the reciprocal altruistic factor [3]. The paper also proposes an incentive mechanism that incorporates behavioral economics principles and combines both incentives and punishments for VANETs.
The paper also reviews game theoretical models that address the problem of freeriding in VANETs. It distinguishes between pairwise and collective games, where the former assumes that interactions are limited to two players, while the latter assumes collective interactions, where the strategy of one player can impact several other players' strategies. The paper argues that while models with pairwise interactions are commonly used in game theory, their results cannot always be extended to games with collective interactions, leading to misleading conclusions. The cited studies used Markov decision processes, evolutionary game theory, repeated game approach, and a game-theoretic model to investigate cooperation in VANETs.
The rest of this study is organised as follows. Section 2 presents related works on the topic. In Section 3, we provide the formulation and define the game used to model cooperation in Vehicular Ad Hoc Networks. Additionally, in Section 4, we discuss the dynamical analysis and numerical simulation of the proposed model. Finally, Section 5 concludes the paper.

Related Work
Numerous studies have investigated methods to promote cooperation in VANETs. Among the most popular are incentive mechanisms and game theory approaches. Incentive mechanisms are designed to motivate vehicles to cooperate with one another. Shevade et al.
proposed an incentive-aware routing protocol that uses a Tit-for-Tat (TFT) mechanism to maximize performance in Delay Tolerant Networks (DTNs) [4]. Zhu et al. developed a multilayer credit-based incentive system to encourage cooperation among DTN bundle nodes [5]. Lu et al. tackled the free-riding problem in DTNs by introducing an incentive protocol that offers rewards to participating nodes to promote fairness [6]. Patel et al. dealt with free-riding in VANETs by creating a honeypot that traps selfish vehicles in the network [7]. Dubey et al. developed an incentive-based protocol based on coalition game theory, in which vehicles have an incentive to forward data as members of a coalition to improve reliability and fairness in VANETs [8]. Liu et al. designed an incentive system that uses the reciprocal altruistic factor to reconstruct the utility function of vehicles [9]. They demonstrated that their system can reduce message transmission delay by up to 30% compared to other cooperative transmission mechanisms. Additionally, Liu et al. proposed an incentive mechanism from the perspective of behavioral economics that incorporates the anchoring effect and loss aversion on offloading in the Internet of Things [10]. They introduced the reference factor and price-break discount factor based on the anchoring effect and time pressure and regret value on loss aversion to encourage nodes to participate in data offloading. Rehman et al. developed a mechanism with both incentives and punishments for VANET [11]. In this mechanism, vehicles with higher weight and cooperation are elected as Heads during the election process. Vehicles that participate in the election can increase their reputation by cooperating in forwarding data, while those who exhibit repeated selfish behavior are punished.
In addition, game theory has been utilized to address the issue of free-riding in wireless network routing [12]. Game theory approaches can be broadly classified into two categories, pairwise and collective games. Pairwise games assume that interactions between players are limited to two players only, where the effect of a player's strategy is only on one other player. On the other hand, collective games assume that interactions are collective, meaning that the strategy of one player can impact several other players' strategies. The collective game category includes public goods games (PGG) and coalition games.
Previous studies have investigated the problem of cooperation in VANETs using game theory, and have utilized a model with pairwise interactions [13][14][15][16][17][18][19]. This means that the effect of each player, or vehicle, is assumed to be limited to only one other companion player. However, this assumption may not be appropriate for the effect of forwarded messages, since each player can actually affect multiple other vehicles simultaneously. Therefore, other studies have considered the effect of each player on multiple other vehicles simultaneously, which is a more suitable assumption for the problem at hand. While models with pairwise interactions are commonly used in game theory, their results cannot always be extended to games with collective interactions, and may lead to misleading conclusions [20].
The cited studies have contributed to the investigation of cooperation in VANETs through game theoretical models. Zhang et al. [13] proposed a cooperative information dissemination scheme for vehicular networks using a Markov decision process. Mao et al. [15,18] proposed a cooperative content sharing mechanism using evolutionary game theory. Altman et al. [16] considered the problem of finding stable cooperative strategies in VANETs using a repeated game approach. Naserian et al. [17] proposed a game-theoretic model for cooperation in VANETs that considers the impact of obstacles on communication. Saeed et al. [19] proposed a cooperative transmission mechanism that considers the impact of obstacles and interference on transmission rates.
The problem of promoting cooperation in social dilemmas involving groups of interacting individuals is traditionally investigated using the Public Goods Game (PGG), which assumes that individuals can make contributions to a public good. In VANETs, the data packet can be considered as the public good. Shivshankar and Jamalipour were the first to propose a game theoretic strategy, called Tit-for-Tat, to promote cooperation among vehicles in VANETs based on PGG. Their approach measured the cooperation level of the vehicles based on time and the number of message forwards, and they examined the effect of different parameters on the cooperation level to evaluate the performance of the proposed game [21].
In a different study, Zhang et al. used PGG to investigate cooperative behavior among vehicles [13]. They showed that the cooperation level in VANETs is proportional to the synergy factor. Shivshankar and Jamalipour proposed a PGG framework to analyze the effects of networking properties on the dynamics of cooperation in VANETs. In another work, Ding et al. designed a PGG for VANETs with high node density. In the proposed game, vehicles could dynamically adjust their grouping strategy according to the real situation around their strategies. Additionally, they defined a hub vehicle that exchanges data packets with all neighbors to prevent isolated vehicles. The authors demonstrated that increasing the multiplication factor in the PGG would promote the cooperation level, which is an expected result for VANETs [22].
In VANETs, messages sent by vehicles and road side units can impact multiple vehicles. Thus, it is more appropriate to model the effect of event messages as a multiplayer game with collective interactions rather than pairwise. However, current PGG-based models in VANETs have limitations. Researchers usually assume that each vehicle has fixed neighbors or can perfectly connect to all other players, which is not realistic in VANETs. Additionally, the topology of vehicles does not change throughout the game, which is also unrealistic. In VANETs, a vehicle benefits from diffusible messages produced by all vehicles in its group, which randomly form at each generation. Therefore, the vehicle's payoff should be calculated by weighting the payoffs obtained in the randomly composed groups, weighted by the probability that such groups occur. Moreover, in VANETs, the PGG is played in populations of varying sizes. Small population size (or density) results in small group sizes and vice versa for a larger population size.
To address these limitations, this study models vehicles as players that form randomly composed groups at each round of the game based on the population size. This game is called ecological-aware PGG. The study investigates, for the first time to the best of our knowledge, the effect of rate of departure and density of vehicles on the cooperation dynamics in VANETs based on ecological-aware PGG.

The Proposed Model Based on Evolutionary Public Goods Game
The problem of cooperation in social dilemmas has been a challenging issue in evolutionary game theory for a long time. In Vehicular Ad Hoc Networks (VANETs), where effective communication and safe driving depend on vehicle cooperation, this problem becomes even more complicated due to the dynamic and uncertain nature of the network environment. To address this issue, we propose a new model for studying the ecological dynamics and evolution of cooperation in VANETs based on the evolutionary public goods game. The model takes into account the interaction between the payoff structure, spatial structure, and dynamics of network topology. Specifically, the model assumes that vehicles can interact locally and update their strategies based on the payoffs they receive from their neighbors. Furthermore, an evolutionary mechanism allows vehicles to adjust their cooperation strategies according to their own success and the success of their neighbors. The proposed model provides insights into the factors that influence the evolution of cooperation in VANETs. Overall, the proposed model offers a promising approach for understanding the evolution of cooperation in complex and dynamic social networks.

Formulation of the Model
In a typical public goods, all individuals have the opportunity to invest an amount c into a common pool. The total amount is then multiplied by a positive number r, and is distributed equally among all individuals, regardless of whether they have contributed or not. The average payoffs for cooperators and defectors among N players in an infinite population are given by where N is group size and x is the relative frequency of the cooperation in the group. In this configuration, every individual has a temptation to defect since the cost of defection is equal to zero. Thus, each rational player avoids contributing and makes an effort to free-ride on contributions of other players. If all players follow this rationality, no one would contribute and, hence, the benefits of the public good would be equal to zero. In a well-mixed, infinite population we assume, as is standard, that groups are formed randomly at each generation, after which fitness is calculated. The group size of public goods interactions varies in public goods game with a population of varying densities. Basically, small (large) effective group sizes are induced by small (large) population densities.
Let us call x, y, and z the frequencies of cooperators, defectors and empty spaces (x + y + z = 1) in the randomly composed group of vehicles to exchange event messages. Therefore, x + y represents the normalized density of vehicles, such that 1 corresponds to maximum density of the population and 0 shows extinction. The average payoff of cooperators, Π C , and defectors, Π D , are calculated by weighting the payoffs obtained in the randomly formed groups of vehicles, weighted by the probability that such group composed.
In standard PGG the probability of a group composed of X cooperators and N − X defectors is given by where x denotes the fraction of the cooperators. In our problem, the probability of a group composed m cooperators, S − m defectors, and N − S − 1 empty spaces is B(S − 1, N − 1, z) × B(m, S − 1, x 1−z ). Therefore, the average payoffs of the focal cooperator and defector are given by where N is the number of vehicles within the diffusion range of the event message by a given vehicle, S is the number of individuals belonging to either type cooperator or defector, and m is the number of individuals of type cooperator. The fitness functions (4) and (5) can be reduced to:

Using the Game to Inform the Model
Now we employ replicator equations to analyze the frequency-dependent evolutionary dynamics of cooperators, defectors, and empty spaces. Let us assume x(t), y(t), and z(t) represent the relative frequency of cooperator, defector, and empty space, at time t, respectively. Additionally,ẋ(t),ẏ(t), andż(t) denote the changing rate of the phenotypes' frequency. In this system we assume that new vehicles can only emerged into empty space. Hence, birth rates are proportional to empty spaces z and their payoffs. Dynamics of the individuals in this system are calculated by the following equationṡ where d and b indicate death and birth rates of vehicle (i.e., departure rates),ẋ(t),ẏ(t), andż(t) show rate of change of cooperator, defector, and empty space frequencies in the population, respectively. Equation (8) represents an extension on the replicator dynamics equations [23]. Replicator dynamics determine whether individuals in the process of evolution converges to which proportions within the population [24]. Equation (8) is converted to normal replicator [25] if dz dt = 0 and d = z xΠ C +yΠ D x+y . The equilibrium of the phenotype frequencies is calculated by setting our equation system (i.e., Equation (8)) equal to zero. As the frequencies of three phenotypes cooperator, defector, and empty space should clearly sum to one, the set of possible frequency states will be a simplex that defined by: The replicator dynamics equations have several equilibrium (fixed) points that describe situations in which the population is no longer evolving. These equilibrium points have two types, monomorphic and polymorphic. Monomorphic point indicates a pure population state composed of one player type, where polymorphic point represents a mixed population state including more than one player type.

Dynamical Analysis
Equilibrium points in replicator Equation (8) are obtained by setting them to zero. In our system, this corresponds to an internal steady state between cooperators and defectors if system works infinity. In this section, we investigate the stability of the equilibrium points in parametric form and represent individuals behavior by several scenarios under different conditions. Some of these scenarios represent normal behavior and others indicate rare cases that theoretically can take place.
Scenario (i) Consider a system without any cooperators. In such situation (x = 0), according to Equation (6), the average payoff of the defector will be Π D = 0, hence the rate of change of defector frequencies isẏ(t) < 0. This results in decreasing defector frequency in the population and, consequently, it goes extinct. Scenario (ii) In the absence of defectors in the population (y = 0), according to Equation (6), the average payoff of cooperators is given by: By setting Π C in equationẋ(t) = x(t)(z(π C + b) − d) and based on the maximum value of the function z(π C + b) − d) three equilibria can be readily observed in the system. The maximum of the function z(π C + b) is actually attained at the point and is given by: If d > {max z(π C + b)} then population goes to extinct (i.e., x = 0, y = 0, and z = 1), while for d < {max z(π C + b)} a bifurcation arise in the system (Figure 1) that results in one stable and one unstable interior equilibrium at higher and lower x, respectively. However, another equilibrium emerged exactly at the maximum point represents an unstable point.   Scenario (iii) The system can enable cooperators to survive even when defectors free-ride on contributions of the cooperators. In order to investigate this scenario, a new variable ω = x x+y is introduced. By using Equation (8), the changing rate of ω and z are given by:ω By introducing variable ω the dynamic system in Equation (8) which represented by a 3-simplex reduced to a dynamics that shown in a rectangle determined by ω ∈ [0 , 1] and z ∈ [0 , 1]. This sheds some new light on the vehicle dynamic from viewpoint of the evolutionary game theory. Figure 3 shows an example of vehicles dynamics for such system. As shown in this figure, natural selection favors cooperator vehicles and, eventually, all populations select this strategy. The red rectangle in this figure represents the valid region of the population dynamics induced by Equations (12) and (13). It is worth pointing out that the dynamics on the rectangle boundaries can be analyzed clearly. The boundaries ω = 0 and ω = 1 represent the scenarios i and ii, respectively. Definitely, on the boundary of ω = 0, z will be equal to 1. However, the dynamics on the boundary ω = 1 has 1, 2, or 3 equilibrium states: extinction of defector (i.e., cooperator dominance), extinction of the cooperators (i.e., defector dominance), and coexistence of the cooperators and defectors.
Up to now, we have discussed about the monomorphic equilibrium points of the game which defectors or cooperators strictly dominate. Now, conditions under which a polymorphic equilibrium can arise are investigated. Since in the polymorphic equilibrium z = 0 and ω = 0, so in accordance with [26] the equilibrium (z , ω ) are obtained by setting . Analyzing the parametric form of z is very complicated and maybe impossible. Hence, we analyze different conditions for z using numerical simulations and under various environment conditions. According to the numerical simulation we claim that for r < 2 function rc(1−z N ) N(1−z ) − (rc − 1)z N−1 − c at most has one root, and for r ≥ 2 and c > 1 at most has two roots in the interval z ∈ [0 1]. Figure 4 shows the roots of the function for r < 2 and r ≥ 2. Consequently, there are at most two equilibrium points in the system. Figure 5 shows all dynamics of the system regards to the number of equilibria.  An equilibrium point in the system can be stable, unstable, and saddle. An equilibrium point X is stable if for every neighborhood U of X the system starts from another neighborhood U of X, eventually the system goes to U. An unstable point is an equilibrium if it is not stable. A saddle point is an unstable equilibrium where it is stable at least in one direction. In general, if equilibrium points exist, their stability depend on values of the parameter. Our simulations show that the dynamical system at most can have one polymorphic stable equilibrium point ( Figure 5). As can be seen in Figure 5a, the boundary z = 1 is attracting for sufficiently small population densities (approximately for z > 0). Hence, for the small population, vehicles remain unable to recover from exploitation and finally become extinct. Additionally, for large population densities, cooperation arises in the system but there is no stable point. This means that, by changing the number of defectors and cooperators, the final state maybe changed. Figure 5b shows the system has one polymorphic stable equilibrium. In this example, population goes to stable point (z = 0.8, γ = 0.11) for z more than 0.1. It is easily seen that for high population densities cooperation arises, while for medium and small densities relative defector frequency increases in the population over time and finally approaches to the stable point (z = 0.8, γ = 0.11). The important point to note here is that although in high densities cooperation arises, there is no any equilibrium in this area. Figure 5c is similar to Figure 5b except that it includes a polymorphic saddle point. For a given x x+y and low c, if population density increases, the members of the randomly composed group increase until eventually N > r. This decreases the return from the public good (i.e., forwarded messages) and results in increasing defectors in the system. However, decreasing population density result in smaller randomly composed group until in the long run N < r holds, and cooperator vehicles arise. One of the advantage of the proposed model lies in the fact that cooperation level of vehicles can be determined by setting model's parameters. Figure 6 suffice to show it. As illustrated in this figure, a high death rate, that is equal to birth rate in the proposed model, increases the chance of cooperation in large population densities while low death rate, by contrast, increases the cooperator frequency in the small population densities. This is for the simple reason that the payoff of cooperators and defectors directly influence growth by increasing d proportional to x and y (see Equation (8) The size of randomly composed group N is another determinant element in promoting cooperation. Indeed, in our model, N determines the average number of vehicles that are able to receive the message from the focal vehicle. Generally, low (high) value of N increases (decreases) the return from the public good and leads to promote (demote) defection between the vehicles. Figure 7 shows the effect of N on the level of cooperation of vehicles. If the costs of contribution c are sufficiently small the cooperation arises between vehicles. Figure 8 represents the effect of c on the level of cooperation between the vehicles. As shown, increasing c leads to continuous loss of cooperation strength in the population insofar as c = 50 (Figure 8c) results in the lowest cooperativeness.

Conclusions
This paper presents a novel approach, the ecological-aware public goods game (PGG), to investigate the evolution of cooperation between vehicles in Vehicular Ad hoc Networks (VANETs). The proposed model incorporates dynamical network topology and varying population sizes, which are two key features of VANETs. Our simulations and theoretical analyses reveal that the promotion of cooperation is influenced by various network parameters. Specifically, a higher birth rate increases the size of local communities and results in a smaller difference in payoff between cooperating and defecting vehicles, thereby reducing the probability of strategy change. On the other hand, lower densities can lead to an increase in defection due to the large difference in payoff between cooperators and defectors. The proposed model provides a useful tool for designing network properties to promote cooperation between vehicles, without the need for any additional mechanisms.
Furthermore, our results demonstrate that the topological properties of the network, such as the degree distribution and clustering coefficient, also have a significant impact on cooperation dynamics. Networks with higher degrees and clustering coefficients promote cooperation by providing more opportunities for cooperation and increasing the probability of establishing social ties between cooperators. Moreover, the departure rate of vehicles, which reflects the turnover of network participants, is found to play a crucial role in determining the stability of cooperative behavior. In general, a moderate departure rate is conducive to cooperation, as it provides a balance between introducing new cooperators and maintaining existing social ties.
To extend the findings of this study, future work could explore the effect of other network parameters, such as network size and heterogeneity, on the evolution of cooperation in VANETs. Moreover, empirical studies could be conducted to validate the effectiveness of the proposed approach in real-world scenarios. Overall, our work highlights the importance of designing appropriate network properties to promote cooperative behavior in VANETs, which can have significant implications for the development of intelligent transportation systems.