Study examines how social roles emerge and remain stable, how the prefrontal cortex represents leading, following, and a partner's position, and what happens to teamwork when that region is switched off. A companion AI model inferred the values guiding each animal's choices.