Game playing can be studied to understand problems involving adversarial agents. Games define large search spaces that require minimal initial structure to study. Typical perfect games have two players who alternate moves in a zero-sum game with complete information and no chance elements. To play such a game, one considers all legal moves and evaluates the resulting positions to determine the best move. Minimax search evaluates positions and uses the minimax rule to select the move that maximizes the guaranteed payoff. Alpha-beta pruning improves minimax search by avoiding evaluating unpromising moves.