The Population Dynamics of Conflict and Cooperation