Kennedy and his team attached tiny radio transmitters to the backs of thousands of wasps along the Panama Canal and tracked their movements.

“The tiny radio backpacks allow us to track in detail altruistic behavior across entire populations minute by minute, over several weeks," says Kennedy. "It’s data like this that—we hope—will allow us to put to the test the theoretical ideas about how animal altruism evolves.”

Inspired by the wasps, Kennedy and his team published a new theoretical study Wednesday in Nature that explores a seemingly simple concept called “altruistic bet-hedging.” It suggests that in times of change and hardship, cooperation and altruism flourish. Individuals that protect their family from the dangerous and changing world are more likely to have their shared genes pass on to future generations. Even if it means they can no longer directly pass on their genes through offspring, some part of them continues on in the lineage of their familial ancestors.

Quantifying Kindness

Altruism has long been a subject for debate in evolutionary biology, going back to Darwin and On the Origin of Species. In the mid-1960s, evolutionary biologist William D. Hamilton posited that evolution can favor genetic success, not necessarily reproductive success on an individual level. He created a formula—dubbed Hamilton’s rule—to try and quantify kindness.

From miniature bees in Australia to birds on African savannas, biologists have recently begun looking at animals in harsh and unpredictable environments for clues as to how altruism evolves.

Kennedy first became interested in unpredictable environments while studying wasps in French Guiana. “Colonies can be destroyed by catastrophes—like the sudden appearance of parasitic flesh fly larvae, which devour the developing wasps," he says. "Thinking about these relentless risks, we wondered how unpredictability could affect social evolution more generally.”

Kennedy thinks there may be another unusual place to observe altruism: our guts. Complex social communities of bacteria live inside us, in fluctuating environments similar to those described in the paper.

“It’s strange links like this that I love about evolutionary biology: one minute you’re sweating it out in a tropical rainforest fending off angry wasp stings, and the next you’re thinking about bacteria in your intestines,” he says.

Kieren Puffett contributed to this report.

March 8, 2018 - Updated to clarify the connection between the study and wasps, and the link between altruism and gut bacteria.