Negamax is a variant of the minimax search algorithm for two-player zero-sum games that relies on the game's zero-sum property to simplify how a game tree is evaluated. Instead of writing separate maximizing and minimizing logic for each player the way plain minimax does, negamax uses the identity that the minimum of two values equals the negation of the maximum of their negations, so a single procedure can evaluate a position from whichever player's turn it is by having that player look for the move that maximizes the negation of the value the move leads to. This lets an implementation use identical code at every level of the search instead of alternating between two different branches, and negamax operates over the same underlying game tree as minimax, so it combines naturally with optimizations such as alpha-beta pruning and transposition tables that most adversarial game-playing programs also rely on.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.