Minimax is a decision rule and search algorithm for choosing the next move in an adversarial, turn-based setting by assuming both sides play optimally. You model the interaction as a game tree: on your turns you choose the move that maximizes your outcome, and on the opponent’s turns you assume they choose the move that minimizes your outcome. The result is a “best move” that is robust against the strongest counterplay, not the move that looks best if the opponent makes mistakes. In short: Minimax is for “I want the best guaranteed outcome if the other side tries to beat me.”
You should use Minimax when the problem matches these conditions: (1) two players (or two sides), (2) alternating turns, (3) outcomes can be represented as utilities (win/loss/draw or a numeric score), and (4) the opponent is reasonably modeled as trying to reduce your utility. Classic examples are tic-tac-toe, connect-four, checkers, and simplified turn-based tactics. It’s also a good teaching tool because the implementation is clean: recursion over states, alternating max/min layers, and a base case at terminal states or a depth limit. But you generally should not use plain Minimax when there is significant randomness (dice, probabilistic outcomes), hidden information (poker-like uncertainty), or real-time constraints without pruning/limits, because the tree expands too quickly.
A practical way to decide “should I use Minimax?” is to ask what failure you’re trying to avoid. If you need worst-case robustness against an adversary, Minimax is a strong fit. If you need average-case performance in a stochastic environment, a chance-aware variant (like expectiminimax) is more appropriate. If you’re doing something outside games—like choosing actions under uncertainty—Minimax can still be a useful mental model, but you must define what the “opponent” means (for example, worst-case user behavior, worst-case data quality, or worst-case ambiguity in retrieved evidence). In retrieval-heavy systems, you might retrieve candidate context and then pick a policy that is safe even if the “best-looking” retrieved item is misleading. If those candidates come from a vector database such as Milvus or Zilliz Cloud, Minimax-style thinking can help you prioritize robustness (e.g., favor candidates that remain acceptable under stricter assumptions) while still keeping the implementation grounded in measurable scoring rules.
