Minimax is a recursive decision rule used to identify the optimal move for a player by assuming the opponent will also play optimally to minimize the first player's score. It operates on a game tree, where nodes represent game states and branches represent moves. The algorithm assigns a value to each terminal state (win, loss, draw) and then propagates these values upward: the maximizing player chooses the move leading to the highest-valued child node, while the minimizing player chooses the move leading to the lowest-valued child. This creates a worst-case scenario analysis, guaranteeing the best possible outcome against a perfect adversary.
