How to outsmart the prisoner’s dilemma