If the goal of life is to pass on one’s genes, why are some animals willing to take a hit for the good of the group?
William D. Hamilton answered this question by imagining a population in which some of its members have a gene that codes for green beards. In this population, when a person with a green beard helps another green beard, they ensure the continuation of the green-beard gene. The individual may not act in his own best interest, but he acts in the best interest of his genome. (If your actions save ten people, each of whom shares 10 percent of your unique genes, you’ve balanced your own life.)
The brain of an ant is one of the most marvellous atoms of matter in the world, perhaps more so than the brain of a man.
—Charles Darwin
We see this phenomenon in brewer’s yeast. At the end of fermentation, the yeasty little buggers have created enough alcohol to make their surroundings toxic. And so they clump together in impenetrable balls, sacrificing the yeast at the ball’s outer edge as a shield against the poison. By their sacrifice, the outer yeast ensure the survival of the genetically similar inner yeast.
In another (more violent) example, fire ant queens of genes bb, Bb, or BB have different smells. Queens who are bb die off naturally. Fire ant workers who are Bb kill off queens who are BB, leaving only Bb queens to reproduce, thereby ensuring the continuation of their own Bb worker genome.