SMS: The dynamics of ancient empires