Game theory: Let's start with a very simple game: Tic Tac Toe
An area of mathematics science is called game theory.
There are rules, options to act, win- and lose situations.
The most simple analysis about a game is Tic-Tac-Toe. There
are two players, 3*3 fields and every player knows everything
about the advance of the game.
If player A has 2 signs in one raw, You know exactly where
player B will place his next sign. Game theory makes
in this case a list of possible moves from side B, and for
every possible move from side B a list of possible moves from side A and so on.
All but one move are creating a lose situation for player B,
so it is logical that he will do the only move not creating a lose situation.