> For the complete documentation index, see [llms.txt](https://liuzhenglaichn.gitbook.io/algorithm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liuzhenglaichn.gitbook.io/algorithm/minmax.md).

# Minmax

Minimax is a kind of backtracking algorithm that is used in decision making and game theory to find the optimal move for a player, assuming that your opponent also plays optimally. It is widely used in two player turn-based games such as Tic-Tac-Toe, Backgammon, Mancala, Chess, etc.

## Problems

* [1406. Stone Game III (Hard)](https://leetcode.com/problems/stone-game-iii/)

## Reference

* <https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/>
