You learned Game Theory DP for two-player games with optimal play.
A state is winning if any move leads to a losing state for the opponent. A state is losing if all moves lead to winning states.
For score games, track the score difference. The recurrence subtracts the opponent's best result because their gain is your loss.
Interval games (pick from ends) use . Games with extra rules add parameters. Games with used elements use bitmasks. When a problem says "both players play optimally," think minimax. Model the game state, define what winning means, and build the DP from base cases.