Thanks for the quick response, yes that’s a typo. The outcome is only the same here because it uses a fake objective function (prisoner’s dilemma). For the fake one, differentiating through the opponent shouldn’t do anything anyway. The true objective is an iterated prisoner’s dilemma. I can share the whole code if that helps.