Foundations of gregariousness