AI Glossary / Graphs and symbolic AI / Intermediate

Minimax

Definition

Minimax is a decision principle for choosing actions against an adversary who can respond in the least favorable way. In game-playing AI, it evaluates a game tree by maximizing the agent's utility on its turns and minimizing that same utility on the opponent's turns. The preferred action has the best worst-case continuation.

What it means

The central question is not simply which move could produce the largest reward. It is which move remains strongest when the opponent makes effective choices. An attractive opportunity may be a trap if another player can force a poor result after the agent takes it.

The standard introductory setting is a deterministic, two-player, zero-sum game with perfect information and a finite search tree. Both players can see the relevant state, and their preferences directly oppose one another. Other settings require additional modeling. The word minimax also appears in statistics and robust optimization; this entry focuses on adversarial game reasoning.

How it works

Represent possible actions as branches from game states. Assign terminal outcomes utilities from one consistent player's perspective. At a state controlled by that player, keep the largest child value. At an opponent-controlled state, keep the smallest. Repeating this backup calculation from the leaves to the root determines the root value and an action attaining it.

At maximizing turns, the player seeks the best available continuation. At minimizing turns, the opponent selects the worst continuation for that player. Keeping a single utility perspective avoids accidentally rewarding the opponent's success.

Large games may require stopping before terminal outcomes and estimating unfinished positions. That produces a decision for the truncated model, not a proof of optimal play in the complete game. Alpha-beta pruning can avoid inspecting irrelevant branches while preserving the minimax result for the same search tree.

Three practical examples

  • Board-game agents: compare legal moves while accounting for the opponent's strongest replies.
  • Adversarial planning exercises: examine a small deterministic scenario where a defender acts and an opponent chooses a response.
  • Teaching simulations: demonstrate why a high potential reward may be less attractive than a smaller reward that can be secured.

Think of it this way

Think of selecting a route while another player can close one of the available exits after seeing your choice. A sensible route must remain acceptable after that response, rather than looking good only when every exit stays open.

The analogy assumes the other player really has the stated choices and opposing objective. Ordinary traffic delays are not automatically an intelligent adversary. Replacing probabilities with worst-case choices can change the decision substantially.

Worked example

At the root, MAX can choose Harbor, Bridge, or Tunnel. Each leads to a MIN turn, after which the game ends. Harbor offers terminal utilities 8 and 3. Bridge offers 5 and 4. Tunnel offers 10 and 1. Every number is measured for MAX.

MIN chooses 3 after Harbor, 4 after Bridge, and 1 after Tunnel. MAX therefore compares the backed-up values 3, 4, and 1 and chooses Bridge, securing value 4 under the model. Tunnel's possible payoff of 10 does not make it the minimax choice because MIN can instead select 1.

Now suppose the responses were genuinely random, with the two outcomes equally likely for each route. Their expected utilities would be 5.5, 4.5, and 5.5. That is a different decision model and can favor different actions. The calculations show why assumptions about the responding process matter.

If an imperfect opponent chooses the favorable Bridge response, MAX receives 5 rather than 4. The minimax value is not a prediction that the observed outcome must equal 4 regardless of opponent behavior. It is the value under the specified optimal opposing play, with the corresponding worst-case protection when MAX follows its strategy.

Illustrative case study

Fictional case: a puzzle studio develops an opponent for a transparent turn-based game. Its first agent selects moves by the highest reachable reward and repeatedly falls into traps. The developers add alternating minimum and maximum backups so that the agent considers the rival's replies.

The revised prototype also displays the strongest opposing response as an explanation. For large positions, the display labels its score as an estimate because the search stops early. The fictional case illustrates a modeling correction; it does not claim measured playing strength or a particular product result.

Common misconceptions and mistakes

Minimax does not assume that all unfavorable events happen simultaneously. It considers the legal responses and turn structure of the modeled game. Allowing impossible responses makes the model unnecessarily pessimistic.

The method is not the same as maximizing an average or minimizing regret. Those criteria answer different questions. Its name can also cause confusion: when utility is expressed as a reward, the acting player maximizes the minimum attainable value; equivalent loss formulations can reverse the signs.

A correct backup calculation cannot repair wrong rules, missing actions, or misleading terminal utilities. Full-depth guarantees also do not automatically transfer to heuristic depth-limited search.

Business use

Minimax can support training games, controlled adversarial simulations, and clearly specified competitive planning models. Before applying it, identify who chooses each action, what they observe, and whether their objectives truly oppose one another.

For business decisions involving cooperation, uncertain demand, or several independent stakeholders, a two-player zero-sum model may be too restrictive. Use it as an explicit scenario model and compare its recommendations with alternatives suited to the actual setting.

People also ask

Does minimax always win?

No. Some positions are losing even with optimal play; minimax can identify the best available result without turning a loss into a win.

Is the opponent required to behave optimally in practice?

The calculation plans against optimal opposition. A weaker opponent may allow a better result.

Is alpha-beta a different objective?

No. It is a way to compute the same minimax result more efficiently for the same tree.

Check your understanding

Move A permits outcomes 9 or 2, while move B permits 6 or 4. If MIN chooses the outcome, which move does MAX prefer?

Answer: B, because its worst available outcome is 4 rather than 2.

Related terms

  • Adversarial search
  • Minimax decision
  • Minimax value
  • Game tree
  • Alpha-beta pruning
  • Zero-sum games
  • Evaluation function
  • expectimax
  • zero-sum game

Learn next

draw a three-level game tree and back up the values by hand. Then compare minimax with expectimax to see how replacing adversarial choices with probabilities changes the result.

  • Game tree

More in Graphs and symbolic AI

  • Metropolis-Hastings - Metropolis - Hastings is a Markov chain Monte Carlo algorithm that generates a sequence of samples using proposals followed by acceptance or rejection.
  • Min-conflicts - Min-conflicts is a local-search method for constraint satisfaction that repeatedly repairs a complete assignment.
  • Minimal mappings - Minimal mappings are compact, nonredundant sets of semantic relationships between two lightweight ontologies from which the remaining relationships can be...
  • Minimax search - Minimax search is a game-tree search procedure that evaluates possible continuations by alternating maximizing and minimizing choices.
  • Minimum description length - Minimum description length, or MDL, is a principle for choosing models by how compactly they describe observed data.
  • Minimum-remaining-values - Minimum-remaining-values, usually abbreviated MRV, is a variable-selection heuristic for constraint satisfaction.

Sources

University of California, Berkeley, CS 188, “Minimax,” explains alternating value backups, pruning, and heuristic cutoffs: https://inst.eecs.berkeley.edu/~cs188/textbook/games/minimax.html

The route calculations and fictional studio are original illustrations. Scope is classical game-tree minimax; other uses of the term require their own assumptions.

Previous: Minimal recursion semantics Next: Minimax approximation algorithm

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer