The emergence of "us and them" in 80 lines of code: modeling group genesis in homogeneous populations
Related Experiment Video
Updated: May 2, 2026

Heuristic Mining of Hierarchical Genotypes and Accessory Genome Loci in Bacterial Populations
Published on: December 7, 2021
Kurt Gray1, David G Rand, Eyal Ert
11Department of Psychology, University of North Carolina, Chapel Hill.
Abstract:
Psychological explanations of group genesis often require population heterogeneity in identity or other characteristics, whether deep (e.g., religion) or superficial (e.g., eye color). We used agent-based models to explore group genesis in homogeneous populations and found robust group formation with just two basic principles: reciprocity and transitivity. These emergent groups demonstrated in-group cooperation and out-group defection, even though agents lacked common identity. Group formation increased individual payoffs, and group number and size were robust to varying levels of reciprocity and transitivity. Increasing population size increased group size more than group number, and manipulating baseline trust in a population had predictable effects on group genesis. An interactive demonstration of the parameter space and source code for implementing the model are available online.
Related Concept Videos
In- and Out-Groups
Impact of Groups on Individuals
What is Population Genetics?
Impact of Groups on Groups
Mutation, Gene Flow, and Genetic Drift
Test for Homogeneity

