1 Introduction

Evolutionary game theory is the study of population changes driven by competition among different strategies. A recent adjustment of evolutionary game models with the aim of better representing the natural world is the inclusion of strategy-dependent feedback, specifically, environmental feedback (Weitz et al. 2016). This type of game is called an eco-evolutionary game. This type of strategy-dependent feedback can be seen in many complex systems, such as ecological metacommunities (Leibold and Chase 2018), collectives of insect individuals (Hanski 2011; Stella et al. 2022b), microbial populations (West et al. 2006; Sanchez and Gore 2013; Estrela et al. 2018), and human social and reproductive structures (Mullon et al. 2017; Rand et al. 2017). A major question with models of eco-evolutionary game dynamics is conditions under which cooperation in a population can thrive when the payoff matrix, which we regard as the environment, is influenced by the action of players. Extensions of the original eco-evolutionary game dynamics models include the addition of finite carrying capacity (Bairagya et al. 2021), renewable and decaying resources (Tilman et al. 2020; Wang and Fu 2020; Yan et al. 2021), imitation and aspiration dynamics (Arefin and Tanimoto 2021), mutation of players (Gong et al. 2022), reciprocity dynamics (Ma et al. 2024), and extension to public goods games (Shao et al. 2019; Wang and Fu 2020; Jiang et al. 2023; Han et al. 2024). The models can also be extended in terms of additional types of dynamic feedback, such as non-constant enhancement or degradation rates of the environmental variable, which depends on the payoff of players (Cao and Wu 2021), and global and local environment fluctuations (Jiang et al. 2023).

Given that players of the game are embedded in structured populations in reality, evolutionary game models have been extended to the case of various networks (Nowak 2006; Szabó and Fáth 2007; Perc et al. 2013; Wang et al. 2024). Similarly, players involved in an eco-evolutionary game may be better interpreted to inhabit on nodes of a network. Therefore, eco-evolutionary games have been extended to the case of networks. For example, in eco-evolutionary games on regular graphs, it was found that a higher degree of the node creates oscillatory behavior in the population and that a lower degree promotes spread of cooperation (Stella et al. 2022a; Zhang et al. 2023). Spatial networks are also commonly used for exploring how environmental feedback promotes cooperation (Jin et al. 2018; Szolnoki and Chen 2018; Wu et al. 2018, 2019; Hauert et al. 2019; Lin and Weitz 2019; Yang and Zhang 2021; Ding et al. 2023; He et al. 2023; Lu et al. 2023; Zhu 2023). Lastly, through the use of bimatrix payoffs, which are equivalent to the complete bipartite graph as population structure in the case of symmetric payoff matrices, periodic orbits in the state space have been proven to exist (Gong et al. 2018; Kawano et al. 2019; Liu et al. 2020; Shu and Fu 2022).

However, there are some vital gaps missing in the prior research on eco-evolutionary games on networks. First, in complete bipartite graphs (Gong et al. 2018; Kawano et al. 2019; Liu et al. 2020; Shu and Fu 2022), the players do not interact within each community. This assumption is suitable for modeling situations in which the population of players is divided into two different roles but otherwise not in general. Second, in most of the previous studies, the environmental state is assumed to be either a globally shared variable (Gong et al. 2018; Kawano et al. 2019; Liu et al. 2020; Shu and Fu 2022; Stella et al. 2022a; Zhang et al. 2023) or local to each node (i.e., player) (Jin et al. 2018; Szolnoki and Chen 2018; Wu et al. 2018, 2019; Hauert et al. 2019; Lin and Weitz 2019; Yang and Zhang 2021; Ding et al. 2023; He et al. 2023; Lu et al. 2023; Zhu 2023). However, it may be more realistic to assume that the environment is shared across some, but not all, players (Fahimipour et al. 2022; Guimarães 2020). For example, a meta-community in ecological systems may be an appropriately sized unit for considering an environmental variable (Holyoak 2009; Brechtel et al. 2018; Leibold and Chase 2018; Gross et al. 2020). Other eco-evolutionary game models assume network structure and assign a local environmental variable to each edge between a pair of players (He et al. 2023; Zhu 2023).

In the present study, we extend a previously proposed model of eco-evolutionary dynamics (Weitz et al. 2016) to the case of networks with equally sized two communities. Unlike the complete bipartite graph models proposed in Gong et al. (2018), Kawano et al. (2019), and Shu and Fu (2022) where the players in each community only interact with those in the other community, we assume that players not only interact with those in the other community but also with those in the same community. Next, we assume that the state of the environment depends on the type of edge in the network, similarly to He et al. (2023) and Zhu (2023). We crucially assign one environmental variable to each type of edge, i.e., the edges within the first community, those within the second community, and those connecting the two communities. In this manner, we model the situation in which two players forming an edge may improve or deteriorate their shared environment, which is assumed to be on the edge. We do not distinguish between edges of the same type because of the symmetric population structure assumed. Unlike the previous studies similarly assuming edge-dependent environmental states (He et al. 2023; Zhu 2023), our two-community network model, which is a minimal network model, allows analytical investigations.

Our paper is organized as follows. In Sect. 2, we describe our model in detail and focus on eco-evolutionary dynamics with two network communities. In Sects. 3 and 4, respectively, we present our stability analysis of the simplified replicator dynamics resulting from different symmetry assumptions. In Sect. 5, we numerically investigate the rich dynamical behavior of the general model. Finally, we discuss contributions of the current work along with an outlook for future work.

2 Model

Consider an eco-evolutionary game in a population composed of two communities. Each player chooses either of the two actions, i.e., cooperation or defection. We assume that there are N players in total and N/2 players in each community. We assume that the entire population is infinite (i.e., \(N\rightarrow \infty \)) and that the players interact with each other player within the same community at rate \(1-\delta \) and with each player in the other community at rate \(\delta >0\). See Fig. 1 for a schematic.

Fig. 1
figure 1

Schematic of the two-community network. A filled circle represents a player. Two players from the same community interact at rate \(1-\delta \). Two players from the opposite communities interact at rate \(\delta \). Without loss of generality, we normalize the rate parameter \(0< \delta < 1\). We only show some edges for visualization purposes

We consider replicator dynamics for a population on the two-community network with feedback-evolving games. Crucially, we assume that the state of the environment depends on the type of edge in the network. We denote by \(n_1 \in [0, 1]\) the state of the environment in community 1, representing the edges within community 1, by \(n_2 \in [0, 1]\) the state of the environment in community 2, and by \(n_{12} \in [0, 1]\) the state of the environment used when a player in community 1 and one in community 2 interact. The environment-dependent payoff matrices for community 1, 2, and in between are assumed to be given by

$$\begin{aligned} A(n) = (1-n)\begin{pmatrix}R_0&{}S_0\\ T_0&{}P_0\end{pmatrix}+n\begin{pmatrix}R_1&{}S_1\\ T_1&{}P_1\end{pmatrix}, \end{aligned}$$
(1)

where n is either \(n_1\), \(n_2\), or \(n_{12}\). We assume that, if \(n=0\), then cooperation is the unique Nash equilibrium, i.e., \(R_0>T_0\) and \(S_0>P_0\). If \(n=1\), then defection is the unique Nash equilibrium, i.e., \(R_1<T_1\) and \(S_1<P_1\). We label the prior inequalities as

$$\begin{aligned} R_0>T_0,\;S_0>P_0,\;&\;R_1<T_1,\;S_1<P_1. \end{aligned}$$
(2)

Let us define \({\textbf {q}}_1\) and \({\textbf {q}}_2\) as the two-dimensional payoff vector for a player in community 1 and 2, respectively. The first entry of the vector is the payoff for a cooperator. The second entry of the vector is the payoff for a defector. Define x and y as the fraction of cooperators in community 1 and 2, respectively. The fraction of defectors in community 1 and 2 is \(1-x\) and \(1-y\), respectively. We obtain

$$\begin{aligned} {\textbf {q}}_1&=(1-\delta )A(n_1){\textbf {x}}+\delta A(n_{12}){\textbf {y}}, \end{aligned}$$
(3)
$$\begin{aligned} {\textbf {q}}_2&=(1-\delta )A(n_2){\textbf {y}}+\delta A(n_{12}){\textbf {x}}, \end{aligned}$$
(4)

where \({\textbf {x}} = \begin{pmatrix}x&1-x \end{pmatrix}^{\top }\), \({\textbf {y}} =\begin{pmatrix}y&1-y \end{pmatrix}^{\top }\), and \(^\top \) denotes the transposition. The first term on the right-hand side of Eqs. (3) and (4) is the payoff obtained by playing with the other players in the same community. The second term is the payoff obtained by playing with the players in the opposite community.

We assume that the competition between cooperation and defection occurs only within each community because players inhabiting different communities may perceive the different environments due to the different state of the environment. Then, the replicator dynamics are given by

$$\begin{aligned} \dot{x}&=x(1-x)(q_{11} - q_{12}), \end{aligned}$$
(5)
$$\begin{aligned} \dot{y}&=y(1-y)(q_{21} - q_{22}), \end{aligned}$$
(6)

where \(q_{11}\), \(q_{12}\), \(q_{21}\), and \(q_{22}\) are defined by

$$\begin{aligned} {\textbf {q}}_i = \begin{pmatrix} q_{i1} \\ q_{i2} \end{pmatrix} \end{aligned}$$
(7)

with \(i \in \{1, 2 \}\).

We give the dynamics of the environmental state of each type of edge by

$$\begin{aligned} \dot{n}_1&=n_1(1-n_1) \left[ \theta _1x-(1-x)\right] , \end{aligned}$$
(8)
$$\begin{aligned} \dot{n}_2&=n_2(1-n_2) \left[ \theta _2y-(1-y)\right] , \end{aligned}$$
(9)
$$\begin{aligned} \dot{n}_{12}&=n_{12}(1-n_{12}) \left[ \theta _{12}z-(1-z) \right] , \end{aligned}$$
(10)

where z is the fraction of cooperators in the entire population, i.e., \(z \equiv (x+y)/2\), and \(\theta _1>0\), \(\theta _2>0\), and \(\theta _{12}>0\) are the ratio of enhancement to degradation of the environmental variable for the respective edge type. For example, if \(\theta _1\) is large, then enhancement of the environment in community 1 occurs at a relatively small fraction of cooperators, x.

We let \(R_3=R_0-R_1\), \(T_3=T_0-T_1\), \(P_3=P_0-P_1\), and \(S_3=S_0-S_1\). Then, we obtain the five-dimensional dynamical system given by

$$\begin{aligned} \dot{x} =&x(1-x)[(R_0-T_0-S_0+P_0)x+S_0-P_0 \nonumber \\ {}&-n_1(S_3-P_3)-\delta [(R_0-T_0-S_0+P_0)(x-y) \nonumber \\ {}&-(R_3-T_3-S_3+P_3)(n_1x-n_{12}y)-(S_3-P_3)(n_1-n_{12})]], \end{aligned}$$
(11)
$$\begin{aligned} \dot{y} =&y(1-y)[(R_0-T_0-S_0+P_0)y+S_0-P_0 \nonumber \\ {}&-n_2(S_3-P_3)-\delta [(R_0-T_0-S_0+P_0)(y-x) \nonumber \\ {}&-(R_3-T_3-S_3+P_3)(n_2y-n_{12}x)-(S_3-P_3)(n_2-n_{12})]], \end{aligned}$$
(12)

and Eqs. (8), (9), and (10).

3 Three-Dimensional System with \(\theta _1\ne \theta _{12}\)

In this section, we assume that \(\theta _1=\theta _2\), and that the initial condition satisfies \(x=y\) and \(n_1=n_2\). Then, \(x=y\) and \(n_1=n_2\) hold true for any \(t>0\). We further assume that \(\theta _1=\theta _2\ne \theta _{12}\). In this case, the original five-dimensional dynamical system is reduced to the three-dimensional dynamical system given by

$$\begin{aligned} \dot{x}&=x(1-x)[(R_0-T_0-S_0+P_0)x+S_0-P_0 \nonumber \\&\;\;\;-\left[ n_1(1-\delta )+\delta n_{12}\right] [(R_3-S_3-T_3+P_3)x+(S_3-P_3)]], \end{aligned}$$
(13)
$$\begin{aligned} \dot{n}_1&=n_1(1-n_1)[\theta _1x-(1-x)], \end{aligned}$$
(14)
$$\begin{aligned} \dot{n}_{12}&=n_{12}(1-n_{12})[\theta _{12}x-(1-x)]. \end{aligned}$$
(15)

We analyze the equilibria and dynamics of this three-dimensional dynamical system. The Jacobian of this dynamical system is given by

$$\begin{aligned} J(x,n_1,n_{12})=\begin{pmatrix} x(1-x)\frac{\partial g}{\partial x} &{} x(1-x)\frac{\partial g}{\partial n_1} &{} x(1-x)\frac{\partial g}{\partial n_{12}}\\ +(1-2x)g(x,n_1,n_{12})&{}&{}\\ &{} -n_1(\theta _1x+x-1) &{} \\ n_1(1-n_1)(1+\theta _1)&{}+(1-n_1)(\theta _1x+x-1)&{}0\\ &{}&{}-n_{12}(\theta _1x+x-1)\\ n_{12}(1-n_{12})(1+\theta _1)&{}0&{}+(1-n_{12})(\theta _1x+x-1) \end{pmatrix}, \end{aligned}$$
(16)

where

$$\begin{aligned} g(x,n_1,n_{12})=q_{11}-q_{12}, \end{aligned}$$
(17)

and \(q_{11}\) and \(q_{12}\) are given by Eq. (7).

3.1 Corner Equilibria

We denote by \(x^*\) the equilibrium of x and similar for the other dynamical variables. By setting \(x^*\), \(n_1^*\), and \(n_{12}^*\) to 0 or 1, specifying the corners of the unit cube defined by \(0\le x, n_1, n_{12} \le 1\), we obtain 8 corner equilibria. We show in Appendix A that each corner equilibrium is a saddle.

3.2 Interior Equilibria

In this section, we seek interior equilibria, i.e., those in which \(0<x^*\), \(n_1^*\), \(n_{12}^*<1\). By setting \(\dot{n}_1 = 0\) and \(\dot{n}_{12} = 0\) in Eqs. (14) and (15), respectively, we obtain \(x^*=\frac{1}{1+\theta _1}\) and \(x^*=\frac{1}{1+\theta _{12}}\), which is a contradiction, because we assumed \(\theta _1 \ne \theta _{12}\). Therefore, there are no internal equilibria.

3.3 Edge Equilibria

Let us examine possible equilibria on the edge of the unit cube, which we call edge equilibria. At an edge equilibrium, one variable out of \(x^*\), \(n_1^*\), or \(n_{12}^*\) is between 0 and 1, and the other two variables are either 0 or 1. If \(x^*= 0\) or 1, then Eqs. (14) and (15) imply that \(n_1^*, n_{12}^*\in \{0, 1\}\), leading to corner equilibria. Therefore, there is no edge equilibrium satisfying \(x^*\in \{ 0, 1 \}\). Therefore, we search for edge equilibria such that \(0<x^*<1\) and \(n_1, n_{12}\in \{0,1\}\). Pairs \((n_1, n_{12}) = (0, 0)\) and (1, 1) violate Eq. (2). The other two pairs, i.e., \((n_1, n_{12}) = (0, 1)\) and (1, 0), provide equilibria.

The edge equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_0-S_0-\delta (P_0-P_1-S_0+S_1)}{R_0-T_0-S_0+P_0-\delta \gamma },0,1\right) \), where

$$\begin{aligned} \gamma = R_0-R_1-T_0+T_1-S_0+S_1+P_0-P_1, \end{aligned}$$
(18)

is stable if and only if

$$\begin{aligned} (P_0 - S_0) (R_1 - T_1)&>(P_1 - S_1) (R_0 - T_0), \end{aligned}$$
(19)
$$\begin{aligned} \delta _\textrm{c,1}<&\delta < \delta _\textrm{c,2}, \end{aligned}$$
(20)

and

$$\begin{aligned} \theta _{12}&>\theta _1, \end{aligned}$$
(21)

where

$$\begin{aligned} \delta _\textrm{c,1} \equiv&\frac{R_0-T_0-P_0\theta _1+S_0\theta _1}{\rho _1}, \end{aligned}$$
(22)
$$\begin{aligned} \delta _\textrm{c,2} \equiv&\frac{R_0-T_0-P_0\theta _{12}+S_0\theta _{12}}{\rho _{12}}, \end{aligned}$$
(23)
$$\begin{aligned} \rho _1=&R_0-R_1-T_0+T_1-P_0\theta _1+P_1\theta _1+S_0\theta _1-S_1\theta _1, \end{aligned}$$
(24)
$$\begin{aligned} \rho _{12}=&R_0-R_1-T_0+T_1-P_0\theta _{12}+P_1\theta _{12}+S_0\theta _{12}-S_1\theta _{12}. \end{aligned}$$
(25)

If either Eqs. (19), (20), or (21) is not met, the equilibrium is unstable. We derive Eqs. (19), (20), and (21) in Appendix B.

The equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_1-S_1+\delta (P_0-P_1-S_0+S_1)}{R_1-T_1-S_1+P_1+\delta \gamma },1,0\right) \) is stable if and only if Eq. (19),

$$\begin{aligned} \delta _\textrm{c,3}< \delta < \delta _\textrm{c,4}, \end{aligned}$$
(26)

and

$$\begin{aligned} \theta _{12} < \theta _1, \end{aligned}$$
(27)

where

$$\begin{aligned} \delta _\textrm{c,3} \equiv \frac{-R_1+T_1+P_1\theta _1-S_1\theta _1}{\rho _1} \end{aligned}$$
(28)

and

$$\begin{aligned} \delta _\textrm{c, 4} \equiv \frac{-R_1+T_1+P_1\theta _{12}-S_1\theta _{12}}{\rho _{12}}, \end{aligned}$$
(29)

hold true. If either Eqs. (19), (26), or (27) is not met, the equilibrium is unstable. The derivation is given in Appendix B.

3.4 Face Equilibria

In this section, we seek equilibria on the face of the unit cube, i.e., those in which just one of \(x^*\), \(n_1^*\), or \(n_{12}^*\) is either 0 or 1 and the other two are between 0 and 1. We call these equilibria face equilibria. Similarly to the case of the edge equilibria, if we let \(x^*=0\) or 1, then we obtain a corner equilibrium. Therefore, we assume that \(0<x^*<1\). By setting just one of \(n_1^*\) or \(n_{12}^*\) to 0 or 1, we obtain the four face equilibria shown in Table 1.

Table 1 Face equilibria of the three-dimensional dynamics when \(\theta _1 \ne \theta _{12}\)

For the equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{1}{1+\theta _1},\frac{R_0-T_0-P_0\theta _1+S_0\theta _1}{(1-\delta )\rho _1},0\right) \), the Jacobian is given by

$$\begin{aligned} J = \begin{pmatrix} J^{(1)}_{11} &{}J^{(1)}_{12} &{} J^{(1)}_{13}\\ J^{(1)}_{21}&{}0&{}0\\ 0&{}0&{}J^{(1)}_{33} \end{pmatrix}, \end{aligned}$$
(30)

where

$$\begin{aligned} J^{(1)}_{11}&=\frac{\left[ (P_1 - S_1) (R_0 - T_0)-(P_0 - S_0) (R_1 - T_1)\right] \theta _1}{(1 + \theta _1) \rho _1}, \end{aligned}$$
(31)
$$\begin{aligned} J^{(1)}_{12}&=\frac{-(1-\delta ) \theta _1 \rho _1}{(1 + \theta _1)^3},\end{aligned}$$
(32)
$$\begin{aligned} J^{(1)}_{13}&=\frac{-\delta \theta _1 \rho _1}{(1 + \theta _1)^3},\end{aligned}$$
(33)
$$\begin{aligned} J^{(1)}_{21}&=\frac{-(1 + \theta _1) \left[ R_0 - T_0 - (P_0 - S_0) \theta _1\right] (R_1- T_1- P_1 \theta _1 +S_1 \theta _1+\delta \rho _1)}{(1- \delta )^2 \rho _1^2},\end{aligned}$$
(34)
$$\begin{aligned} J^{(1)}_{33}&=\frac{\theta _{12}-\theta _1}{1+\theta _1}. \end{aligned}$$
(35)

The characteristic equation is given by,

$$\begin{aligned} \det (J - \lambda I)=\left( J^{(1)}_{33}-\lambda \right) \left( \lambda ^2-J^{(1)}_{11}\lambda -J^{(1)}_{12}J^{(1)}_{21}\right) =0. \end{aligned}$$
(36)

Eigenvalue \(\lambda _1 = J^{(1)}_{33} = \frac{\theta _{12}-\theta _1}{1+\theta _1}\) is negative if and only if \(\theta _{12}<\theta _1\) (i.e., Eq. (27)). The other two eigenvalues, denoted by \(\lambda _2\) and \(\lambda _3\), are solutions of \(\lambda ^2-J^{(1)}_{11}\lambda -J^{(1)}_{12}J^{(1)}_{21} = 0\). The real part of \(\lambda _2\) and \(\lambda _3\) is negative if and only if \(-J^{(1)}_{11}>0\) and \(-J^{(1)}_{12}J^{(1)}_{21}>0\). Equation (2) guarantees that both \(\rho _1\) and \(\rho _{12}\) are positive. Therefore, \(-J^{(1)}_{11}>0\) if and only if Eq. (19) holds true. Equation (32) combined with \(\rho _1 > 0\) implies that \(J^{(1)}_{12} < 0\). Therefore, \(-J^{(1)}_{12}J^{(1)}_{21}>0\) if and only if \(J^{(1)}_{21} > 0\), which holds true if and only if

$$\begin{aligned} \delta < \delta _\textrm{c,3}. \end{aligned}$$
(37)

Note that, in Eq. (34), \(R_0 - T_0 - (P_0 - S_0) \theta _1 > 0\) because \(R_0-T_0>0\) and \(P_0-S_0<0\). Therefore, this equilibrium is marginally stable if and only if Eqs. (19), (27), and (37) hold true.

Fig. 2
figure 2

Convergence to face equilibria. Shown are numerically obtained trajectories of the three-dimensional system given by Eqs. (13), (14), and (15). The green dots represent the face equilibria given in Table 1. We use the payoff matrices given by Eq. (38) and initial conditions \((x,n_1,n_{12})=(0.5, 0.4, 0.1)\) and (0.6, 0.5, 0.8), of which the corresponding trajectories are shown in blue and orange, respectively. a \(\theta _1=8\), \(\theta _{12}=5\), and \(\delta =0.6\). b \(\theta _1=8\), \(\theta _{12}=5\), and \(\delta =0.8\). c \(\theta _1=5\), \(\theta _{12}=8\), and \(\delta =0.2\). d \(\theta _1=5\), \(\theta _{12}=8\), and \(\delta =0.4\)

For numerical demonstration, we set

$$\begin{aligned} \begin{pmatrix}R_0&{}S_0\\ T_0&{}P_0\\ \end{pmatrix}=\begin{pmatrix}5&{}1\\ 3&{}0\\ \end{pmatrix}\;\;\text {and}\;\;\begin{pmatrix}R_1&{}S_1\\ T_1&{}P_1\\ \end{pmatrix}=\begin{pmatrix}3&{}0\\ 8&{}2\\ \end{pmatrix}, \end{aligned}$$
(38)

which satisfy Eq. (2). We also set \(\theta _1=8\), \(\theta _{12}=5\), and \(\delta =0.6\), yielding \(\lambda _1=-\frac{1}{3}\) and \(\lambda _{2, 3} = -0.014 \pm 0.437i\). We show two numerically simulated trajectories starting from different initial conditions in Fig. 2a. Figure 2a indicates that the trajectories spiral into the presently discussed face equilibrium.

The derivation of the conditions for stability of the other three face equilibria is similar; see Appendix C for the derivation.

Equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{1}{1+\theta _{12}},1,\frac{R_1 - T_1 - P_1\theta _{12} + S_1\theta _{12} +\delta \rho _{12}}{\delta \rho _{12}}\right) \) is stable if and only if Eqs. (19), (27), and

$$\begin{aligned} \delta > \delta _\textrm{c,4} \end{aligned}$$
(39)

hold true. For numerical demonstration of this face equilibrium, we set \(\theta _1=8, \theta _{12}=5\), and \(\delta =0.8\), yielding \(\lambda _1=-\frac{1}{2}\) and \(\lambda _{2, 3} = -0.019 \pm 0.232i\). As expected, Fig. 2b shows that two trajectories starting from different initial conditions spiral into the presently discussed face equilibrium.

Equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{1}{1+\theta _1},\frac{R_0 -T_0- P_0\theta _1 + S_0\theta _1 -\delta \rho _1}{(1- \delta ) \rho _1}, 1\right) \) is stable if and only if (19), (21), and

$$\begin{aligned} \delta < \delta _\textrm{c,1} \end{aligned}$$
(40)

hold true. For numerical simulations, we set \(\theta _1=5\), \(\theta _{12}=8\), and \(\delta =0.2\), yielding \(\lambda _1=-\frac{1}{2}\) and \(\lambda _{2, 3} = -0.019 \pm 0.554i\). As expected, two trajectories, shown in Fig. 2c, spiral into the presently discussed face equilibrium.

Equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{1}{1+\theta _{12}},0,\frac{R_0-T_0-P_0\theta _{12}+S_0\theta _{12}}{\delta \rho _{12}}\right) \) is stable if and only if Eqs. (19), (21), and

$$\begin{aligned} \delta > \delta _\textrm{c,2} \end{aligned}$$
(41)

hold true. For numerical simulations, we set \(\theta _1=5\), \(\theta _{12}=8\), and \(\delta =0.4\), yielding \(\lambda _1=-\frac{1}{3}\) and \(\lambda _{2, 3} = -0.014 \pm 0.437i\). Two trajectories, shown in Fig. 2d, spiral into the presently discussed face equilibrium.

Fig. 3
figure 3

Impact of the inter-community interaction rate \(\delta \) on stability. Stable edge and face equilibria when \(\theta _1 \ne \theta _{12}\) are shown as a function of \(\delta \). In both a and b, we use the payoff values given by Eq. (38). a \(\theta _1 < \theta _{12}\). The face equilibrium with \(n_{12}^*=1\) is stable for \(\delta <\delta _\textrm{c,1}\). The edge equilibrium \((x_1^*, n_1^*, n_{12}^*) = \left( \frac{P_0-S_0-\delta (P_0-P_1-S_0+S_1)}{R_0-T_0-S_0+P_0-\delta \gamma },0,1\right) \) is stable for \(\delta _\textrm{c,1}<\delta <\delta _\textrm{c,2}\). The face equilibrium with \(n_1^*=0\) is stable for \(\delta >\delta _\textrm{c,2}\). b \(\theta _1 > \theta _{12}\). The face equilibrium with \(n_{12}^*=0\) is stable for \(\delta <\delta _\textrm{c,3}\). The edge equilibrium \((x_1^*, n_1^*, n_{12}^*) = \left( \frac{P_1-S_1+\delta (P_0-P_1-S_0+S_1)}{R_1-T_1-S_1+P_1+\delta \gamma },1,0\right) \) is stable for \(\delta _\textrm{c,3}<\delta <\delta _\textrm{c,4}\). The face equilibrium with \(n_1^*=1\) is stable for \(\delta >\delta _\textrm{c,4}\). In a, we set \(\theta _1 = 5\) and \(\theta _{12} = 8\), yielding \(\delta _\textrm{c,1}=7/22\) and \(\delta _\textrm{c,2}=10/21\). In b, we set \(\theta _1 = 8\) and \(\theta _{12}=5\), yielding \(\delta _\textrm{c,3}=21/31\) and \(\delta _\textrm{c,4} = 15/22\)

Fig. 4
figure 4

Visualization of the transcritical bifurcations as \(\delta \) varies. We use the payoff matrices given by Eq. (38). The solid and dashed lines indicate stable and unstable equilibria, respectively, both disregarding the 0 eigenvalues along the direction of L in the case of \(\theta _1 = \theta _{12}\). a Movement of three equilibria in the full state space as \(\delta \) varies when \(\theta _1 = 5\) and \(\theta _{12} = 8\). A transcritical bifurcation occurs involving the face equilibrium on \(n_{12}=1\) and the edge equilibrium \(\left( x^*,0,1\right) \), where \(x^*= 1/6\), at \(\delta =7/22\). The second transcritical bifurcation occurs involving the face equilibrium on \(n_1=0\) and the edge equilibirium \(\left( x^*,0,1\right) \), where \(x^*= 1/9\), at \(\delta =10/31\). b Positions of all the same three edge and face equilibria as a function of \(\delta \). The \(\theta _1\) and \(\theta _{12}\) values are the same as those used in a. In b, the three curves do not meet at a single point, as shown in the inset, which is a magnification of the main panel. c Same as a but when \(\theta _1=\theta _{12} = 5\). A transcritical bifurcation occurs involving the face equilibrium on \(n_{12}=1\) and that on \(n_1=0\) at \(\left( \frac{1}{6},0,1\right) \) when \(\delta =7/22\). Edge equilibrium \(\left( x^*, 0, 1\right) \) also collides with the two face equilibria at this value of \(\delta \). d Same as b but when \(\theta _1=\theta _{12} = 5\). There is another triplet of equilibria in addition to the triplet of equilibria shown in c. For this second set of triplet of equilibria, a transcritical bifurcation occurs involving the face equilibrium on \(n_{12}=0\) and that on \(n_1=1\), and edge equilibrium \(\left( x^*,1,0\right) \) collides with the bifurcation point, at \(\delta =15/22\). Note that \(x^*\) is not constant along the trajectories in b, whereas it is in d

3.5 Movement of Stable Equilibria as \(\delta \) Varies

The results in Sects. 3.13.4 indicate that, for given \(\theta _1\) and \(\theta _{12}\) (\(\ne \theta _1\)) values, there are three equilibria, two of which are face equilibria and one is an edge equilibrium. Just one of these three equilibria is stable for a given value of \(\delta \).

Specifically, when \(\theta _1 < \theta _{12}\), a face equilibrium is stable when \(0< \delta < \delta _\textrm{c, 1}\), an edge equilibrium is stable when \(\delta _\textrm{c, 1}< \delta < \delta _\textrm{c, 2}\), and another face equilibrium is stable when \(\delta _\textrm{c, 2}< \delta < 1\); see Fig. 3a. As \(\delta \) varies, the position of the stable equilibrium continuously moves, including through \(\delta = \delta _\textrm{c, 1}\) and \(\delta = \delta _\textrm{c, 2}\). The dynamical system undergoes a transcritical bifurcation at \(\delta =\delta _\textrm{c,1}\), with which the face equilibrium and the edge equilibrium exchange the stability. Another similar transcritical bifurcation occurs at \(\delta =\delta _\textrm{c,2}\). See Fig. 4a, b for visualization. When \(\theta _1 > \theta _{12}\), a different set of three equilibria, which reside on the opposite side of the unit-cube state space, are stable for a respective range of \(\delta \), as shown in Fig. 3b. Similarly to the case of \(\theta _1 < \theta _{12}\), these equilibria undergo transcritical bifurcations at \(\delta = \delta _\textrm{c,3}\) and \(\delta _\textrm{c,4}\).

Fig. 5
figure 5

Real part of the eigenvalues of the Jacobian near transcritical bifurcations as a function of \(\delta \). We use the payoff matrices given by Eq. (38). It should be noted that the third eigenvalue in a and b is always negative and thus is not shown, and that the third eigenvalue in c and d is always 0. a \(\theta _1=5\) and \(\theta _{12}=8\). Each color represents a face or edge equilibrium. Two eigenvalues become 0 at \(\delta = \delta _\textrm{c, 1} = 7/22 \approx 0.31818\), and another two eigenvalues become 0 at \(\delta = \delta _\textrm{c, 2} = 10/31 \approx 0.32258\). Each of these \(\delta \) values marks a transcritical bifurcation. At \(\delta \approx 0.31822\) and 0.32321, the eigenvalues of the stable face equilibrium turns from real to imaginary and vice versa. b \(\theta _1=8\) and \(\theta _{12}=5\). Two eigenvalues become 0 at \(\delta = \delta _\textrm{c, 3} = 21/31 \approx 0.67742\), and another two eigenvalues become 0 at \(\delta = \delta _\textrm{c, 4} = 15/22 \approx 0.68182\). Each of these \(\delta \) values marks a transcritical bifurcation. At \(\delta \approx 0.67732\) and 0.68194, the eigenvalues of the stable face equilibrium turns from real to imaginary and vice versa. c \(\theta _1 = \theta _{12} = 5\) and near the first transcritical bifurcation at \(\delta = \delta _\text {c, 1} = 7/22 \approx 0.31818\). At \(\delta \approx 0.31806\) and 0.31830, the eigenvalues of the stable face equilibrium turns from real to imaginary and vice versa. d \(\theta _1 = \theta _{12} = 5\) and near the second transcritical bifurcation at \(\delta = \delta _\text {c, 3} = 15/22 \approx 0.68182\). At \(\delta \approx 0.68170\) and 0.68194, the eigenvalues of the stable face equilibrium turns from real to imaginary and vice versa

We point out that, as the transcritical bifurcation is approached as \(\delta \) gradually increases from 0, the two eigenvalues are both first complex conjugates with negative real parts and then change to real negative values. Figure 5a shows the dependence of the real part of the two eigenvalues on \(\delta \) around \(\delta = \delta _\textrm{c,1}\). When the stable face equilibrium approaches an edge of the unit cube, it becomes a sink, enabling the transcritical bifurcation on the edge. The dependence of the Jacobian eigenvalues of the three equilibria near \(\delta = \delta _\textrm{c, 2}\) is qualitatively the same as that near \(\delta = \delta _\textrm{c, 1}\) (see Fig. 5b).

4 Three-Dimensional System with \(\theta _1=\theta _{12}\)

In this section, as in Sect. 3, we assume that \(\theta _1=\theta _2\) and that the initial condition satisfies \(x=y\) and \(n_1=n_2\). Then, \(x=y\) and \(n_1=n_2\) hold true for any \(t>0\). We now further assume that \(\theta _1=\theta _2=\theta _{12}\).

4.1 Corner Equilibria

By setting \(x^*\), \(n_1^*\), and \(n_{12}^*\) to 0 or 1, we obtain eight corner equilibria. Similar to the case of \(\theta _1 \ne \theta _{12}\) (see Sect. 3.1), each corner equilibrium is a saddle. See Appendix D for the proof.

4.2 Interior Equilibria

In this section, we look for equilibria in the interior of the unit cube, i.e., those satisfying \(0< x^*, n_1^*, n_{12}^*< 1\). By setting \(\dot{n}_1 = 0\) and \(\dot{n}_{12}=0\) in Eqs. (14) and (15), respectively, with \(\theta _1 = \theta _{12}\), and imposing \(n_1^*, n_{12}^*\notin \{ 0, 1 \}\), we obtain

$$\begin{aligned} x^*=\frac{1}{1+\theta _1}. \end{aligned}$$
(42)

By substituting Eq. (42) in Eq. (13) and imposing \(\dot{x}=0\), we obtain

$$\begin{aligned} n_1^*(1-\delta )+n_{12}^*\delta =\frac{R_0-T_0-P_0\theta _1+S_0\theta _1}{\rho _1}. \end{aligned}$$
(43)

Any point on this line is an equilibrium. We call Eq. (43) the line of equilibria and denote it by L; it is the equilibrium manifold.

Fig. 6
figure 6

System’s behavior near the equilibrium manifold L. Shown are trajectories of the three dimensional system given by Eqs. (13), (14), and (15) when \(\theta _1 = \theta _{12}\) = 5 for two initial conditions. The green line indicates L, the line of equilibria given by Eq. (43). We use the payoff matrices given by Eq. (38), initial conditions \((x,n_1,n_{12})=(0.5,0.4,0.1)\), shown in blue, and (0.1, 0.9, 0.9), shown in orange, and set \(\delta =0.5\)

We show in Appendix E that L is neutrally stable along the direction of L and that the other two eigenvalues, \(\lambda _2\) and \(\lambda _3\), have negative real part if Eqs. (2) and (19) hold true. In this case, line L attracts trajectories near L.

To demonstrate L, we numerically simulate trajectories with \(\theta _1=5\) and \(\delta =0.5\), for which \(\lambda _{2, 3} = -0.019 \pm 0.810i\). We show trajectories of the dynamics starting from two initial conditions in Fig. 6. The figure indicates that the solution spirals into L as expected.

4.3 Edge Equilibria

Let us examine possible edge equilibria. It should be noted that \(\rho _1=\rho _{12}\) when \(\theta _1=\theta _{12}\); we recall that \(\rho _1\) and \(\rho _{12}\) are defined in Eqs. (24) and (25), respectively. We find that there are just two edge equilibria when \(\theta _1 = \theta _{12}\), which are the same as those found for the case \(\theta _1 \ne \theta _{12}\) in Sect. 3.3. These two edge equilibria occur where line L intersects the edge specified by \(n_1^*=0, n_{12}^*=1\) or that specified by \(n_1^*=1, n_{12}^*=0\).

We show in Appendix F that the edge equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_0-S_0-\delta (P_0-P_1-S_0+S_1)}{R_0-T_0-S_0+P_0-\delta \gamma },0,1\right) \) is marginally stable with two zero eigenvalues and one negative eigenvalue if and only if Eq. (19) holds true and

$$\begin{aligned} \delta =\delta _\textrm{c, 1} = \delta _\textrm{c, 2}. \end{aligned}$$
(44)

When \(\delta \ne \delta _\textrm{c,1}\), the Jacobian has two positive eigenvalues and one negative eigenvalue. Similarly, the edge equilibrium \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_1-S_1+\delta (P_0-P_1-S_0+S_1)}{R_1-T_1-S_1+P_1+\delta \gamma },1,0\right) \) is marginally stable if and only if Eq. (19) holds true and

$$\begin{aligned} \delta = \delta _\textrm{c, 3} = \delta _\textrm{c, 4}. \end{aligned}$$
(45)

When \(\delta \ne \delta _\textrm{c, 3}\), the Jacobian has two positive eigenvalues and one negative eigenvalue.

Fig. 7
figure 7

Existence of an invariant point on the line of equilibria, L, given by Eq. (43) for various values for \(\delta \). The legend shows the value of \(\delta \) for each line. We use the payoff matrices given by Eq. (38) and set \(\theta _1 = \theta _{12} = 5\). Because \(x^*=1/6\), we take the slice of the unit cube with \(x^*=1/6\) to examine the position of L as a function of \(n_1^*\) and \(n_{12}^*\). Line L intercepts the point \(\left( \frac{1}{6},0,1\right) \) when \(\delta = \delta _\textrm{c,1} = 7/22\) and the point \(\left( \frac{1}{6},1,0\right) \) when \(\delta = \delta _\textrm{c,3} = 15/22\). All the lines cross at \(\left( \frac{1}{6},\frac{7}{22},\frac{7}{22}\right) \), which owes to Eq. (46)

4.4 Face Equilibria

Similarly to the case of the edge equilibria, if we let \(x^*=0\) or 1, then we obtain a corner equilibrium. Therefore, we assume that \(0<x^*<1\). By setting just one of \(n_1^*\) or \(n_{12}^*\) to 0 or 1, we obtain the four face equilibria shown in Table 1 but with \(\theta _1 = \theta _{12}\). Therefore, \(x^* = \frac{1}{1+\theta _1}\) for any face equilibria. These face equilibria are stable under the same conditions as those found in Sect. 3.4, i.e., Eq. (19), and the conditions for \(\delta \) given by Eqs. (37), (39), (40), and (41), i.e., \(\delta <\delta _\textrm{c,3}\), \(\delta >\delta _\textrm{c,4} (= \delta _\textrm{c, 3})\), \(\delta <\delta _\textrm{c,1}\), and \(\delta >\delta _\textrm{c,2} (= \delta _\textrm{c, 1})\), respectively. We also find that these stability requirements for \(\delta \) coincide with the requirements for the face equilibria to exist. For example, line L intersects the \(n_{12}=0\) face of the unit cube defined by \(0\le x, n_1, n_{12} \le 1\) if and only if \(\delta \) satisfies Eq. (37), i.e., \(\delta <\delta _\textrm{c,3}\).

To understand the location of the face equilibria depending on the value of \(\delta \), we examine the movement of line L on the (\(n_1\), \(n_{12}\)) plane as we vary \(\delta \). The two intersections of L with the boundary of the square defined by \(0 \le n_1, n_{12} \le 1\), combined with \(x^* = \frac{1}{1+\theta _1}\), give the two face equilibria. When the intersection is at a corner of the square, it is an edge equilibrium. We show L as a function of \(\delta \) in Fig. 7 for the payoff matrices given by Eq. (38). Figure 7 indicates that the two edge equilibria are realized at different \(\delta \) values, which is consistent with the results shown in Sect. 4.3. The figure also indicates that L passes through a particular point regardless of the \(\delta \) value. By setting both the coefficient of \(\delta \) and the constant term to 0 in Eq. (43), we obtain this point as follows:

$$\begin{aligned} (x^*, n_1^*, n_{12}^*)=\left( \frac{1}{1+\theta _1}, \frac{R_0-T_0-P_0\theta _1+S_0\theta _1}{\rho _1}, \frac{R_0-T_0-P_0\theta _1+S_0\theta _1}{\rho _1}\right) . \end{aligned}$$
(46)

Figure 7 also indicates that, when \(\delta \) is small, \(n_1^*\) is highly variable between 0 and 1, but the range of \(n_{12}^*\) is small. When \(\delta \) is large, the converse is true. This result is natural because a larger \(\delta \) implies that more interaction between players occur between the two communities than in the same community.

As \(\delta \) varies, our three-dimensional dynamical system undergoes two bifurcations at \(\delta = \delta _\textrm{c,1}\) and \(\delta = \delta _\textrm{c,3}\). When \(0<\delta <\delta _\textrm{c,1}\), the face equilibrium with \(n_{12}^*=1\) is stable except along the direction of L (therefore, the Jacobian has two negative eigenvalues and one 0 eigenvalue), and the edge equilibrium given by \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_0-S_0-\delta (P_0-P_1-S_0+S_1)}{R_0-T_0-S_0+P_0-\delta \gamma },0,1\right) \) and the face equilibrium with \(n_1^*=0\) are saddles (when disregarding the 0 eigenvalue along the direction of the line of equilibria; same in the following text). When \(\delta =\delta _\textrm{c,1}\), the dynamical system undergoes a transcritical bifurcation and the stability of the two face equilibria switches. At \(\delta =\delta _\textrm{c,1}\), the edge equilibrium has two 0 eigenvalues and one negative eigenvalue. These three equilibria collide at \(\delta =\delta _\textrm{c,1}\), which we depict in Fig. 4c, d. When \(\delta _\textrm{c,1}<\delta <1\), the face equilibrium with \(n_{12}^*=1\) and the edge equilibrium given by \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_0-S_0-\delta (P_0-P_1-S_0+S_1)}{R_0-T_0-S_0+P_0-\delta \gamma },0,1\right) \) are saddles, and the face equilibrium with \(n_1^*=0\) is stable. There are three other equilibria located at the other end of L intersecting a face or edge of the state space, i.e., the unit cube. The structure of the bifurcation occurring at \(\delta = \delta _{c, 3}\), involving this second triplet of equilibria, which are composed of two face equilibria (one with \(n_1^*=1\) and the other with \(n_{12}^*=0\)) and one edge equilibrium given by \((x^*, n_1^*, n_{12}^*)=\left( \frac{P_1-S_1+\delta (P_0-P_1-S_0+S_1)}{R_1-T_1-S_1+P_1+\delta \gamma },1,0\right) \), is qualitatively the same.

Similarly to when \(\theta _1 \ne \theta _{12}\), as \(\delta \) gradually increases from 0 to approach the first transcritical bifurcation, the two eigenvalues except the 0 eigenvalue are first complex conjugates with negative real parts and then change to real negative values. Figure 5c shows the dependence of the real part of the two eigenvalues on \(\delta \) around \(\delta = \delta _\textrm{c,1}\). Therefore, when L intersects the unit cube at a point not close to an edge, trajectories on the face spiral into the stable face equilibria, which is consistent with the numerical results shown in Fig. 6. When the stable face equilibrium approaches an edge of the unit cube, it becomes a sink, enabling the transcritical bifurcation on the edge. The dependence of the Jacobian eigenvalues of the three equilibria near \(\delta = \delta _\textrm{c, 3}\) is qualitatively the same as that near \(\delta = \delta _\textrm{c, 1}\) (see Fig. 5d).

Fig. 8
figure 8

Rich dynamical behavior of the full model. Shown are time courses of trajectories of the five-dimensional system for different parameter choices and initial conditions. a \(\theta _1=3\), \(\theta _2=5\), \(\theta _{12}=8\), and \(\delta =0.95\) with initial condition \((x, y, n_1, n_2, n_{12})=(0.5,0.3,0.5,0.1,0.5)\). b Same parameter values as a but with initial condition \((x, y, n_1, n_2, n_{12})=(0.4,0.8,0.8,0.6,0.2)\). c \(\theta _1=3\), \(\theta _2=5\), \(\theta _{12}=8\), and \(\delta =0.31\) with initial condition \((x, y, n_1, n_2, n_{12})=(0.1,0.5,0.1,0.9,0.5)\). d \(\theta _1=3\), \(\theta _2=5\), \(\theta _{12}=8\), and \(\delta =0.4\) with initial condition \((x, y, n_1, n_2, n_{12})=(0.1,0.5,0.1,0.9,0.5)\). e \(\theta _1=0.3\), \(\theta _2=0.4\), \(\theta _{12}=0.45\), and \(\delta =0.29\) with initial condition \((x, y, n_1, n_2, n_{12})=(0.5,0.5,0.5,0.5,0.5)\). f \(\theta _1=0.3\), \(\theta _2=0.4\), \(\theta _{12}=0.45\), and \(\delta =0.35\) with initial condition \((x, y, n_1, n_2, n_{12})=(0.5,0.5,0.5,0.5,0.5)\)

5 Five-Dimensional System

In this section, we analyze the five-dimensional dynamical system given by Eqs. (8)– (12) without assuming symmetry between the two communities. We exhaustively examine its equilibria as follows. First, we search for all possible combinations of \(x, y, n_1, n_2\), and \(n_{12}\) by classifying the value of each variable to be either 0, 1, or between 0 and 1. Because three options are available for each variable, there are \(3^5=243\) possible combinations. Second, we find that the \(2^5 = 32\) corners of the state space given by \(x, y, n_1, n_2, n_{12} \in \{ 0, 1 \}\) are equilibria, more specifically, saddles. Third, out of the remaining 211 combinations, we have found that 60 combinations are equilibria; the other 151 combinations are not. We show these equilibria in Appendix G. By analyzing the Jacobian of the 60 equilibria with the assistance of Mathematica, we find that 21 of them are stable under some conditions (see Appendix G).

In contrast to the reduced three-dimensional dynamical system, there is multistability in the present five-dimensional dynamical system. There are 11 multistable pairs of equilibria, and these equilibria tend to be multistable when \(\delta \) is large. Six of these 11 pairs are multistable for any \(\delta >0.75\). The other five pairs require \(\delta \) to be larger, approximately \(\delta >0.9\). We demonstrate a multistable pair of equilibria in Fig. 8a, b, which show two trajectories for \(\theta _1=3\), \(\theta _2=5\), \(\theta _{12}=8\), and \(\delta =0.95\). The initial condition is \((x, y, n_1, n_2, n_{12})=(0.5,0.3,0.5,0.1,0.5)\) in Fig. 8a and \((x, y, n_1, n_2, n_{12})=(0.4,0.8,0.8,0.6,0.2)\) in Fig. 8b. The trajectory converges towards \((x^*, y^*, n_1^*, n_2^*, n_{12}^*) \approx (0.222, 0, 0, 0, 0.523)\) in Fig. 8a and \(\approx (0, 0.222, 0, 1, 0.450)\) in Fig. 8b.

Figure 8c shows an oscillatory trajectory for \(\theta _1=3\), \(\theta _2=5\), \(\theta _{12}=8\), \(\delta =0.31\), and initial condition \((x, y, n_1, n_2, n_{12})=(0.1,0.5,0.1,0.9,0.5)\). The inset of the figure, showing the time courses of x and y, indicates anti-synchronization behavior during the oscillatory dynamics. We point out the environmental state between the two communities is bountiful (i.e., \(n_{12} \approx 1\)) and almost constant despite the anti-synchronous dynamics between x and y. When one increases \(\delta \) to \(\delta = 0.4\), with all the other parameter values being the same as those used in Fig. 8c, the oscillations become apparently aperiodic while keeping anti-synchronous behavior between x and y (see Fig. 8d). We observe \(n_{12} \approx 1\) and \(n_2 \approx 0\) during this apparently aperiodic dynamics. It should be noted that \(n_1\) is similarly aperiodic.

We show in Fig. 8e the trajectory for \(\theta _1=0.3\), \(\theta _2=0.4\), \(\theta _{12}=0.45\), \(\delta =0.29\), and initial condition \((x, y, n_1, n_2, n_{12})=(0.5,0.5,0.5,0.5,0.5)\). Similar to Fig. 8c, the trajectory shown in Fig. 8e shows apparent convergence to a limit cycle and approximate anti-synchronization between x and y, but accompanying sudden jumps in various variables in each cycle. When \(\delta \) is increased to 0.35, the amplitude of oscillation becomes larger, in particular in terms of \(n_1\) and \(n_2\) (see Fig. 8f).

6 Discussion

We extended a previously proposed model of eco-evolutionary dynamics (Weitz et al. 2016) to the case of networks with two equally sized communities. In the three-dimensional dynamical system given by Eqs. (13), (14), and (15), which assumes symmetry between the two communities, a further assumption that \(n_1=n_{12}\) lends the model the same as the original well-mixed population model (Weitz et al. 2016), and the requirement for the stability of equilibria, i.e., Eq. (19), is the same as that derived in Weitz et al. (2016) as well.

Under the generic condition \(n_1\ne n_{12}\), our stability requirement for the equilibria again contained that of Weitz et al. (2016), i.e., Eq. (19). However, the stability of the equilibria in our model also requires conditions on the edge weight between two communities, i.e., \(\delta \), and on environment recovery rates, i.e., \(\theta _1\) (\(= \theta _2\)) and \(\theta _{12}\). When \(\theta _1=\theta _{12}\), the line of equilibria, L, only requires Eq. (19) for stability, but the position of L depends on \(\theta _1\) and \(\delta \). This result implies that the network has no effect on the stability requirements when \(\theta _1=\theta _{12}\). In contrast, when \(\theta _1\ne \theta _{12}\), the network and the environment recovery rates affect the stability of the system. As a remark, it was mathematically found (Gong et al. 2022) that the eco-evolutionary dynamical system proposed in Weitz et al. (2016) has no limit cycles. This mathematical result corroborates with the theoretical results in Weitz et al. (2016), in which it was proven that the oscillations converge to a heteroclinic cycle, and our numerical results; because we have analytically shown that there is no internal unstable equilibrium, it is unlikely that our system has a limit cycle.

There exists another commonly explored family of dynamic payoff matrices dependent on environmental feedback, given by

$$\begin{aligned} A(n)=(1-n)\begin{pmatrix}T&{}P\\ R&{}S\end{pmatrix}+n\begin{pmatrix}R&{}S\\ T&{}P\end{pmatrix}, \end{aligned}$$
(47)

where \(T>R\) and \(P>S\) (Weitz et al. 2016; Gong et al. 2018; Kawano et al. 2019; Liu et al. 2020; Stella et al. 2022a; Zhang et al. 2023). With Eq. (47), we retain mutual cooperation as a Nash equilibrium when \(n=0\) and mutual defection when \(n=1\). In addition, this payoff matrix causes Eq. (19) to be satisfied with equality. By using this payoff matrix and holding the assumption that \(\theta _1=\theta _{12}\), it is straightforward to analytically obtain a neutrally stable interior line of equilibria, which implies closed periodic orbits in the interior of the state space, corroborating the results in Weitz et al. (2016). When \(\theta _1\ne \theta _{12}\), our system with Eq. (47) in fact shows a closed periodic orbit on a face of the hypercubic state space. Therefore, we claim that the closed periodic orbits found in the previous studies with Eq. (47) are at least partially due to the symmetry in the payoff matrix given by Eq. (47). In the absence of such a symmetry, our results suggest that convergence to stable equilibria is a norm regardless of the population structure.

When we removed the assumption of symmetry between the two communities by allowing \(\theta _1 \ne \theta _2\), we obtained a rich repertoire of stable equilibria, some of which coexist to realize multistability, especially when \(\delta \) is large. Multistability was also found in other eco-evolutionary models (Tilman et al. 2020; Bairagya et al. 2021), but these models are ecological extensions of Weitz et al. (2016) and are not network-based models as our model is. Bistability was also found in a spatial eco-evolutionary model (Hauert et al. 2019), but for the trivial equilibria (i.e., bistability between an equilibrium with no cooperators in a replete environment and an equilibrium only with cooperators in a rich environment) and under the snowdrift game. In contrast to these previous studies showing multistability in eco-evolutionary game dynamics, our model is a direct network extension of the original model proposed in Weitz et al. (2016) and without additional ecological assumptions. The present results suggest that multistability may be commonly found in the same eco-evolutionary model on various networks. We also found anti-synchronization behavior during oscillatory population dynamics. This type of behavior was found in a prior complete bipartite graph model (Liu et al. 2020), but for the division of labor game rather than the typical prisoner’s dilemma game. When our stability requirements are not satisfied, our system may converge to a heteroclinic cycle. Further exploring different types of oscillatory behavior in networked eco-evolutionary game dynamics may be interesting.

We emphasize that our model substantially varies from the previously proposed model composed of two interacting subpopulations, or precisely, complete bipartite graphs (Gong et al. 2018; Kawano et al. 2019; Shu and Fu 2022). Their model does not allow interaction between players in the same subpopulation, whereas our model does. Furthermore, these previous studies adopted the dynamic payoff matrix given by Eq. (47), which led to closed periodic orbits, as we discussed above. In Gong et al. (2018) and Kawano et al. (2019), such cyclic orbits do not accompany anti-synchronous oscillation of the fraction of cooperation in the two subpopulations. Instead, the cyclic behavior originates from interplay of the fraction of one of the two subpopulations and the environmental variable. On the other hand, the orbits obtained in Shu and Fu (2022) show largely in-phase synchronous oscillation between the two subpopulations. The model in Gong et al. (2018) and Kawano et al. (2019) was extended in Liu et al. (2020) to include a different form of A(n) and different influences of strategies in two subpopulations on the environment. The inclusion of these parameters produces periodic orbits as did the models proposed in Gong et al. (2018) and Kawano et al. (2019). In contrast, our model showed anti-phase oscillations in terms of the fraction of cooperators in the two communities (i.e., x and y) and multistability. Therefore, even within the family of two-subpopulation networks, which is one of the simplest network model, qualitatively different dynamical behavior may arise depending on the assumption on the environmental dynamics.

Prior extensions of the eco-evolutionary game models to larger networks include those to spatial lattices and regular graphs. The spatial extensions have been to the case of square lattices (Jin et al. 2018; Szolnoki and Chen 2018; Wu et al. 2018, 2019; Hauert et al. 2019; Lin and Weitz 2019; Yang and Zhang 2021; Ding et al. 2023; He et al. 2023; Lu et al. 2023; Zhu 2023). A lattice model of eco-evolutionary game dynamics assuming local environmental variables, meaning that each node (i.e., player) has its own dynamical environmental state, resulted in spatiotemporal patterns, including clustering, flickering, and wave-like patterns (Lin and Weitz 2019). Enhanced cooperation due to the environmental feedback was also found in eco-evolutionary models on square lattices (Jin et al. 2018; Szolnoki and Chen 2018; Wu et al. 2018, 2019; Ding et al. 2023; He et al. 2023; Lu et al. 2023; Zhu 2023). Another type of network that has been studied with eco-evolutionary feedback is regular graphs, in which all nodes have degree k. Through the use of pair approximation, the extension of the original model (Weitz et al. 2016) to regular graphs (therefore using the payoff matrix given by Eq. (47)) has clarified that an increased k induces the internal stable equilibrium to become neutrally stable, producing periodic orbits (Stella et al. 2022a; Zhang et al. 2023). These models are substantially different from ours not only in the network structure but also in that their model assumes that the environment is global to all nodes. Assigning an environmental state \(n_{ij}\) to each edge (ij), as has been done for square lattices in previous studies (He et al. 2023; Zhu 2023) and for a two-community network in the present study, in the case of regular graphs and general networks may be an interesting generalization.

In addition to the extension of the network structure, edge-dependent environmental state variable, and weighted networks, which we discussed above, there are further possible extensions of the present model as future work. First, in well-mixed populations, incorporation of intrinsic environmental dynamics, such as resource growth and decay, results in multistability and limit cycles (Tilman et al. 2020), which one can explore for networks. Second, the incorporation of dynamic recovery and degradation rates for the environmental state, which are boosted by cooperators’ and defectors’ payoffs (Cao and Wu 2021), leads to the same stability requirement as that in Weitz et al. (2016), i.e., Eq. (19). One can extend the present model to the case of dynamic rates of environment recovery and degradation by letting, e.g., \(\theta _1\) depend on x and \(n_1\). Third, the use of finite carrying capacity in an environment, which excludes any periodic orbits and enables bistability in the original model (Bairagya et al. 2021), should be possible. Fourth, the incorporation of aspiration dynamics, with which players update their strategies based on whether or not they are satisfied with their current payoff (Arefin and Tanimoto 2021) is another possible direction of research. Lastly, although we studied the prisoner’s dilemma, as other eco-evolutionary game dynamics models, our model can be studied for other games such as the prisoner’s dilemma with voluntary participation (Liu et al. 2020; Li et al. 2021), coordination game (Weitz et al. 2016; Lin and Weitz 2019; Bairagya et al. 2021; Shu and Fu 2022), anti-coordination game (Weitz et al. 2016; Lin and Weitz 2019; Bairagya et al. 2021), and division-of-labor game (Liu et al. 2020).

In conclusion, we have studied an eco-evolutionary game dynamics model with two distinct network communities. We find that the interaction rates both within and between these communities significantly impact on the resulting dynamical behavior and the determination of possible equilibrium classes (i.e., interior, face, edge, and corner) of the system. In addition to numerical investigation of the full model, we have performed comprehensive stability analysis of the simplified system under symmetry conditions. Our work highlights the importance of community structures in impacting eco-evolutionary dynamics across different ecological niches.