In interacting with your ingroup, the proper game theory construct is the indefinitely iterated prisoner's dilemma. You should be nice most of the time, and forgive first trespasses. Tit-For-Two Tats is the killer strategy.
In interacting with folks you are not likely to interact with again (outgroup/everyone else), the proper game theory construct is the single-play prisoner's dilemma, which also has a clean solution: defect. Given no future interaction, and no reputational concerns, defecting is the only reasonable play.
It is also true that the ingroup interaction is better than the outgroup interaction. And so, to whatever extent you can transform your interactions into ingroup interactions (expectation of repetition), this is a massive positive.
I'd suggest that Deirdre McCloskey's work is moving in this direction...suggesting that the transformation of outgroups to ingroup-rules interactions is responsible for the growth of the modern age (via trade).