Skip to main content

Group Selection

GitHub code
Group selection adds a second level of selection on top of individual competition. Groups whose members cooperate more produce higher average fitness, and periodically the most successful group is copied into the least successful group — selection acts on groups as well as on individuals.

How It Is Implemented Here​

Sites are partitioned into a fixed number of groups at initialisation. Within each step, individual Moran replacement proceeds normally based on individual fitness scores. Every group_selection_interval steps a between-group event fires: the group with the highest mean fitness is copied into the group with the lowest mean fitness, replacing all traits and lineage labels in the sink group with randomly sampled copies from the source group.

This implements a two-level selection process:

  • Within-group: individual Moran replacement based on individual scores
  • Between-group: periodic copying of the best group into the worst group

Key Parameters​

ParameterDefaultRole
group_count8Number of groups the population is divided into
group_selection_interval25Steps between between-group selection events
group_selection_mode"copy_best_group_into_worst_group"Between-group replacement rule
B_plus_scale1.0Scales cooperative benefit produced per unit trait
C_scale0.2Private cost per unit trait
Display 1: Key parameters controlling group partitioning and between-group selection.

Python Module Layout​

moran_models/nowak_mechanisms/group_selection/
__init__.py
group_selection_model.py
group_selection_pygame_ui.py
config/
group_selection_config.py

Usage​

./.conda/bin/python -m moran_models.nowak_mechanisms.group_selection.group_selection_model

Live viewer:

./.conda/bin/python -m moran_models.nowak_mechanisms.group_selection.group_selection_pygame_ui

See Also​

  • Spatial Altruism — Mitteldorf & Wilson (2000) explicitly frame their spatial viscosity model as a group-selection argument, not a network-reciprocity one, and one of the two authors, David Sloan Wilson, is among the field's most prominent group-selection theorists. Their harsher, variable-density variants let patches dominated by altruists sustain a higher local population density than patches dominated by non-altruists — the same between-group-productivity logic this page formalizes through its own periodic best-group-into-worst-group event. The mechanism is realized very differently, though: this page partitions sites into a fixed number of discrete groups from the outset, while Mitteldorf & Wilson never define an explicit group boundary at all — patches emerge and dissolve continuously as a byproduct of the same spatial lottery that drives individual-level competition, so "group" membership there is implicit and constantly shifting rather than a fixed partition.
  • The Boyd & Richerson (2009) Culture Replication — a cultural group-selection argument rather than a genetic one: the same tug-of-war between local adaptation and migration that this page's periodic best-group-into-worst-group event formalizes for a fixed number of discrete groups, but running on cultural traits across a 256-subpopulation torus, where culture's faster effective selection and lower effective migration let far more between-group variation survive than genetics ever could.

References​