>>> Study game theory
And you start seeing mini prisoners dilemmas in all interactions. Maybe dated, but still loads of fun: Game of Life John Conway's Winning Ways For Your Mathematical Plays
https://annarchive.com/files/Winning%20Ways%20for%20Your%20M...
I'd add probability theory to the mix. Computer Age Statistical Inference is a modern classic