\in O_i$. Obtain payoff and update its policy. Update neighbor $j$’s action model. \[code:Algorithm 1\]

During each round, each agent $i$ first is given the opportunity of rewiring with probability $\varphi$. During the rewiring phase, agent $i$ breaks its connection with a neighbor with poor-performance and establishes a new connection with another agent from its potential partners $\bar O_i$ (Line 2-4). Next, in interaction phase, agent $i$ interacts with a randomly selected neighbor agent $j$ from its neighborhood $O_i$ by playing their corresponding cooperative game $G_i^j$ (Line 5). After the interaction, agent $i$ and $j$ receive the corresponding payoff and update their policies and opponents’ models respectively (Line 6-7). The details of the rewiring and learning strategies will be introduced in following subsection.

An Optimal Rewiring Strategy
----------------------------

The goal of rewiring is to explore the set of unconnected peers (potential partners $\bar O$) in the population and seek more beneficial partners to interact with. Each agent is faced with two aspects of uncertainties: the uncertainty of the behaviors of its neighbors and unknown peers; the uncertainty of the payoff matrix during interaction with unknown peers. To select the optimal agent to rewire, we need to evaluate the potential benefits 