5D Library › Evolutionary Game Theory, Direct and Indirect Reciprocity and the Emergence of Cooperation · 中文
Chapter 5 Network Reciprocity: Spatial Structure and Human Network Experiments
Who your neighbours are
The models of the previous chapters assume that individuals meet at random. In real populations individuals interact only with a few neighbours: plants in the same patch of grassland, people in the same village, colleagues in the same work group. If a cooperator’s neighbours are more likely to be cooperators, help between cooperators falls mainly on each other; this is the same logic as the “regression relatedness” of Chapter 2, except that the association now comes from position in space rather than from kinship.
Evidence
Spatial chaos. In 1992 Nowak and May placed individuals that could only always cooperate or always defect on a two-dimensional lattice. Each individual played one game with each of its 8 neighbours and with itself, and in the next generation each site was taken by the strategy of the highest scorer among itself and its 8 neighbours. This entirely deterministic rule produced ever-changing patterns in which cooperators and defectors coexisted indefinitely, in proportions fluctuating around predictable long-run averages; symmetric starting configurations also produced “dynamic fractals” (Nowak and May 1992).
Calculation
# Spatial games after Nowak & May (1992). Players sit on a 60 x 60 torus; each plays the
# one-shot game with its 8 neighbours and itself, with C vs C = 1, D vs C = T, and 0
# otherwise (a "weak" prisoner's dilemma, 1 < T < 2). Then every site, simultaneously,
# copies the strategy of the highest scorer among itself and its 8 neighbours.
# Start: 10 % defectors at random. Reported: cooperator share averaged over generations
# 150-200, in each of 3 runs. In a well-mixed population defectors take over for every
# T > 1.
import random
rng = random.Random(10)
L = 60
NB = [(dx, dy) for dx in (-1, 0, 1) for dy in (-1, 0, 1)] # includes the site itself
def step(g, T):
score = [[0.0] * L for _ in range(L)]
for i in range(L):
for j in range(L):
nc = sum(g[(i + dx) % L][(j + dy) % L] for dx, dy in NB)
score[i][j] = nc * (1.0 if g[i][j] else T)
new = [[0] * L for _ in range(L)]
for i in range(L):
for j in range(L):
best, s = g[i][j], score[i][j]
for dx, dy in NB:
a, b = (i + dx) % L, (j + dy) % L
if score[a][b] > s: s, best = score[a][b], g[a][b]
new[i][j] = best
return new
def run(T, gens=200, p_def=0.1):
g = [[0 if rng.random() < p_def else 1 for _ in range(L)] for _ in range(L)]
hist = []
for t in range(gens):
g = step(g, T)
if t >= 150: hist.append(sum(map(sum, g)) / L ** 2)
return sum(hist) / len(hist), g
if __name__ == "__main__":
print(" T cooperator share (generations 150-200, 3 runs)")
for T in (1.10, 1.30, 1.55, 1.70, 1.80, 1.90, 1.99, 2.05):
vals = [run(T)[0] for _ in range(3)]
print(f" {T:.2f} " + " ".join(f"{v:.3f}" for v in vals)
+ f" mean {sum(vals) / 3:.3f}")
# T cooperator share (generations 150-200, 3 runs)
# 1.10 0.981 0.982 0.986 mean 0.983
# 1.30 0.866 0.875 0.854 mean 0.865
# 1.55 0.794 0.824 0.829 mean 0.816
# 1.70 0.704 0.707 0.717 mean 0.709
# 1.80 0.410 0.399 0.411 mean 0.407
# 1.90 0.318 0.310 0.309 mean 0.312
# 1.99 0.313 0.311 0.322 mean 0.315
# 2.05 0.043 0.018 0.047 mean 0.036The program reproduces the model on a 60 × 60 torus. The payoffs are the original paper’s “weak prisoner’s dilemma”: mutual cooperation gives each 1, a defector meeting a cooperator gets , and everything else is 0, with . Starting from 10 % defectors at random, cooperators make up 98 % at ; as increases cooperators gradually decline, to 71 % at ; as crosses 1.8 they drop sharply, to about 40 %; between 1.8 and 2 they settle at about 31 % (0.318, 0.310, 0.309 and 0.313, 0.311, 0.322 in three runs each); at cooperators almost vanish. In a randomly mixed population any drives cooperators extinct.
Cooperators survive on the lattice because they form clusters: cooperators inside a cluster earn high payoffs from each other, and only those on the boundary are exploited by defectors. The left panel of Figure 4 is a snapshot at .
Note
What is special about this model. The Nowak–May model is deterministic: every site always imitates the highest scorer, with no randomness and no mutation, and each individual also plays against itself. All these choices affect the outcome, and the effect of spatial structure on cooperation depends strongly on the updating rule and on the type of game. The rule below gives a more general, but equally conditional, answer.
The conditions for b/c > k
Evidence
A simple rule on graphs. In 2006 Ohtsuki, Hauert, Lieberman and Nowak studied the donation game on arbitrary networks. Under weak selection with “death–birth” updating (at each step a random individual dies and its neighbours compete for the empty site in proportion to fitness), selection favours cooperation (a single cooperator is more likely to take over the network than a single defector) when the benefit-to-cost ratio exceeds the average number of neighbours,
Under “birth–death” updating (at each step an individual is chosen to reproduce in proportion to fitness, and its offspring replaces a random neighbour) the network never favours cooperation; under “imitation” updating the condition is (Ohtsuki et al. 2006).
is an approximation for large networks. Taylor, Day and Wild (2007) gave the exact finite-size condition for a class of symmetric networks (Taylor et al. 2007); Yu-Ting Chen proved in 2013 that it holds for every network in which each individual has neighbours (Chen 2013). Allen and colleagues (2017) gave a method that works for any network: first solve a set of linear equations for the “meeting times” of random walks, then compute the critical from them (Allen et al. 2017).
Calculation
# Critical b/c for cooperation on a given graph under death-birth updating and weak
# selection, computed exactly with the coalescence-time method of Allen et al. (2017):
# tau_ii = 0, tau_ij = 1 + (1/2) sum_k (p_ik tau_kj + p_jk tau_ik) (i != j)
# tau(n) = sum_ij pi_i p(n)_ij tau_ij, (b/c)* = tau(2) / (tau(3) - tau(1)),
# where p is the random-walk step matrix and pi its stationary distribution. Cooperation
# is favoured (fixation probability of C above that of D) iff b/c > (b/c)* when the
# denominator is positive; otherwise never. Compared with k (Ohtsuki et al. 2006, large
# N) and (N - 2)/(N/k - 2) (exact for k-regular graphs: Taylor, Day & Wild 2007 for
# transitive graphs, Chen 2013 for all regular graphs).
import random
rng = random.Random(11)
def solve(A, y):
n = len(A)
M = [row[:] + [v] for row, v in zip(A, y)]
for c in range(n):
p = max(range(c, n), key=lambda r: abs(M[r][c])); M[c], M[p] = M[p], M[c]
piv = M[c][c]; M[c] = [v / piv for v in M[c]]
for r in range(n):
f = M[r][c]
if r != c and f: M[r] = [a - f * b for a, b in zip(M[r], M[c])]
return [M[r][n] for r in range(n)]
def critical(adj):
N = len(adj)
deg = [len(a) for a in adj]
P = [[(1 / deg[i] if j in adj[i] else 0.0) for j in range(N)] for i in range(N)]
pi = [d / sum(deg) for d in deg]
pairs = [(i, j) for i in range(N) for j in range(i + 1, N)]
idx = {pr: k for k, pr in enumerate(pairs)}
key = lambda i, j: idx[(min(i, j), max(i, j))]
A = [[0.0] * len(pairs) for _ in pairs]; y = [1.0] * len(pairs)
for (i, j), r in idx.items():
A[r][r] += 1.0
for k in adj[i]:
if k != j: A[r][key(k, j)] -= 0.5 * P[i][k]
for k in adj[j]:
if k != i: A[r][key(i, k)] -= 0.5 * P[j][k]
t = solve(A, y)
tau = lambda i, j: 0.0 if i == j else t[key(i, j)]
T = [[tau(i, j) for j in range(N)] for i in range(N)]
PT = [[sum(P[i][k] * T[k][j] for k in adj[i]) for j in range(N)] for i in range(N)]
P2T = [[sum(P[i][k] * PT[k][j] for k in adj[i]) for j in range(N)] for i in range(N)]
P3T = [[sum(P[i][k] * P2T[k][j] for k in adj[i]) for j in range(N)] for i in range(N)]
t1 = sum(pi[i] * PT[i][i] for i in range(N))
t2 = sum(pi[i] * P2T[i][i] for i in range(N))
t3 = sum(pi[i] * P3T[i][i] for i in range(N))
return t2 / (t3 - t1) if t3 > t1 else float("inf")
def ring(N, k):
return [sorted({(i + d) % N for d in range(-k // 2, k // 2 + 1) if d})
for i in range(N)]
def torus(a, b):
nb = lambda i, j: [((i + 1) % a) * b + j, ((i - 1) % a) * b + j, i * b + (j + 1) % b,
i * b + (j - 1) % b]
return [sorted(set(nb(i, j))) for i in range(a) for j in range(b)]
def random_regular(N, k):
while True:
stubs = [i for i in range(N) for _ in range(k)]; rng.shuffle(stubs)
e = {(min(a, b), max(a, b)) for a, b in zip(stubs[::2], stubs[1::2]) if a != b}
if len(e) == N * k // 2:
adj = [[] for _ in range(N)]
for a, b in e: adj[a].append(b); adj[b].append(a)
return adj
N = 24
GRAPHS = [("cycle", ring(N, 2)), ("ring, 4 neighbours", ring(N, 4)),
("4 x 6 torus lattice", torus(4, 6)),
("random 4-regular", random_regular(N, 4)),
("ring, 8 neighbours", ring(N, 8)),
("star", [list(range(1, N))] + [[0] for _ in range(N - 1)]),
("complete graph", [[j for j in range(N) if j != i] for i in range(N)])]
print(f"N = {N} k exact (b/c)* (N-2)/(N/k-2) rule b/c > k")
for name, adj in GRAPHS:
k = sum(map(len, adj)) / N
crit = critical(adj)
form = (N - 2) / (N / k - 2) if N / k > 2 else float("inf")
cs = f"{crit:8.3f}" if crit < 1e6 else " never"
fs = f"{form:8.3f}" if form < 1e6 else " never"
print(f" {name:20s} {k:5.2f} {cs} {fs} {k:5.2f}")
# N = 24 k exact (b/c)* (N-2)/(N/k-2) rule b/c > k
# cycle 2.00 2.200 2.200 2.00
# ring, 4 neighbours 4.00 5.500 5.500 4.00
# 4 x 6 torus lattice 4.00 5.500 5.500 4.00
# random 4-regular 4.00 5.500 5.500 4.00
# ring, 8 neighbours 8.00 22.000 22.000 8.00
# star 1.92 never 2.091 1.92
# complete graph 23.00 never never 23.00The program uses the method of Allen and colleagues to compute the exact critical values for seven networks of 24 nodes. For a cycle (2 neighbours each) it is 2.200, the same as ; the three networks with 4 neighbours each (a ring, a 4 × 6 torus lattice and a randomly generated 4-regular graph) all give 5.500, as the formula does, which also shows that for networks in which everyone has the same number of neighbours the result depends only on and ; with 8 neighbours each it is 22.000. In all three cases the value is well above : cooperation is harder in small networks. On a star (one hub linked to 23 leaves) and on the complete graph (everyone linked to everyone) cooperation is not favoured for any . The complete graph is the randomly mixed population; the star has fewer than 2 neighbours on average, yet its structure prevents cooperation from benefiting, which shows that “average number of neighbours” is not the only quantity that matters.
Experiments with human networks
The models say that under particular updating rules network structure can help cooperation. Whether human behaviour on networks follows suit is a question for experiments.
Evidence
Static networks did not raise cooperation. Gracia-Lázaro and colleagues (2012) organised a large experiment: 1,229 students from 42 secondary schools in Aragón, Spain, 625 on a 25 × 25 lattice (4 neighbours each) and 604 on a heterogeneous network with between 2 and 16 neighbours, played the prisoner’s dilemma with all their neighbours at once (mutual cooperation 7 each, defecting against a cooperator 10, everything else 0) for more than 50 rounds. Cooperation was almost the same in the two networks, falling from about 60 % and settling at about 30 %; participants behaved more like conditional cooperators, whose choice depended on how much their neighbours had cooperated in the previous round and on their own previous action (what the authors call “moody conditional cooperation”), than like imitators of high-scoring neighbours. The authors concluded that population structure has little relevance as a promoter or inhibitor of cooperation among humans (Gracia-Lázaro et al. 2012).
Evidence
Networks stabilised cooperation when b/c > k. Rand, Nowak, Fowler and Christakis (2014) varied the benefit-to-cost ratio and the number of neighbours systematically. Their second experiment recruited 1,163 participants online and crossed (2, 4, 6) with the number of neighbours (2, 4, 6) in a 15-round donation game. When , cooperation remained stable in the second half and cooperators clustered significantly; when , cooperation kept falling and defectors earned significantly more than cooperators. In control sessions with in which neighbours were reshuffled every round, cooperation also declined (Rand et al. 2014).
The disagreement between the two studies is not fully resolved. Rand and colleagues went through the earlier network experiments one by one: by their calculation, the parameters of the lattice experiment of Grujić and colleagues (2010, 8 neighbours each) did not satisfy , and the absence of stable cooperation there is consistent with the theory (Grujić et al. 2010); but they also acknowledged that the parameters of Gracia-Lázaro and colleagues did satisfy the condition and yet no stable cooperation emerged. The explanations they suggested were that each network was run only once in that experiment, and that the secondary-school participants may have experimented more (Rand et al. 2014). These explanations have not been tested directly. On the other side, the positive results of Rand and colleagues come from a 15-round online experiment with only 4 sessions per treatment. What the two studies show together is that static networks are no “guarantee” of cooperation, and whether the conditions in the models (payoff structure, updating rule) act in the same way on people remains an open question. One more point deserves attention: Gracia-Lázaro and colleagues found that people in experiments usually do not “imitate the highest-scoring neighbour” but respond conditionally to what their neighbours did in the previous round (Gracia-Lázaro et al. 2012), which differs from the updating rules of the models; so even where a model’s prediction is supported in direction, the mechanism may not be the same.
Hypothesis · not established
Link-density hypothesis (not yet established). The author conjectures that in an online community that collaborates in small groups, the fewer fixed collaboration partners each member has (the smaller ), the better a norm of mutual help is maintained when the return on collaboration is not high relative to the effort; with many partners, a higher benefit-to-cost ratio is needed for the same effect. A testable prediction is that in collaboration experiments with randomly assigned numbers of fixed partners (say 2, 4 or 8), mutual help declines as the number of partners rises, and declines more steeply when the benefit-to-cost ratio is low. If the number of partners has no effect on mutual help, or the effect runs the other way, the hypothesis is refuted.
Chapter summary
When individuals interact only with neighbours, cooperators can survive by forming clusters: in the Nowak–May model cooperators settle at about 31 % for , whereas they all die out under random mixing. The rule of Ohtsuki and colleagues, , gives the condition under which a network favours cooperation with death–birth updating and weak selection; the exact threshold for finite networks, , is higher, and under birth–death updating a network never favours cooperation. In human experiments a large static network did not raise cooperation, while cooperation remained stable under the condition ; whether networks help cooperation depends on payoff structure and on how people actually respond. The next chapter discusses a mechanism that changes payoffs directly: punishment.
References
Fan, Y. (2026). Evolutionary Game Theory, Direct and Indirect Reciprocity and the Emergence of Cooperation: From Hamilton's Rule and Axelrod's Tournaments to Reputation and Costly Punishment, Read Beside Classical Confucian and Mohist Ethics [演化博弈、直接与间接互惠及合作涌现的数学模型] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23788551 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).