We repurpose an agent-based model of ethnocentrism to show how violence affects people's willingness to cooperate with members of other groups. We account for extra benefits that arise from interacting with a member of the same culture (‘cultural boosts') and for mutual gains from cooperative...