Minimax
Also known as Minimax search
adversarial game-tree-search
Minimax picks a move in a two-player game by assuming that the opponent always answers with its best move. It searches every line to a fixed depth and scores the positions there with an evaluation function, from the point of view of the side Max. Going back up, Max takes the highest child score and Min the lowest. The side to move belongs to the position, so one side may move several times in a row. Minimax visits every position of the tree, so it serves as a reference; use alpha-beta pruning for the same score at far lower cost.
Pseudocode
algorithm Minimax(p, d)input: position p, depth d in pliesoutput: the minimax score of p, from Max's point of viewif d = 0 or moves(p) = ∅ thenreturn evaluate(p)s ← side-to-move(p) ▷ read from p, so a side may move twice in a rowbest ← nilfor each m in moves(p) dov ← Minimax(play(p, m), d − 1)if best = nil or better(s, v, best) then ▷ ties keep the earlier movebest ← vreturn bestfunction better(s, v, w)if s = Max thenreturn v > wreturn v < wIn the crates
game-tree-searchSearches every line to a fixed depth; the reference the faster searches are tested against. The side to move comes from the position, so one side may move several times in a row.
Lineage
Comes from
Nothing on this site.
Papers
- Zur Theorie der Gesellschaftsspiele J. v. Neumann · 1928· Mathematische Annalen
- Programming a computer for playing chess Claude E. Shannon · 1950· The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science