in game theory, a game can be formally defined with the following elements:
- , the initial state, which specifies how the game is set up at the start.
- : the player whose turn it is to move in state .
- : the set of legal movies in state .
- : the transition model, which defines the state resulting from taking action in state .
- : a terminal test, which is true when the game is over and false otherwise. states where the game has ended are called terminal states.
- : a utility function (also called an objective function or payoff function), which defines the final numeric value to player when the game ends in terminal state . in chess, the outcome is a win, loss, or draw with values 1, 0 or 1/2. some games have a wider range of possible outcomes–for example, the payoffs in backgammon range from 0 to 192.