Kin Selection Simulator: Hamilton's Rule & the Evolution of Altruism

simulator intermediate ~10 min
Loading simulation...
rB/C = 1.67 — Hamilton's rule satisfied, altruism favored

With relatedness r=0.5 (full siblings), benefit B=10, and cost C=3, Hamilton's rule gives rB/C = 1.67 > 1. Altruistic behavior is favored by natural selection because the inclusive fitness gain (-3 + 0.5×10 = +2) is positive.

Formula

Hamilton's rule: rB > C
Inclusive fitness gain: ΔW = -C + rB
Relatedness: r = (probability of shared allele IBD)

The Problem of Altruism

Altruism — behavior that benefits another at a cost to oneself — posed a serious challenge to Darwin's theory of natural selection. If evolution favors individuals that maximize their own reproductive success, why do organisms sacrifice for others? Worker bees are sterile, ground squirrels give alarm calls that attract predators, and vampire bats regurgitate blood meals for hungry roost-mates. The solution came from W.D. Hamilton's revolutionary insight: genes, not organisms, are the fundamental unit of selection.

Hamilton's Rule: rB > C

In 1964, W.D. Hamilton published one of the most important papers in evolutionary biology, showing that an allele coding for altruistic behavior will increase in frequency whenever rB > C. Here r is the coefficient of relatedness between actor and recipient, B is the fitness benefit conferred on the recipient, and C is the fitness cost paid by the actor. The key insight is that an altruistic gene can spread not only through the actor's own offspring (direct fitness) but through copies of itself residing in relatives (indirect fitness). The total — inclusive fitness — is what natural selection actually maximizes.

Relatedness and Social Evolution

The coefficient of relatedness r determines how much weight evolution places on helping relatives versus oneself. For full siblings in diploid species, r = 0.5, meaning there is a 50% chance they share any given allele identical by descent. J.B.S. Haldane captured this logic with his famous quip: 'I would lay down my life for two brothers or eight cousins.' The haplodiploidy of Hymenoptera (ants, bees, wasps) creates an asymmetry where sisters share r = 0.75, which is thought to have predisposed this order to the repeated evolution of eusociality — the most extreme form of altruism in nature.

Simulation and Implications

This simulator tracks the frequency of an altruism allele across generations in a finite population. When Hamilton's rule is satisfied (rB > C), the allele spreads; when violated, selfish behavior dominates. The simulation also shows how population size interacts with selection — in small populations, genetic drift can override even favorable kin selection. Hamilton's framework has been extended to explain cooperation in microbes, conflict within genomes, and even aspects of human social behavior. It remains one of the most powerful predictive theories in all of behavioral ecology.

FAQ

What is Hamilton's rule?

Hamilton's rule states that a gene for altruistic behavior will spread through a population when rB > C, where r is the coefficient of genetic relatedness between actor and recipient, B is the reproductive benefit to the recipient, and C is the reproductive cost to the actor. This foundational equation explains why organisms sacrifice personal fitness to help relatives.

What is inclusive fitness?

Inclusive fitness, introduced by W.D. Hamilton in 1964, measures an individual's total contribution to the next generation's gene pool — both through its own reproduction (direct fitness) and through its effects on the reproduction of relatives who share its genes (indirect fitness). The inclusive fitness gain from an altruistic act is -C + rB.

Why are worker bees sterile?

In haplodiploid species like honeybees, sisters share 75% of their genes (r=0.75) because they receive identical haploid genomes from their father. A female worker who helps her mother produce more sisters passes on more of her genes than she would by reproducing directly. This asymmetry in relatedness is thought to have facilitated the repeated evolution of eusociality in Hymenoptera.

What is the coefficient of relatedness?

The coefficient of relatedness (r) is the probability that two individuals share a gene identical by descent. For full siblings in diploid organisms r=0.5, parent-offspring r=0.5, grandparent-grandchild r=0.25, first cousins r=0.125, and identical twins r=1.0.

Sources

Embed

<iframe src="https://homo-deus.com/lab/ethology/kin-selection/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub