SMS: Theory of collective behavior