Figure 4: A hypothetical example of migration and selection acting in one generation of the simulation. Both demes undergo “hatching” of new offspring that replace their parents. These offspring may migrate to another deme (with a rate of m) and then reproduce, producing gametes at a rate proportional to their relative fitness. The arrows from the second box represent the probability of leaving offspring; the more arrows, the higher the probability. Derived alleles (in red) are favored in Deme 2, and disfavored in Deme 1, but the strength of selection varies. Individual 2 has much lower fitness in Deme 1 because it carries a derived allele at locus E, which is under strong divergent selection. Individual 4 migrates to Deme 2 and is selected against due to being homozygous for allele 1 at locus D, which is also under strong selection. Individual 5 carries two derived alleles, it is homozygous for D2, and also carries one copy of the derived C2 allele, which has essentially no effect on fitness. When individual 5 migrates to Deme 1, even though the derived allele at locus C is under weak selection, because individual 5 is also homozygous for the derived allele at D it leaves few offspring and the derived C allele is not incorporated into the Deme 1.