Friendship baffled Darwin so deeply he feared it could unravel his entire theory of natural selection. The answer arrived in 1980 not from biology but from a 4-line computer program called Tit for Tat — which showed that cooperation across repeated interactions is the single most evolutionarily optimal strategy.