1 Introduction

Humanity, as a community of destiny, is exposed to various daily risks, such as disease, environmental damage, and war [1,2,3,4,5,6]. A wide variety of risks affect people’s lives, and people are constantly making efforts to cope with them. People have different ways of dealing with risk. In the case of COVID-19 [7,8,9,10,11,12,13], for example, some countries take strict defensive measures to prevent the spread of the epidemic within their borders, and there are also countries that live with the virus and ensure the everyday life of their people with acceptable consequences. Discussions abound as to which is the more rational way to deal with the risk [14,15,16]. Different response options do not currently lead to catastrophe, suggesting that each approach, with its respective costs, is a viable way to deal with current risks. It is unknown when risks will strike and how difficult they will be to cope with, so exploring the varying responses of people under different risks can help identify and respond to risks rationally.

Many scholars have explored how groups respond to risk by adopting evolutionary game theory [17,18,19,20,21,22,23]. This is because evolutionary game theory is an abstraction of the finite rationality of individuals, which provides a good basis for the simulation of real-world group collaboration [24,25,26,27,28,29,30,31,32]. And both individual finite rationality and group collaboration are extremely consistent with scenarios in which people respond to risk as a group. In previous studies, environmental risks [33,34,35,36,37] and epidemic risks [38,39,40,41,42] are two typical types of risk resilience scenarios. Environmental risks include factory pollutant emissions, illegal hunting, greenhouse gas emissions, and more [43,44,45,46]. Although the consequences are all ecological damage, some risks are easier to cope with while others are more difficult. The global ravages of COVID-19 in recent years have also led many scholars to study the response to the outbreak [47,48,49,50]. Similarly, some epidemic risks are difficult to respond to while others are simple to cope with, such as influenza and COVID-19. Therefore, scenario- or event-specific risk-resistant studies hardly portray the reality of people’s daily lives.

Individuals are rational economic agents. Whether in group cooperation or group collaboration, the conflict between the individual’s pursuit of self-interest and the preservation of collective interest is always present [20, 51,52,53,54,55,56,57]. When risk strikes, collective joint response to risk and individual solo response to risk become contradictory [17, 18]. The individual coping with risk on its own is a deformation of individual self-interest in the risk-resistance scenario. On the one hand, individuals who cope with risk alone infringe on the collective solution because these individuals reduce their contribution to the collective solution. On the other hand, once the collective solution successfully resists the risk, individuals who correspond to the risk alone can also successfully resist the risk and they take advantage of the supporters of the collective solution. Exploring individuals’ choices between individual and collective solutions facilitates the understanding of the group behavior patterns in risk-resistance scenarios.

From the perspective of evolutionary games, this paper explores the effectiveness of two typical risk-response solutions, i.e., the collective solution and the individual solution, under different risks. To achieve this, we propose an evolutionary game model for risk response scenarios. This model refines individuals’ behavior in risky scenarios into four strategies: collective solution supporter, collective solution defender, individual solution supporter, and opportunist. We define the difference between the investment required by individual and collective solutions as the investment gap. Based on multi-agent simulation, we examine the success rates of two solutions and the percentages of four strategies under different investment gaps and risks. The simulation results show that to increase the group success rate in dealing with risk, the investment in individual solution should be no less than the investment in collective solution. Under this condition, high risk boosts the success of individual solution, while collective solution is more competitive in low-risk scenarios.

2 Model

We propose a risk-response model to explore people’s behavior under different risks. The main parameters of the model are shown in Table 1.

Table 1 Notation table

A group is exposed to an external risk and there are two options to resist the risk, a collective solution and an individual solution.

  • A collective solution means that the group works together to resist the risk. A collective solution can successfully resist risk only if the total input I from the supporters of collective solution is greater than \(\lambda \) resource. The success of the collective solution protects everyone from the risk, regardless of whether they are supporters of the collective solution or not.

  • An individual solution is one in which the individual fights the risk alone. The success of an individual solution requires the individual to invest more than \(\beta \) resource. Individual solution can only protect the individual from risk by himself/herself.

Fig. 1
figure 1

Four strategies for individuals to cope with risk. When risk strikes, individuals have four strategies to choose from: Collective Solution Supporter C, Individual Solution Supporter D, Collective Solution Defender P, and Opportunist O, represented by green, red, blue, and yellow human icons, respectively. The black human icons indicate other individuals in the group who are not currently focused and discussed. Collective solution builds a wall against risk for the group, while individual solution protects against risk by building a wall only for the individual himself. The blue hammer represents the regulatory body that would punish investors of the individual solution

Although there are only two ways to resist risk, people employ many strategies to cope with risk. Strategies include using punishment to promote the success of collective solutions, or setting up a third party to monitor individuals’ behavior. Combining punishment with the two risk-resilient solutions, the individual strategies are as follows.

  1. 1.

    Collective solution supporters (C): adopt collective solution to address risk. Each person invests b resource in the collective solution.

  2. 2.

    Individual solution supporters (D): dealing with risk alone. Individuals contribute c resource to individual solution.

  3. 3.

    Collective solution defenders (P): choose collective solution to address risk and support regulators to discipline individuals who choose individual solution. Each defender invests b resource to the collective solution and contributes a resource to support the establishment of the regulatory agency. The regulator is established when the total resources supporting its establishment exceed a threshold. The regulator imposes a penalty on individuals who commit resources to the individual solution.

  4. 4.

    Opportunists (O): avoid being punished by the regulator by changing between the collective and individual solutions. The opportunist contributes b resource to the collective solution when the regulatory agency is established; otherwise contributes c resource to the individual solution.

It is important to note that people who choose the individual solution and support the establishment of the regulator do not exist. The regulator punishes individuals who choose individual solution, so this strategy is not in line with the characteristics that individuals pursue their personal interests. In addition, this strategy does not have comparative advantages over other strategies.

Fig. 2
figure 2

The effectiveness of collective and individual solutions to address risk under different investment gaps. Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 0.25 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8

Fig. 3
figure 3

The effectiveness of collective and individual solutions to address risk under different risks. Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Risks are sampled at intervals of 12.5 starting at 50. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8

As shown in Fig. 1, individuals with strategy C (Fig. 1a) invest their own resources into the collective solution (green bricks in the collective solution). Once the collective solution succeeds, all individuals are protected from risk, regardless of the type of strategy they adopt. Individuals adopting strategy D (Fig. 1b) invest their own resources (red bricks) into the individual solution. The success of an individual program only eliminates risk for the individual himself or herself, not for other individuals. Individuals who adopt strategy P (Fig. 1c) not only invest in the collective solution (blue bricks in the collective solution), but also support the establishment of the regulator (represented by the blue hammer). If the regulator is established, it would impose punishment on investors of the individual solution. And individuals using strategy O (Fig. 1d) adjust their behavior depending on whether the regulator is established or not. If the regulator is set up, the opportunist invests in the collective solution (yellow bricks in the collective solution), otherwise he invests in the individual solution (yellow bricks that cover only himself). By convention [58], we do not consider the possible additional costs associated with strategy O’s adjustment of its own behavior based on the presence or absence of a regulator. It should be noted that in some studies of conditional cooperation strategy [59,60,61], the behavior of individuals adjusting their own strategies according to their peers’ strategies is accompanied by costs. The effect of additional costs on opportunists could be a direction derived from this study.

The risk-response model is proposed based on the two solutions and four strategies. Specifically, a group of N individuals plays a k-round game where each round is a simulation of the population’s response to risk. Before the game, each individual randomly chooses one of the four strategies C, D, P, O as his or her strategy \(s_i\). At the beginning of each round of the game, individuals are allocated R resource. Then, individuals contribute resources to the collective solution b, individual solution c, and the institutional establishment fund a of the regulator according to their own strategies. The rest of the resources are retained by themselves.

Fig. 4
figure 4

Percentage of four strategies in the population when the investment gap changes. Subplots a, b, c and d show the percentage of strategy C, D, P and O, respectively. Investment gaps are sampled at 0.25 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8

Fig. 5
figure 5

Percentage of four strategies in the population when the risk changes. Subplots a, b, c and d show the percentage of strategy C, D, P and O, respectively. Risks are sampled at intervals of 12.5 starting at 50. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8

Fig. 6
figure 6

The impact of establishment fund and punishment intensity of the regulatory agency on the success of collective and individual solutions. Subplots a and b show the success rate of collective solution for changes in establishment fund and punishment intensity, respectively. Punishment intensity is sampled at 1 intervals from 0 to 10, and establishment fund is sampled at 10 intervals from 0 to 100. The risk is 250 and the investment gap is 1

Fig. 7
figure 7

The gradient of selection in dependence on the fraction of C strategies in the well-mixed population of C and O strategies (a), C and D strategies (b), C and P strategies (c), respectively. The gradient of selection in dependence on the fraction of P strategy in the well-mixed population of P and D strategies (d), P and O strategies (e). The gradient of selection in dependence on the fraction of D strategy in the well-mixed population of D and O strategies. Solid (open) circles represent stable (unstable) equilibria. The arrows indicate the evolution of the population state in the limit of rare mutations and strong selection, with dashed lines denoting neutral drift. Parameters: \(N=1000, n=100, R=10, a=1, b=5, c=3, u=8, \alpha =20, \lambda =100\)

If the total institutional establishment fund \(\sum _{s_i=P}^{} a\ge \alpha a\), then the regulator agency can be established and individuals who chooses the individual solution will be punished with u resource. Otherwise, the regulator cannot be established. \(\alpha \) indicates the minimum number of supporters needed for the establishment of a regulatory agency. The opportunist decides which solution he supports based on whether the regulator is established. It is then possible to determine whether the total input of the collective solution \(\sum _{s_i=C or P(or O)}^{} b\ge \lambda b\), where \(\lambda \) is the minimum collective solution supporters required for a successful collective solution. \(\lambda \) portrays the magnitude of the risk. If \(\sum _{s_i=C or P(or O)}^{} b\ge \lambda b\), all people’s remaining resources are protected. If \(\sum _{s_i=C or P(or O)}^{} b< \lambda b\), individuals supporting collective solution lose all their remaining resources, while individuals supporting individual solution may also resist the risk by themselves. If \(c\ge \beta \), individual solution successfully resists the risk and the individual’s resources are retained, otherwise all his resources are lost. \( \beta \) is positively correlated with \(\lambda \), and \(\beta =1.2\lambda b/N\). After responding to the risk, individuals who choose individual solution are punishment u resource if the regulator is established.

At the end of each round of the game, everyone in the group learns. Individual i randomly selects learning object j from the population, and the probability that i adopts j’s strategy is \( p_{ij}=\frac{1}{1+e^{\left( r_i - r_j \right) / {\theta }}}\). \(\theta \in \left[ 0,1 \right] \) reflects the strength of selection. In addition to learning, m of individuals in the population undergo mutation, and mutated individuals randomly select strategies from the set of all strategies. \(m\in \left[ 0,1 \right] \) is the mutation rate of the population.

This paper explores people’s behavior under different risks through simulation. In our simulation setup, the group size \(N=100\) and the number of game rounds \(k=500\). Initial resources \(R=10\). The investment to support the establishment of regulatory agency \(a=1\), and the minimum supporters needed to establish a regulatory agency \(\alpha = 20\). Learning parameter \(\theta =0.1\) and mutation rate \(m=0.05\). We define investment gap \(g=b-c\) as the difference in resource investment between the two solutions.

Existing studies of risk social dilemma models [62] tend to introduce risk as a parameter into classical game models to examine the effect of risk invaded with probability on the share of group cooperation [63, 64]. In contrast to PGG models with risk, our proposed model focuses in particular on two coping styles for deterministic and global risks, namely the collective solution and the individual solution. The two coping styles are derived from real-world observations. For example, in infectious disease prevention and control, individuals can choose to stay out of their homes, which is an individual solution, or they can wear a mask and socialize normally, which is more of a collective solution. In addition, the impact of risk in our model is deterministic and global. Once the risk resistance fails, then all people’s interests will be damaged. Public crisis events such as environmental pollution and natural disasters reflect such global risk characteristics.

3 Simulation results

3.1 Effectiveness of collective and individual solutions under different investment gaps

Collective and individual solutions perform differently in resisting risk under different investment gaps. As shown in Fig. 2, the success rate of collective solution varies with the investment gap. As the investment gap increases, the success rate first decreases from 0.2 to 0 and then increases. Specifically, as shown in Fig. 2a, b, when the investment gap is less than zero, the success rate of individual solution is zero indicating that the investment of individual solution is not sufficient to withstand the risk. The group can only rely on the collective solution to cope with the risk. However, as shown in Fig. 2c, even with a high success rate of collective programs, the group can successfully resist the risk in less than 40% of cases. In most cases, the group will have to be exposed to the risk and lose benefits. As the investment gap widens, investment in individual solutions increases, making individual solutions rapidly more competitive. In Fig. 2b, the success rate of individual solution grows all the way to 100%. And the less risky it is, the less input is needed for the success of the individual solution. The investment in individual solution is not as large as it should be. When it is larger than the investment in collective solution, the competitiveness of individual solution decreases and the success rate of collective solution is much higher. We can see that collective solution can successfully withstand risk when the risk is not too large (risk=150). In the case of higher risk (risk = 300), the collective solution needs to work together with the individual solution to completely eliminate the risk for the group.

3.2 Effectiveness of collective and individual solutions under different risks

Risks also affect the success of collective and individual programs to counteract risks. When the investment gap is greater than 0, the larger the risk the lower the success rate of the collective solution and the higher the success rate of the individual solution. Corresponding to Fig. 3c, a success rate of 100% for coping with risk indicates that the group always achieves risk-resilient success regardless of the varying success rates of the two solutions. When the investment gap is less than 0, a small increase in risk significantly reduces the success rate of the collective solution. Figure 3a shows that in the case of risk greater than 50, the collective solution fails completely and the individual solution replaces the collective solution to complete the defense against risk. However, when the risk exceeds a certain threshold, the success rate of individual solution rapidly decreases to 0. Although the success rate of collective solution increases, it is much less than 1. So the group is exposed to the risk in more than 60% of cases. In addition, the smaller the investment gap, the more likely it is that the group cannot withstand high risk.

3.3 Percentage of strategies under different investment gaps

The four strategies C, D, P and O demonstrate their respective characteristics in the process of interaction with each other. As shown in Fig. 4, the trends in the proportions of strategy C and strategy D (in Fig. 4a, b) are similar to the changes in the success rates of collective and individual solutions. However, the percentage of strategy C and D is lower than the success rate of the two solutions in Fig. 2a, b. This is because strategy O employs either collective or individual programs in different situations. For strategy P, the presence of strategy P is closely related to the punishment and therefore also affects the behavior of strategy O. As shown in Fig. 4b–d, when the investment gap is less than 0, individuals with strategy P would be present at large risk, and those with strategy O would choose the collective solution. When the investment gap is greater than 0, the share of strategy P is significantly lower and strategy O is more likely to choose the individual solution. We find that depending on the share of strategy P, strategy O dynamically shifts to strategy C or D, thus maintaining its competitiveness. As shown in Fig. 4, with an investment gap less than zero, the viability of strategy O is fairly stable with a share of about 50%, regardless of risk. As the investment gap increases, the share of strategy O decreases. At this point, the smaller the risk, the faster the percentage of strategy O decreases. The riskiest case (risk=350) has a small decrease in the percentage of strategy O.

3.4 Percentage of strategies under different risks

Risk also affects the shares of the four strategies, which show different patterns under different investment gaps. As shown in Fig. 5c, d, when the investment gap is greater than 0, the higher the risk, the smaller the share of strategy C and the larger the share of strategy D. On the other hand, when the investment gap is less than 0, higher risk triggers an increase in the share of strategy C and a decrease in the share of strategy D. For strategy O, the trend in the percentage of strategy O is the same as that of strategy D in the case where the investment gap is not less than 0. This indicates that strategy O performs equally with strategy D at this time. The share of strategy O is largely stable when the investment gap is less than 0, in contrast to the rapidly declining trend of the share of strategy D. This phenomenon indicates that strategy O shifts from behaving like strategy D to strategy C at this time, maintaining its competitiveness. We can see that the share of strategy P increases with increasing risk when the investment gap is not less than 0 and decreases with increasing risk when the investment gap is less than 0. Because strategy P supports the punishment for individual solution proponents, strategy O adjusts its behavior according to the share of strategy P. The change in the percentage of strategy P verifies the above speculation about the dynamic transformation of strategy O’s behavior between and strategy C and strategy D.

As shown in Fig. 5b–d, in the case where risk is not too small, if the investment gap is so small that the amount of contribution from individual solutions is not enough to help individuals defend against risk, then the collective solution becomes the only option to fight the risk. At this point, there is a certain amount of P-strategy individuals in the group to suppress strategy D and strategy O, so that the number of C-strategy individuals can meet the needs of the collective solution. As the collective solution does not have much advantage over the individual side, there will also be a certain amount of strategy D and strategy O. On the other hand, when the investment gap is large, i.e., the collective solution has a lower cost relative to the individual solution, strategy C rises rapidly as the share of strategy P increases until strategy C becomes the dominant strategy in the group (Fig. 5a–c). At this point, the group relies entirely on the collective solution to withstand risk (Fig. 2a, risk = 50 or 100). However, collective solution defenders (P) take on additional funding for the establishment of the regulator in addition to supporter collective solution, which gives a ride to the simple collective solution supporter (C). This second-order free rider behavior inhibits the proliferation of strategy P in evolution, which is also detrimental to the functioning of collective solutions. In previous studies [65,66,67], potential methods to inhibit second-order free rider include adding regulators to enforce reward allocation and introducing spatial structure in the group. These measures provide a basis for in-depth exploration to improve the competitiveness of collective solutions by suppressing second-order free rider in risk response scenarios.

3.5 Role of the regulator

The establishment fund and punishment intensity of the regulatory agency have no significant effect on the success of collective and individual solutions. The regulator is able to drive individuals using strategy O to invest in the collective solution and impose punishment on investors in the individual solution. So, would a regulatory agency with less establishment fund and higher penalties make more people opt for collective solution? Counter-intuitively, as shown in Fig. 6, the simulation results show that changes in the regulator-related parameters have no appreciable influence on the success rate of collective solution except for the case of a small fund with high intensity. This may be because the regulator acts as a revenue moderator. The presence of the regulator affects the evolutionary stable state among the four strategies, but the changes in its parameters only impact the evolutionary process and are not related to the evolutionary outcome. This finding inspires us to rethink about the role and measures of central institutions such as the government in dealing with risk.

4 Evolutionary dynamics

Based on the proposed risk-resilient model, people’s payoffs can be divided into four cases according to whether the regulator is established and whether the collective solution is successful. The expected payoffs \(\pi _C, \pi _D,\pi _P,\pi _O\) for strategies C, D, P, and O are as follows. \(0\le a\le R \), \(0\le b\le R \), \(0\le c\le R \). \( a+b\le R\), \( c+u\le R\)

When the regulator is established and the collective solution is successful, i.e., when \(\sum _{s_i=P}^{} a\ge \alpha a\) and \(\sum _{s_i=C or P or O}^{} b\ge \lambda b\):

$$\begin{aligned} \pi _C= & {} \frac{\sum _{j=\lambda -i-1,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=\alpha }^{n-1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C+N_O-1\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-N_O\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\left( R-b \right) \\ \pi _D= & {} \frac{\sum _{j=\lambda -i,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=\alpha }^{n-1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C+N_O\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-N_O-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\left( R-c-u \right) \\ \pi _P= & {} \frac{\sum _{j=\lambda -i-1,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=\alpha -1}^{n-1}\left( {\begin{array}{c}N_P-1\\ i\end{array}}\right) \left( {\begin{array}{c}N_C+N_O\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-N_O\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\left( R-a-b \right) \\ \pi _O= & {} \frac{\sum _{j=\lambda -i-1,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=\alpha }^{n-1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C+N_O-1\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-N_O\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\left( R-b \right) \end{aligned}$$

When the regulator is established and the collective solution fails, i.e., when \(\sum _{s_i=P}^{} a\ge \alpha a\) and \(\sum _{s_i=C or P or O}^{} b < \lambda b\):

$$\begin{aligned}{} & {} \pi _C=0 \pi _D=\\{} & {} \left\{ \begin{array}{cl} \frac{\sum _{j=0,i+j\le n-1,j\ge 0}^{\lambda -i-1}\sum _{i=\alpha }^{\lambda -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C+N_O\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-N_O-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\ \left( R-c-u \right) c\ge \beta \\ 0 c< \beta \end{array}\right. \\{} & {} \pi _P=0 \quad \pi _O=0\end{aligned}$$

When regulators fail to establish and collective solution works, i.e., when \(\sum _{s_i=P}^{} a < \alpha a\) and \(\sum _{s_i=C or P or O}^{} b \ge \lambda b\):

$$\begin{aligned} \pi _C= & {} \frac{\sum _{j=\lambda -i-1,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=0}^{\alpha -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C-1\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\{} & {} \left( R-b \right) \\ \pi _D= & {} \frac{\sum _{j=\lambda -i,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=0}^{\alpha -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\{} & {} \left( R-c \right) \\ \pi _P= & {} \frac{\sum _{j=\lambda -i-1,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=0}^{\alpha -2}\left( {\begin{array}{c}N_P-1\\ i\end{array}}\right) \left( {\begin{array}{c}N_C\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\{} & {} \left( R-a-b \right) \\ \pi _O= & {} \frac{\sum _{j=\lambda -i,i+j\le n-1,j\ge 0}^{n-i-1}\sum _{i=0}^{\alpha -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\{} & {} \left( R-c \right) \end{aligned}$$
Fig. 8
figure 8

Schematic representation of possible transitions between populations under the parameters that \(N=1000, n=100, R=10, a=1, b=5, c=3, u=8, \alpha =20, \lambda =100.\) Each colored circle corresponds to a population state in which all members hold the strategy. The arrows indicate the evolution of the population state in the limit of rare mutations and strong selection, and the dashed lines indicate neutral drift. As shown in the graph, strategy D and O are in a neutral drift relationship and the population will evolve to a mixture of D and O strategies. This result is consistent with the findings in Fig. 4 at a risk of 50 investment gap of \(-\,\)3, which are equivalent to the parameter settings in the graph

When regulators fail to establish and collective solution fails, i.e., when \(\sum _{s_i=P}^{} a < \alpha a\) and \(\sum _{s_i=C or P or O}^{} b < \lambda b\):

$$\begin{aligned}\pi _C= & {} 0 \\ \pi _D= & {} \left\{ \begin{array}{cl} \frac{\sum _{j=0,i+j\le n-1,j\ge 0}^{\lambda -i-1}\sum _{i=0}^{\alpha -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\ \left( R-c \right) c\ge \beta \\ 0 c< \beta \end{array}\right. \\ \pi _P= & {} 0 \\ \pi _O= & {} \left\{ \begin{array}{cl} \frac{\sum _{j=0,i+j\le n-1,j\ge 0}^{\lambda -i-1}\sum _{i=0}^{\alpha -1}\left( {\begin{array}{c}N_P\\ i\end{array}}\right) \left( {\begin{array}{c}N_C\\ j\end{array}}\right) \left( {\begin{array}{c}N-N_P-N_C-1\\ n-i-j-1\end{array}}\right) }{\left( {\begin{array}{c}N-1\\ n-1\end{array}}\right) }\\ \left( R-c \right) c\ge \beta \\ 0 c< \beta \end{array}\right. \end{aligned}$$

The numerical calculations is provided to show the evolutionary dynamics of the four strategies by presenting the selection gradient in each two-two pair population, as shown in Fig. 7. For a population of C and O (C and D), the gradient of selection of strategy C is always negative, hence strategy O (D) dominates the whole population for any initial conditions, as depicted in Fig. 7a (b). In case of a population of C and P, strategy C’s gradient selection is always positive, thus the population would be dominated by strategy C, as shown in Fig. 7c. Figure 7 d tells us there is an unstable intermediate equilibrium point in the population of strategy C and P. In this case, if the initial fraction of P strategy is below this critical point, then the population will evolve to a pure state of D strategy. Alternatively, when the initial fraction of P strategy is above the threshold, then the population will drift towards a full collective solution defender state. For a population of P and O, it is shown in Fig. 7 f that the selection gradient of strategy P is always negative, thus strategy O dominates the population. At last, as can be seen in Fig. 7e, the strategy of D and O is neutral drift in a population of these two strategies. It means that in this case the population will evolve to a mixture of strategy D and O.

Fig. 9
figure 9

The effectiveness of collective and individual solutions to address risk under different investment gaps when the number of game rounds \(k=1000\). Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 0.25 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8. Compared with Fig. 2, the same trends of the effectiveness of collective solution and individual solution are found

Fig. 10
figure 10

The effectiveness of collective and individual solutions to address risk under different investment gaps when the number of game rounds \(k=2000\). Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 1 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8. Compared with Fig. 2, we found the same trend in the effectiveness of collective solutions and individual solutions

Fig. 11
figure 11

The effectiveness of collective and individual solutions to address risk under different investment gaps when the number of game rounds \(k=3000\). Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 1 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8. Compared with Fig. 2, the same trends of the effectiveness of collective solution and individual solution are found. It suggests that the discovered trend is not affected by different numbers of game rounds

Fig. 12
figure 12

The effectiveness of collective and individual solutions to address risk under different investment gaps when the group size \(N=500\). Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 0.25 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8. Comparing with Fig. 2, we can see the roughly same trends of the effectiveness of both collective solution and individual solution still hold

Fig. 13
figure 13

The effectiveness of collective and individual solutions to address risk under different investment gaps when the group size \(N=1000\). Subplots a, b, and c show the success rate of collective solution, the success rate of individual solution, and the failure rate of group resisting risk, respectively. Investment gaps are sampled at 1 intervals from \(-\,\)3 to 3. Each sampled value is the average of 400 simulations. The establishment fund of the regulator is 20 and the punishment intensity is 8. Comparing with Fig. 2, we found approximately the same trends in both collective solution and individual solution. Therefore, the resulting trend is insensitive to different values of the group size

The numerical calculations of the four strategies under the parameters in Fig. 7 provide the possibility to understand the dynamics of the model, as illustrated in Fig. 8. First. as can be seen, there is no ESS in pure strategies. Among the four strategies, strategy O invades P and C, strategy D invades C, and strategy C invades P. Between strategy P and D there is a bistable competition, it means that none of the two strategies is able to invade the other. Considering the fact no one can invade strategy D and O, the population will be governed by the neural drift between strategy D and O. This numerical analysis confirms the findings in Fig. 4 at a risk of 50 investment gap of \(-\,\)3, which are equivalent to the parameter settings in Figs. 7 and 8.

5 Conclusion

Previous studies of risk social dilemma models tend to introduce risk as a parameter into classical game models to examine the effect of risk invading with probability on the share of group cooperation [68,69,70]. However, little attention has been paid on the different coping styles for deterministic and global risks. To fill the gap, this paper proposes an extended public goods game model that includes opportunists to explore the effectiveness of collective and individual solutions in protecting the group from risk. We examine the success of group coping with risk and the strategy choices of individuals under different requirements for individual solution investment and collective solution investment when the establishment of the regulator is jointly decided by the group.

Our results show that the lower the investment gap is, the lower the success rate of the group against risk. The difference between the required investment of the individual solution and the collective solution is defined as the investment gap. To improve the risk-resilience ability of the group, the required investment of the individual solution should be at least no less than that of the collective solution. With this condition satisfied, high risk increases the success of individual solution, while the collective solution is more competitive in the low-risk scenarios. In addition, we find that the establishment fund and punishment intensity of the regulator have no significant impact on the effectiveness of the two risk response solutions.This means that regulators, represented by governments, may need to adjust their positioning and governance measures to respond to global risk events.

In terms of research limitations, our model should take into account the complex reality. For example, the model may induce the role of loners, i.e., a strategy that does nothing in the face of risks. Also, opportunist behavior in reality is likely to be costly, which is currently unconsidered. How to curb second-order free-rider behavior of collective solution supporters toward collective solution defenders is another important question. This question deserves to be explored in depth. Rather than acting probabilistically at the individual level, risk in our model has global and deterministic effects, reflecting the characteristics of public crisis events such as epidemics. Hence, the analysis of the coordination of collective and individual risk-coping solutions in this paper may yield insights for public health crisis management.