We investigate how group boundaries, and the economic environment surrounding groups, affect altruistic cooperation and … harm those who defect, encouraging a norm of cooperation towards the group. Adding competition between groups causes even … stronger in-group cooperation, but also a qualitative change in punishment: punishment becomes antisocial, harming cooperative …