5D Library › 演化博弈、直接与间接互惠及合作涌现的数学模型 · English

第二章 汉密尔顿法则、普莱斯方程与五种机制

亲缘与 rb > c

上一章的结论是:在随机相遇、单次匿名的捐献博弈中,合作者必然吃亏。要改变这个结论,必须有某种东西让合作者的收益与「谁会遇到合作者」相关联。最早被认识到的一种关联是亲缘。

证据

汉密尔顿法则。 汉密尔顿 1964 年提出,一个使行为者付出代价 cc、使受益者得到好处 bb 的行为,如果

rb>cr\,b > c

就会被自然选择所偏爱,其中 rr 是两者之间的亲缘系数(例如全同胞为 1/2,半同胞为 1/4,堂表亲为 1/8)。他把个体自身的繁殖成功与它对亲属繁殖的影响(按亲缘系数加权)合起来,称为包容适合度 (Hamilton 1964)。

汉密尔顿法则常被简化为「帮助亲属就是帮助自己的基因」。这种说法容易误导:法则中的 rr 不是「共享基因的比例」,而是一个统计量,在最一般的形式中,它是受益者的基因型对行为者基因型的回归系数 (Gardner et al. 2011)。理解这一点,最清楚的途径是普莱斯方程。

普莱斯方程

证据

协方差与选择。 普莱斯 1970 年给出一个恒等式:一个性状的平均值在一代之间的变化,等于性状与适合度的协方差(除以平均适合度),加上传递过程中的偏差 (Price 1970)。他 1972 年把这个公式推广到有层级结构的种群,把变化分解为「群体之间」与「群体之内」两部分 (Price 1972)。

推导

设种群分为若干群体,群体 gg 中合作者的比例为 pgp_g,平均适合度为 WgW_g,下一代群体内比例的变化为 Δpg\Delta p_g。在各群体大小相同时,

W‾Δp‾=Covg(Wg,pg)⏟群体之间+Eg(WgΔpg)⏟群体之内\bar W\,\Delta \bar p = \underbrace{\mathrm{Cov}_g(W_g,\ p_g)}_{\text{群体之间}} + \underbrace{\mathrm{E}_g(W_g\,\Delta p_g)}_{\text{群体之内}}

第一项为正,表示合作者多的群体繁殖更多;第二项为负,表示在每个群体内部,合作者都比背叛者繁殖得少。总的方向取决于两项谁大。在个体层面,若每个合作者付出 cc、把 bb 平均分给同组的其他人,合作者比例上升当且仅当

rb>c,r=Cov(zi,z‾−i)Var(zi)r\,b > c, \qquad r = \frac{\mathrm{Cov}(z_i,\ \bar z_{-i})}{\mathrm{Var}(z_i)}

其中 ziz_i 为个体是否合作,z‾−i\bar z_{-i} 为同组其他人中合作者的比例。这就是回归形式的汉密尔顿法则:rr 衡量的是「合作者身边的人比一般人更可能是合作者」的程度,它可以来自亲缘,也可以来自任何使相似者聚在一起的过程。

推导

# The Price equation for a group-structured population, checked exactly. 20 groups of n
# = 10. Cooperators (z = 1) pay c = 1 and give b = 4 split among the other n - 1 group
# members. Fitness w = 1 + s * payoff, s = 0.05; offspring inherit z exactly (no
# transmission bias). Price (1972) splits the change in the cooperator share into a
# between-group covariance and the average within-group change:
#     w_bar * dz_bar = Cov_g(W_g, p_g) + E_g(W_g * dp_g)      (group weights equal)
# Hamilton's rule follows from the same covariance: z_bar rises iff r b > c, with the
# regression relatedness r = Cov(z_i, mean z of i's group-mates) / Var(z_i).
import random
rng = random.Random(3)
B, C, S, N_G, N = 4.0, 1.0, 0.05, 20, 10

def one_generation(groups):
    W, P, dP = [], [], []
    for g in groups:
        k = sum(g)
        w = [1 + S * (-C * z + B * (k - z) / (N - 1)) for z in g]
        Wg = sum(w) / N; p = k / N
        p_next = sum(wi * z for wi, z in zip(w, g)) / sum(w)
        W.append(Wg); P.append(p); dP.append(p_next - p)
    m = len(groups); wbar = sum(W) / m; pbar = sum(P) / m
    pbar_next = sum(Wg * (p + d) for Wg, p, d in zip(W, P, dP)) / sum(W)
    between = sum((Wg - wbar) * (p - pbar) for Wg, p in zip(W, P)) / m
    within = sum(Wg * d for Wg, d in zip(W, dP)) / m
    return pbar, pbar_next, between / wbar, within / wbar

def relatedness(groups):
    zs = [z for g in groups for z in g]; mu = sum(zs) / len(zs)
    var = sum((z - mu) ** 2 for z in zs) / len(zs)
    cov = sum((z - mu) * ((sum(g) - z) / (N - 1) - mu) for g in groups for z in g)
    cov /= len(zs)
    return cov / var

def make(spread):
    """Group cooperator counts drawn around 5 with a given spread (assortment)."""
    groups = []
    for _ in range(N_G):
        k = min(N, max(0, round(5 + spread * rng.gauss(0, 1))))
        groups.append([1] * k + [0] * (N - k))
    return groups

err = 0.0
print("spread  r(regr.)  r*b - c   change in p   between   within   within each group")
for spread in (0.0, 1.0, 2.0, 3.0, 4.0, 6.0):
    gs = make(spread)
    p0, p1, bt, wi = one_generation(gs)
    r = relatedness(gs)
    err = max(err, abs(p1 - p0 - bt - wi))
    mixed = [g for g in gs if 0 < sum(g) < N]
    falls = all(one_generation([g])[3] < 0 for g in mixed)
    print(f"{spread:5.1f}   {r:+.3f}   {r * B - C:+.3f}   {p1 - p0:+.6f}"
          f"   {bt:+.6f}  {wi:+.6f}"
          f"   {'falls' if falls else 'mixed'} ({len(mixed)} mixed groups)")
print(f"largest |change - (between + within)| over the six rows: {err:.1e}")
# spread  r(regr.)  r*b - c   change in p   between   within   within each group
#   0.0   -0.111   -1.444   -0.016796   +0.000000  -0.016796   falls (20 mixed groups)
#   1.0   -0.071   -1.282   -0.014917   +0.001275  -0.016192   falls (20 mixed groups)
#   2.0   +0.156   -0.378   -0.004315   +0.008229  -0.012544   falls (19 mixed groups)
#   3.0   +0.208   -0.170   -0.001962   +0.009963  -0.011925   falls (16 mixed groups)
#   4.0   +0.356   +0.422   +0.004910   +0.014651  -0.009742   falls (14 mixed groups)
#   6.0   +0.515   +1.062   +0.012344   +0.019669  -0.007325   falls (11 mixed groups)
# largest |change - (between + within)| over the six rows: 6.4e-17

程序构造 20 个 10 人群体,每个群体中合作者的人数围绕 5 随机波动,「spread」控制波动的大小,也就是群体间差异的大小。每一行都满足同一个事实:在每个混合的群体内部,合作者的比例都在下降(最后一列)。但总体比例的变化取决于群体间差异:spread 为 0 时,每组恰好 5 名合作者,回归亲缘系数 r=−0.111r = -0.111(每个合作者的同组同伴中合作者比平均更少,这是有限群体抽样的结果),总体比例下降 0.0168;spread 为 4 时 r=0.356r = 0.356,rb−c=+0.422>0rb – c = +0.422 > 0,群体间的正项(+0.0147)压过群体内的负项(−0.0097),总体比例上升 0.0049。六行中 rb−crb – c 的符号与总体变化的符号完全一致,分解的两项之和与实际变化的差不超过 10−1610^{-16},即计算机的舍入误差。

这正是「辛普森悖论」的一个例子:每个群体内部合作者都在减少,但整个种群中合作者在增加。

注

恒等式与因果模型。 普莱斯方程是一个数学恒等式,任何一代的数据都满足它;它告诉我们怎样记账,不告诉我们群体是怎样形成的、下一代群体间的差异能否维持。回归形式的汉密尔顿法则同样总是「成立」,因为 rr 与 bb、cc 都是按回归定义的;它的解释力取决于这些回归系数是否稳定。这是包容适合度争论中反复出现的一点 (Gardner et al. 2011)。

诺瓦克的五种机制

证据

五条规则。 诺瓦克 2006 年在《科学》上把合作演化的机制归纳为五种,并指出每一种都可以写成「收益—代价比超过某个门槛」:亲缘选择 b/c>1/rb/c > 1/r;直接互惠 b/c>1/wb/c > 1/w(ww 为同一对个体再次相遇的概率);间接互惠 b/c>1/qb/c > 1/q(qq 为知道对方声誉的概率);网络互惠 b/c>kb/c > k(kk 为每个个体的平均邻居数);群体选择 b/c>1+n/mb/c > 1 + n/m(nn 为群体的最大规模,mm 为群体数)(Nowak 2006)。文中用三个标准比较合作与背叛:合作是否为 ESS、是否「风险占优」、是否被有限种群的三分之一法则偏爱。

推导

# Nowak's (2006) five thresholds, each recomputed from its own model. Every rule has the
# form b/c > critical value, but the models and assumptions differ (see the text).
# Direct reciprocity: TFT vs ALLD, w = probability of another round. Row payoffs:
#     TFT vs TFT (b - c)/(1 - w), TFT vs ALLD -c, ALLD vs TFT b, ALLD vs ALLD 0.
# Indirect reciprocity: discriminators know a reputation with probability q:
#     DISC vs DISC b - c, DISC vs ALLD -c (1 - q), ALLD vs DISC b (1 - q), ALLD vs ALLD 0.
# For a 2 x 2 game [[a, b'], [c', d]] (cooperative strategy first): cooperation is an
# ESS if a > c', risk-dominant if a + b' > c' + d, and favoured by weak selection in a
# large population (one-third law) if a + 2b' > c' + 2d.
def conditions(M):
    (a, b, c, d) = M
    return a > c, a + b > c + d, a + 2 * b > c + 2 * d

def crit(make, lo=1.0001, hi=60.0):
    """Smallest b/c (c = 1) at which each of the three conditions holds, by bisection."""
    out = []
    for k in range(3):
        l, h = lo, hi
        if not conditions(make(h))[k]: out.append(float("inf")); continue
        for _ in range(60):
            m = (l + h) / 2
            if conditions(make(m))[k]: h = m
            else: l = m
        out.append(h)
    return out

print("direct reciprocity          ESS          risk-dominant        one-third law")
for w in (0.5, 0.8, 0.9):
    e, r, t = crit(lambda bc: ((bc - 1) / (1 - w), -1, bc, 0))
    print(f"  w = {w}: numeric   {e:6.3f}            {r:6.3f}             {t:6.3f}")
    print(f"           formula   {1 / w:6.3f} (1/w)      {(2 - w) / w:6.3f} ((2-w)/w)"
          f"     {(3 - 2 * w) / w:6.3f} ((3-2w)/w)")
print("indirect reciprocity")
for q in (0.5, 0.8, 0.9):
    e, r, t = crit(lambda bc: (bc - 1, -(1 - q), bc * (1 - q), 0))
    print(f"  q = {q}: numeric   {e:6.3f}            {r:6.3f}             {t:6.3f}")
# Network reciprocity (Ohtsuki et al. 2006: death-birth updating, weak selection, k << N);
# exact value for vertex-transitive graphs of size N (Taylor, Day & Wild 2007).
print("network reciprocity, critical b/c: k (large N) vs (N - 2)/(N/k - 2)")
for k in (2, 4, 8):
    print(f"  k = {k}: " + "  ".join(f"N={N}: {(N - 2) / (N / k - 2):6.2f}"
                                     for N in (20, 50, 100, 1000)) + f"   limit {k}")
print("kin selection 1/r: full sibs r = 1/2 -> 2, half sibs 1/4 -> 4, cousins 1/8 -> 8")
print("group selection 1 + n/m (Traulsen & Nowak 2006: weak selection, rare splitting):")
for n, m in ((10, 5), (10, 50), (30, 10)):
    print(f"  max group size n = {n}, m = {m} groups: {1 + n / m:.2f}")
# direct reciprocity          ESS          risk-dominant        one-third law
#   w = 0.5: numeric    2.000             3.000              4.000
#            formula    2.000 (1/w)       3.000 ((2-w)/w)      4.000 ((3-2w)/w)
#   w = 0.8: numeric    1.250             1.500              1.750
#            formula    1.250 (1/w)       1.500 ((2-w)/w)      1.750 ((3-2w)/w)
#   w = 0.9: numeric    1.111             1.222              1.333
#            formula    1.111 (1/w)       1.222 ((2-w)/w)      1.333 ((3-2w)/w)
# indirect reciprocity
#   q = 0.5: numeric    2.000             3.000              4.000
#   q = 0.8: numeric    1.250             1.500              1.750
#   q = 0.9: numeric    1.111             1.222              1.333
# network reciprocity, critical b/c: k (large N) vs (N - 2)/(N/k - 2)
#   k = 2: N=20:   2.25  N=50:   2.09  N=100:   2.04  N=1000:   2.00   limit 2
#   k = 4: N=20:   6.00  N=50:   4.57  N=100:   4.26  N=1000:   4.02   limit 4
#   k = 8: N=20:  36.00  N=50:  11.29  N=100:   9.33  N=1000:   8.11   limit 8
# kin selection 1/r: full sibs r = 1/2 -> 2, half sibs 1/4 -> 4, cousins 1/8 -> 8
# group selection 1 + n/m (Traulsen & Nowak 2006: weak selection, rare splitting):
#   max group size n = 10, m = 5 groups: 3.00
#   max group size n = 10, m = 50 groups: 1.20
#   max group size n = 30, m = 10 groups: 4.00

程序从各自的收益矩阵出发,用二分法求出三个标准下的门槛,再与公式对照。直接互惠中,一报还一报对抗永远背叛:两个一报还一报每轮都合作,期望收益 (b−c)/(1−w)(b – c)/(1 – w);一报还一报遇到永远背叛只在第一轮吃亏 −c-c;永远背叛遇到一报还一报只在第一轮得 bb。由此,一报还一报为 ESS 的条件是 b/c>1/wb/c > 1/w,风险占优要求 b/c>(2−w)/wb/c > (2 – w)/w,三分之一法则要求 b/c>(3−2w)/wb/c > (3 – 2w)/w。w=0.5w = 0.5 时三者依次为 2、3、4:1/w1/w 是最宽松的一个。间接互惠的矩阵结构相同,以 qq 代替 ww,门槛也相同。

网络互惠的门槛 kk 是大种群中的极限。对每人都有 kk 个邻居的有限网络,精确门槛是 (N−2)/(N/k−2)(N – 2)/(N/k – 2) (Taylor et al. 2007; Chen 2013):k=4k = 4 时,N=20N = 20 需要 6.00,N=100N = 100 需要 4.26,N=1000N = 1000 需要 4.02。小网络中门槛远高于 kk。群体选择的门槛 1+n/m1 + n/m 在群体多、规模小时接近 1:10 人的群体有 50 个时为 1.2,有 5 个时为 3。

注

五个门槛的五套假设。 第一,五条规则出自五个不同的模型,不是同一个模型的五个特例,不能直接相加或比较:说「w=0.5w = 0.5 时直接互惠需要 b/c>2b/c > 2,k=4k = 4 时网络互惠需要 b/c>4b/c > 4,所以直接互惠更容易」并没有意义。第二,各模型有各自的条件。亲缘选择的 1/r1/r 假设代价与收益可以相加。直接互惠的 1/w1/w 只比较一报还一报与永远背叛两种策略,没有执行错误。网络互惠的 kk 要求「死亡—出生」更新、弱选择与 N≫kN \gg k;在「出生—死亡」更新下,网络从不偏爱合作 (Ohtsuki et al. 2006)(第五章)。群体选择的 1+n/m1 + n/m 要求弱选择、群体分裂很少发生 (Traulsen and Nowak 2006)。第三,「五种机制」本身是一种分类方式,并非公认:许多学者认为亲缘选择与群体选择是同一个过程的两种数学写法,「群体选择」一词的不同用法造成了长期的混乱 (West et al. 2007)。

证据

包容适合度之争。 诺瓦克、塔尔尼塔与威尔逊 2010 年在《自然》上撰文,认为包容适合度理论只在少数特殊条件下成立,用它解释真社会性昆虫的演化是不必要的,应当以种群遗传学的标准模型取代 (Nowak et al. 2010)。次年,《自然》刊出了由阿博特领衔、137 位作者联名的回应,认为包容适合度理论有坚实的数学基础与大量经验支持,诺瓦克等人误解了它 (Abbot et al. 2011)。这场争论至今没有一致的结论;本书只把汉密尔顿法则当作普莱斯方程的一个推论来使用,不对争论作裁决。

假说 · 尚未验证

分组方式假说(尚未确立)。作者推测,在一个按项目临时组队的组织中,合作行为(例如主动分享资源)能否在全组织中扩散,取决于组队方式所产生的「回归亲缘系数」,即合作者的队友比一般人更可能是合作者的程度,而不取决于组织的口号。可以检验的预测是:在组队规则可以随机化的场合(例如轮岗或在线协作平台),按自愿组队的单元比随机分配的单元,在一段时间后的合作行为比例更高,且差异的大小与组内合作行为的相关性成正比。如果两种组队方式没有差异,或者差异与组内相关无关,这一假说就被推翻。

本章小结

汉密尔顿法则 rb>crb > c 可以从普莱斯方程推出:当合作者身边的人更可能是合作者时,群体间的选择可以压过群体内的选择,出现每个群体中合作都在减少、整体却在增加的辛普森悖论。诺瓦克把合作演化的机制归纳为五种,各有一个 b/cb/c 门槛;这些门槛出自不同的模型,依赖不同的假设,「五种机制」的分类与包容适合度理论的地位都仍有争议。下一章仔细看其中研究最多的一种:直接互惠。

参考文献

Abbot, Patrick et al. 2011. “Inclusive Fitness Theory and Eusociality.” Nature 471 (7339): E1–4. https://doi.org/10.1038/nature09831.
Chen, Yu-Ting. 2013. “Sharp Benefit-to-Cost Rules for the Evolution of Cooperation on Regular Graphs.” The Annals of Applied Probability 23 (2): 637–64. https://doi.org/10.1214/12-AAP849.
Gardner, Andy, Stuart A. West, and Geoff Wild. 2011. “The Genetical Theory of Kin Selection.” Journal of Evolutionary Biology 24 (5): 1020–43. https://doi.org/10.1111/j.1420-9101.2011.02236.x.
Hamilton, William D. 1964. “The Genetical Evolution of Social Behaviour. I.” Journal of Theoretical Biology 7 (1): 1–16. https://doi.org/10.1016/0022-5193(64)90038-4.
Nowak, Martin A. 2006. “Five Rules for the Evolution of Cooperation.” Science 314 (5805): 1560–63. https://doi.org/10.1126/science.1133755.
Nowak, Martin A., Corina E. Tarnita, and Edward O. Wilson. 2010. “The Evolution of Eusociality.” Nature 466 (7310): 1057–62. https://doi.org/10.1038/nature09205.
Ohtsuki, Hisashi, Christoph Hauert, Erez Lieberman, and Martin A. Nowak. 2006. “A Simple Rule for the Evolution of Cooperation on Graphs and Social Networks.” Nature 441 (7092): 502–5. https://doi.org/10.1038/nature04605.
Price, George R. 1970. “Selection and Covariance.” Nature 227 (5257): 520–21. https://doi.org/10.1038/227520a0.
Price, George R. 1972. “Extension of Covariance Selection Mathematics.” Annals of Human Genetics 35 (4): 485–90.
Taylor, Peter D., Troy Day, and Geoff Wild. 2007. “Evolution of Cooperation in a Finite Homogeneous Graph.” Nature 447 (7143): 469–72. https://doi.org/10.1038/nature05784.
Traulsen, Arne, and Martin A. Nowak. 2006. “Evolution of Cooperation by Multilevel Selection.” Proceedings of the National Academy of Sciences 103 (29): 10952–55. https://doi.org/10.1073/pnas.0602530103.
West, Stuart A., Ashleigh S. Griffin, and Andy Gardner. 2007. “Social Semantics: Altruism, Cooperation, Mutualism, Strong Reciprocity and Group Selection.” Journal of Evolutionary Biology 20 (2): 415–32. https://doi.org/10.1111/j.1420-9101.2006.01258.x.

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).