Researchers tracked thousands of individual ants to determine how they move in vast numbers without stumbling into gridlock.