The expectiminimax algorithm is a variation of the
minimax
Minimax (sometimes MinMax, MM or saddle point) is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for ''mini''mizing the possible loss for a worst case (''max''imum loss) scenario. When de ...
algorithm, for use in
artificial intelligence systems that play two-player
zero-sum games, such as
backgammon, in which the outcome depends on a combination of the player's skill and
chance elements such as dice rolls. In addition to "min" and "max" nodes of the traditional minimax tree, this variant has "chance" ("
move by nature
In game theory a move by nature is a ''decision'' or ''move'' in an extensive form game made by a player who has no strategic interests in the outcome. The effect is to add a player, 'Nature', whose practical role is to act as a random number gene ...
") nodes, which take the
expected value
In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of a random event occurring.
In
game theory
Game theory is the study of mathematical models of strategic interactions among rational agents. Myerson, Roger B. (1991). ''Game Theory: Analysis of Conflict,'' Harvard University Press, p.&nbs1 Chapter-preview links, ppvii–xi It has appli ...
terms, an expectiminimax tree is the game tree of an
extensive-form game of
perfect
Perfect commonly refers to:
* Perfection, completeness, excellence
* Perfect (grammar), a grammatical category in some languages
Perfect may also refer to:
Film
* Perfect (1985 film), ''Perfect'' (1985 film), a romantic drama
* Perfect (2018 f ...
, but
incomplete information
In economics and game theory, complete information is an economic situation or game in which knowledge about other market participants or players is available to all participants. The utility functions (including risk aversion), payoffs, strategies ...
.
In the traditional
minimax
Minimax (sometimes MinMax, MM or saddle point) is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for ''mini''mizing the possible loss for a worst case (''max''imum loss) scenario. When de ...
method, the levels of the tree alternate from max to min until the depth limit of the tree has been reached. In an expectiminimax tree, the "chance" nodes are interleaved with the max and min nodes. Instead of taking the max or min of the
utility values of their children, chance nodes take a weighted average, with the weight being the probability that child is reached.
The interleaving depends on the game. Each "turn" of the game is evaluated as a "max" node (representing the AI player's turn), a "min" node (representing a potentially-optimal opponent's turn), or a "chance" node (representing a random effect or player).
For example, consider a game in which each round consists of a single die throw, and then decisions made by first the AI player, and then another intelligent opponent. The order of nodes in this game would alternate between "chance", "max" and then "min".
Pseudocode
The expectiminimax algorithm is a variant of the
minimax
Minimax (sometimes MinMax, MM or saddle point) is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for ''mini''mizing the possible loss for a worst case (''max''imum loss) scenario. When de ...
algorithm and was firstly proposed by
Donald Michie in 1966.
Its
pseudocode
In computer science, pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine re ...
is given below.
function expectiminimax(node, depth)
if node is a terminal node or depth = 0
return the heuristic value of node
if the adversary is to play at node
// Return value of minimum-valued child node
let α := +∞
foreach child of node
α := min(α, expectiminimax(child, depth-1))
else if we are to play at node
// Return value of maximum-valued child node
let α := -∞
foreach child of node
α := max(α, expectiminimax(child, depth-1))
else if random event at node
// Return weighted average of all child nodes' values
let α := 0
foreach child of node
α := α + (Probability
hild× expectiminimax(child, depth-1))
return α
Note that for random nodes, there must be a known probability of reaching each child. (For most games of chance, child nodes will be equally-weighted, which means the return value can simply be the average of all child values.)
See also
*
Minimax
Minimax (sometimes MinMax, MM or saddle point) is a decision rule used in artificial intelligence, decision theory, game theory, statistics, and philosophy for ''mini''mizing the possible loss for a worst case (''max''imum loss) scenario. When de ...
*
Alpha–beta pruning
*
Negamax
*
Expected value
In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
References
{{DEFAULTSORT:Expectiminimax Tree
Game theory
Search algorithms
Game artificial intelligence
Trees (data structures)