Adaptive evolution of social traits: Origin, trajectories, and correlations of altruism and mobility