Skip to main content

Indirect Reciprocity

GitHub code
Indirect reciprocity is cooperation sustained by reputation. Rather than requiring repeated encounters with the same individual, an agent helps others whose public reputation signals that they are good cooperators — "I help you because others are watching."

How It Is Implemented Here​

Each site carries a public reputation score. The positive routing kernel is biased toward higher-reputation recipients:

Kj→i+∝bias+reputationi exponentK^+_{j \to i} \propto \text{bias} + \text{reputation}_i^{\,\text{exponent}}

with row normalization applied afterward. After each step, the reputation of surviving sites is updated from observed helping output:

repi←(1−ω)×repparent+ω×Bparent+B_plus_scale\text{rep}_i \leftarrow (1 - \omega) \times \text{rep}_{\text{parent}} + \omega \times \frac{B^+_{\text{parent}}}{\text{B\_plus\_scale}}

where ω\omega is the observation weight. Agents that help more accumulate higher reputation, which causes them to receive more routed benefit — sustaining cooperation through the public reputation channel.

Key Parameters​

ParameterDefaultRole
reputation_default0.5Initial reputation for all sites
reputation_observation_weight0.35How quickly reputation tracks recent helping
reputation_kernel_bias0.10Minimum routing weight regardless of reputation
reputation_kernel_exponent1.0Curvature of reputation-to-weight mapping
B_plus_scale1.0Scales cooperative benefit produced per unit trait
C_scale0.2Private cost per unit trait
Display 1: Key parameters controlling reputation dynamics and routing in the indirect reciprocity model.

Python Module Layout​

moran_models/nowak_mechanisms/indirect_reciprocity/
__init__.py
indirect_reciprocity_model.py
indirect_reciprocity_pygame_ui.py
config/
indirect_reciprocity_config.py

Usage​

./.conda/bin/python -m moran_models.nowak_mechanisms.indirect_reciprocity.indirect_reciprocity_model

Live viewer:

./.conda/bin/python -m moran_models.nowak_mechanisms.indirect_reciprocity.indirect_reciprocity_pygame_ui

See Also​

  • The McKee et al. (2023) Reputation Replication — the learned, deep-reinforcement-learning analog of this same mechanism: instead of a Moran process rewarding cooperators with a better public reputation, agents get an intrinsic reward penalty for falling behind the group's contribution average. Training currently collapses before that mechanism can be tested, in a public-goods environment (Hughes et al. 2018's Cleanup) that has separately failed to reproduce a different reward-shaping mechanism's headline claim — see Evidence So Far.

References​