Game Theory is a topic in competitive programming that involves a certain type of problem, where there are some players who play a game based on given rules and the task is often to find the winner or the winning moves. Game Theory is often asked in short contests with a mixture of other topics like range querying or greedy or dynamic programming.
Objectives Game Theory for Competitive Programming:
- Here we will focus on two-player games that do not contain random elements.
- Our goal is to find a strategy we can follow to win the game no matter what the opponent does if such a strategy exists.
- Game theory or combinatorics game theory in which we have perfect information (that is no randomization like a coin toss) such as game rules, player’s turn, minimum and maximum involved in the problem statements, and some conditions and constraints.
- There will be three possible cases/ state win, loss or tie.
- A terminal condition is well-defined/ specified clearly.
E.g. player who picks the last coin will win the game, or a player who picks the second last time coin will win the game or something like that. - It is assumed that the game will end at some point after a fixed number of moves. Unlike chess, where you can have an unlimited number of moves possible especially when you are left with the only king, but if you add an extra constraint that says “game should be ended within ‘n’ numbers of moves”, that will be a terminal condition. This is the kind of assumption a game theory is looking for.
- It turns out that there is a general strategy for such games, and we can analyze the games using the nim theory.
- Initially, we will analyze simple games where players remove sticks from heaps, and after this, we will generalize the strategy used in those games to other games.
Practice Problems on Game Theory:
Article Tags :
Recommended Articles