Lesson 17 — Helping relatives when cooperation can spread

BIO 202, Spring 2026, draft v1. Hamilton's rule: r·b > c. The first lesson where the right unit of selection isn't always the individual.

What you'll do

Set up a selfish population. Add an altruism allele. Find the r·b = c boundary. Apply to haplodiploid bees, where r = 0.75 between sisters predicts worker sterility.

Hamilton's rule. Kin selection happens when r×b > c. r is relatedness. b is the benefit to the recipient. c is the cost to the giver. A big benefit to a distant relative can be okay. A small benefit to a close relative can be okay. Random stranger needs a kidney — most won't give. Family member — many will.— 461_lec22_05

A — The null — what happens without the rule

Drop an altruism allele into a population of strangers. r is effectively zero. Stages B–D add Hamilton's machinery; this stage is what the trajectories look like before any of it switches on.

Locked — confirm your name above to begin.

Scenario

An altruism allele is introduced at frequency 0.1 in a population where no one is related to anyone else (r = 0). The allele pays the cost c and gets nothing back from a random partner. With no kin structure, there is nothing for Hamilton's rule to bite on. Each replicate is one possible future.

Five replicate trajectories — pure drift, no Hamilton math

N: 500  |  gens: 100  |  replicates shown: 5  |  mean ending freq:

Prediction

  1. Q1. In a population with no kin structure and no altruism, an "altruism" allele introduced at frequency 0.1 will:
Try at least 3 seeds. 0/3 seeds

Controls

42

R code — neutral baseline

set.seed(42)N <- 500; gens <- 100; p <- 0.1for (g in 1:gens) p <- rbinom(1,2*N,p)/(2*N)

B — Add altruism — sliders for r, b, c

Altruist allele costs c to the bearer; provides benefit b to a relative with relatedness r. Watch frequency trajectories.

Complete Stage A.

Scenario

Pairs of individuals interact. With probability r, each pair shares the altruism allele (they're related). The altruist pays c to give benefit b to its partner. Track allele frequency over generations.

Altruist frequency over generations

r: 0.50  |  b: 0.30  |  c: 0.10  |  r·b − c:  |  altruist freq at gen 200:

Prediction

  1. Q1. With r = 0.5 (siblings), b = 0.3, c = 0.1, the altruist allele will:
Try at least 5 (r, b, c) combos straddling the boundary. 0/5 combos

Controls

0.50
0.30
0.10
42

R code — altruism dynamics

set.seed(42)N <- 500; r <- 0.5; b <- 0.3; cc <- 0.1; p <- 0.2; gens <- 200# Mean fitness of altruist: 1 - c + r*b (recipient has altruist allele w.p. r)# Mean fitness of selfish: 1 + p*r*b (gets benefit from altruistic relatives at rate p*r... simplified)for (g in 1:gens) {  w_alt <- 1 - cc + r * b  w_sel <- 1  p_new <- p * w_alt / (p * w_alt + (1-p) * w_sel)  p <- rbinom(1,2*N,p_new)/(2*N)}

C — The r·b = c boundary

Map the (b, c) phase plane at fixed r. Above the r·b = c line, altruism spreads. Below, it doesn't. Move the r slider; watch the line tilt.

Complete Stage B.

Scenario

The line r·b = c divides the (b, c) plane into two regions. With r = 0.5, the line is c = 0.5·b: altruism spreads only when the benefit is at least twice the cost. With r = 1 (clones), any net benefit spreads. With r = 0 (strangers), nothing spreads.

(b, c) phase plane with r·b = c boundary

r: 0.50  |  your point (b, c): ()  |  spreads?

Prediction

  1. Q1. As r increases (more relatedness), the region of (b, c) space where altruism spreads:
Try at least 3 r values. 0/3 r values

Controls

0.50
0.60
0.20

R code — phase plane

r <- 0.5; b <- 0.6; cc <- 0.2r*b > cc   # Hamilton's rule satisfied?

D — Same rule, three biologies — who should you help?

Hamilton's rule (r·b > c) doesn't care what kind of organism you are. The rule is invariant; the relatedness values are not. Compare three inheritance systems and watch who the rule says to help.

Complete Stage C.

Scenario

Same Hamilton's rule for all three. Different relatedness values for each because of how they inherit DNA:

  • Diploid mammal (mouse, human): two parents each contribute half. r to sister, daughter, brother all = 0.5.
  • Haplodiploid bee (female worker): female is diploid, brothers are haploid from unfertilized eggs. r to full sister = 0.75 (mom's recombined 0.5 + dad's clonal 1.0, halved). r to own daughter = 0.5. r to brother = 0.25.
  • Clonal bacterium (or a Wolbachia-style parthenogen): every offspring of every cell in your colony is your clone. r = 1 to all "kin".

For each, ask: with a fixed (b, c), which kin is it most worth helping?

r to each kin, by inheritance system

organism: all three  |  highest r:

Prediction

  1. Q1. A female haplodiploid worker (e.g. a honey bee) compares helping her mother make more sisters vs. raising her own daughters. Hamilton's rule favors:
  2. Q2. A clonal bacterium considers an act that saves a neighboring cell at some cost to itself. Why does Hamilton's rule trivially favor helping in this case?
Toggle through all three organism views. 0/3 toggles

Controls

R code — relatedness across systems

# Three inheritance systems; one rule.diploid <- c(sister=0.5, daughter=0.5, brother=0.5)haplo   <- c(sister=0.75, daughter=0.5, brother=0.25)clonal  <- c(sister=1, daughter=1, brother=1)# Hamilton's rule: helping spreads if r * b > c, regardless of which row you're in.