<s>
Minmax	B-Algorithm
(	O
sometimes	O
Minimax	B-Algorithm
,	O
MM	O
or	O
saddle	O
point	O
)	O
is	O
a	O
decision	O
rule	O
used	O
in	O
artificial	B-Application
intelligence	I-Application
,	O
decision	O
theory	O
,	O
game	O
theory	O
,	O
statistics	O
,	O
and	O
philosophy	O
for	O
minimizing	O
the	O
possible	O
loss	O
for	O
a	O
worst	O
case	O
(	O
maximum	O
loss	O
)	O
scenario	O
.	O
</s>
<s>
The	O
minimax	B-Algorithm
value	O
of	O
a	O
player	O
is	O
the	O
smallest	O
value	O
that	O
the	O
other	O
players	O
can	O
force	O
the	O
player	O
to	O
receive	O
,	O
without	O
knowing	O
the	O
player	O
's	O
actions	O
;	O
equivalently	O
,	O
it	O
is	O
the	O
largest	O
value	O
the	O
player	O
can	O
be	O
sure	O
to	O
get	O
when	O
they	O
know	O
the	O
actions	O
of	O
the	O
other	O
players	O
.	O
</s>
<s>
For	O
every	O
player	O
,	O
the	O
maximin	O
is	O
at	O
most	O
the	O
minimax	B-Algorithm
:	O
</s>
<s>
Intuitively	O
,	O
in	O
maximin	O
the	O
maximization	O
comes	O
after	O
the	O
minimization	O
,	O
so	O
player	O
tries	O
to	O
maximize	O
their	O
value	O
before	O
knowing	O
what	O
the	O
others	O
will	O
do	O
;	O
in	O
minimax	B-Algorithm
the	O
maximization	O
comes	O
before	O
the	O
minimization	O
,	O
so	O
player	O
is	O
in	O
a	O
much	O
better	O
position	O
–	O
they	O
maximize	O
their	O
value	O
knowing	O
what	O
the	O
others	O
did	O
.	O
</s>
<s>
Although	O
it	O
is	O
always	O
the	O
case	O
that	O
and	O
the	O
payoff	O
vector	O
resulting	O
from	O
both	O
players	O
playing	O
their	O
minimax	B-Algorithm
strategies	I-Algorithm
,	O
in	O
the	O
case	O
of	O
or	O
in	O
the	O
case	O
of	O
cannot	O
similarly	O
be	O
ranked	O
against	O
the	O
payoff	O
vector	O
resulting	O
from	O
both	O
players	O
playing	O
their	O
maximin	O
strategy	O
.	O
</s>
<s>
In	O
two-player	O
zero-sum	O
games	O
,	O
the	O
minimax	B-Algorithm
solution	I-Algorithm
is	O
the	O
same	O
as	O
the	O
Nash	O
equilibrium	O
.	O
</s>
<s>
In	O
the	O
context	O
of	O
zero-sum	O
games	O
,	O
the	O
minimax	B-Algorithm
theorem	O
is	O
equivalent	O
to	O
:	O
</s>
<s>
The	O
name	O
minimax	B-Algorithm
arises	O
because	O
each	O
player	O
minimizes	O
the	O
maximum	O
payoff	O
possible	O
for	O
the	O
other	O
–	O
since	O
the	O
game	O
is	O
zero-sum	O
,	O
they	O
also	O
minimize	O
their	O
own	O
maximum	O
loss	O
(	O
i.e.	O
</s>
<s>
Then	O
,	O
the	O
maximin	O
choice	O
for	O
A	B-Application
is	I-Application
A2	O
since	O
the	O
worst	O
possible	O
result	O
is	O
then	O
having	O
to	O
pay1	O
,	O
while	O
the	O
simple	O
maximin	O
choice	O
for	O
B	O
is	O
B2	O
since	O
the	O
worst	O
possible	O
result	O
is	O
then	O
no	O
payment	O
.	O
</s>
<s>
These	O
mixed	O
minimax	B-Algorithm
strategies	I-Algorithm
cannot	O
be	O
improved	O
and	O
are	O
now	O
stable	O
.	O
</s>
<s>
Frequently	O
,	O
in	O
game	O
theory	O
,	O
maximin	O
is	O
distinct	O
from	O
minimax	B-Algorithm
.	O
</s>
<s>
Minimax	B-Algorithm
is	O
used	O
in	O
zero-sum	O
games	O
to	O
denote	O
minimizing	O
the	O
opponent	O
's	O
maximum	O
payoff	O
.	O
</s>
<s>
The	O
minimax	B-Algorithm
values	O
are	O
very	O
important	O
in	O
the	O
theory	O
of	O
repeated	O
games	O
.	O
</s>
<s>
One	O
of	O
the	O
central	O
theorems	O
in	O
this	O
theory	O
,	O
the	O
folk	O
theorem	O
,	O
relies	O
on	O
the	O
minimax	B-Algorithm
values	O
.	O
</s>
<s>
In	O
combinatorial	O
game	O
theory	O
,	O
there	O
is	O
a	O
minimax	B-Algorithm
algorithm	I-Algorithm
for	O
game	O
solutions	O
.	O
</s>
<s>
A	O
simple	O
version	O
of	O
the	O
minimax	B-Algorithm
algorithm	I-Algorithm
,	O
stated	O
below	O
,	O
deals	O
with	O
games	O
such	O
as	O
tic-tac-toe	O
,	O
where	O
each	O
player	O
can	O
win	O
,	O
lose	O
,	O
or	O
draw	O
.	O
</s>
<s>
The	O
minimax	B-Algorithm
algorithm	I-Algorithm
helps	O
find	O
the	O
best	O
move	O
,	O
by	O
working	O
backwards	O
from	O
the	O
end	O
of	O
the	O
game	O
.	O
</s>
<s>
A	O
minimax	B-Algorithm
algorithm	I-Algorithm
is	O
a	O
recursive	O
algorithm	O
for	O
choosing	O
the	O
next	O
move	O
in	O
an	O
n-player	O
game	O
,	O
usually	O
a	O
two-player	O
game	O
.	O
</s>
<s>
This	O
value	O
is	O
computed	O
by	O
means	O
of	O
a	O
position	B-General_Concept
evaluation	I-General_Concept
function	I-General_Concept
and	O
it	O
indicates	O
how	O
good	O
it	O
would	O
be	O
for	O
a	O
player	O
to	O
reach	O
that	O
position	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
A	B-Application
is	I-Application
called	O
the	O
maximizing	O
player	O
and	O
B	O
is	O
called	O
the	O
minimizing	O
player	O
,	O
hence	O
the	O
name	O
minimax	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Often	O
this	O
is	O
generally	O
only	O
possible	O
at	O
the	O
very	O
end	O
of	O
complicated	O
games	O
such	O
as	O
chess	B-Application
or	O
go	O
,	O
since	O
it	O
is	O
not	O
computationally	O
feasible	O
to	O
look	O
ahead	O
as	O
far	O
as	O
the	O
completion	O
of	O
the	O
game	O
,	O
except	O
towards	O
the	O
end	O
,	O
and	O
instead	O
,	O
positions	O
are	O
given	O
finite	O
values	O
as	O
estimates	O
of	O
the	O
degree	O
of	O
belief	O
that	O
they	O
will	O
lead	O
to	O
a	O
win	O
for	O
one	O
player	O
or	O
another	O
.	O
</s>
<s>
This	O
can	O
be	O
extended	O
if	O
we	O
can	O
supply	O
a	O
heuristic	B-General_Concept
evaluation	I-General_Concept
function	I-General_Concept
which	O
gives	O
values	O
to	O
non-final	O
game	O
states	O
without	O
considering	O
all	O
possible	O
following	O
complete	O
sequences	O
.	O
</s>
<s>
We	O
can	O
then	O
limit	O
the	O
minimax	B-Algorithm
algorithm	I-Algorithm
to	O
look	O
only	O
at	O
a	O
certain	O
number	O
of	O
moves	O
ahead	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
chess	B-Application
computer	I-Application
Deep	B-General_Concept
Blue	I-General_Concept
(	O
the	O
first	O
one	O
to	O
beat	O
a	O
reigning	O
world	O
champion	O
,	O
Garry	O
Kasparov	O
at	O
that	O
time	O
)	O
looked	O
ahead	O
at	O
least	O
12plies	O
,	O
then	O
applied	O
a	O
heuristic	B-General_Concept
evaluation	I-General_Concept
function	I-General_Concept
.	O
</s>
<s>
The	O
effective	O
branching	B-Data_Structure
factor	I-Data_Structure
of	O
the	O
tree	O
is	O
the	O
average	O
number	O
of	O
children	B-Data_Structure
of	O
each	O
node	B-Data_Structure
(	O
i.e.	O
,	O
the	O
average	O
number	O
of	O
legal	O
moves	O
in	O
a	O
position	O
)	O
.	O
</s>
<s>
The	O
number	O
of	O
nodes	O
to	O
be	O
explored	O
for	O
the	O
analysis	O
of	O
a	O
game	O
is	O
therefore	O
approximately	O
the	O
branching	B-Data_Structure
factor	I-Data_Structure
raised	O
to	O
the	O
power	O
of	O
the	O
number	O
of	O
plies	O
.	O
</s>
<s>
It	O
is	O
therefore	O
impractical	O
to	O
completely	O
analyze	O
games	O
such	O
as	O
chess	B-Application
using	O
the	O
minimax	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
The	O
performance	O
of	O
the	O
naïve	O
minimax	B-Algorithm
algorithm	I-Algorithm
may	O
be	O
improved	O
dramatically	O
,	O
without	O
affecting	O
the	O
result	O
,	O
by	O
the	O
use	O
of	O
alpha	B-Algorithm
–	I-Algorithm
beta	I-Algorithm
pruning	I-Algorithm
.	O
</s>
<s>
Other	O
heuristic	B-Algorithm
pruning	O
methods	O
can	O
also	O
be	O
used	O
,	O
but	O
not	O
all	O
of	O
them	O
are	O
guaranteed	O
to	O
give	O
the	O
same	O
result	O
as	O
the	O
unpruned	O
search	O
.	O
</s>
<s>
A	O
naïve	O
minimax	B-Algorithm
algorithm	I-Algorithm
may	O
be	O
trivially	O
modified	O
to	O
additionally	O
return	O
an	O
entire	O
Principal	O
Variation	O
along	O
with	O
a	O
minimax	B-Algorithm
score	O
.	O
</s>
<s>
The	O
pseudocode	B-Language
for	O
the	O
depth-limited	O
minimax	B-Algorithm
algorithm	I-Algorithm
is	O
given	O
below	O
.	O
</s>
<s>
The	O
minimax	B-Algorithm
function	O
returns	O
a	O
heuristic	B-Algorithm
value	O
for	O
leaf	B-Application
nodes	I-Application
(	O
terminal	O
nodes	O
and	O
nodes	O
at	O
the	O
maximum	O
search	O
depth	O
)	O
.	O
</s>
<s>
Non-leaf	O
nodes	O
inherit	O
their	O
value	O
from	O
a	O
descendant	O
leaf	B-Data_Structure
node	I-Data_Structure
.	O
</s>
<s>
The	O
heuristic	B-Algorithm
value	O
is	O
a	O
score	O
measuring	O
the	O
favorability	O
of	O
the	O
node	B-Data_Structure
for	O
the	O
maximizing	O
player	O
.	O
</s>
<s>
The	O
heuristic	B-Algorithm
value	O
for	O
terminal	O
(	O
game	O
ending	O
)	O
leaf	B-Application
nodes	I-Application
are	O
scores	O
corresponding	O
to	O
win	O
,	O
loss	O
,	O
or	O
draw	O
,	O
for	O
the	O
maximizing	O
player	O
.	O
</s>
<s>
For	O
non	O
terminal	O
leaf	B-Application
nodes	I-Application
at	O
the	O
maximum	O
search	O
depth	O
,	O
an	O
evaluation	B-General_Concept
function	I-General_Concept
estimates	O
a	O
heuristic	B-Algorithm
value	O
for	O
the	O
node	B-Data_Structure
.	O
</s>
<s>
The	O
quality	O
of	O
this	O
estimate	O
and	O
the	O
search	O
depth	O
determine	O
the	O
quality	O
and	O
accuracy	O
of	O
the	O
final	O
minimax	B-Algorithm
result	O
.	O
</s>
<s>
Minimax	B-Algorithm
treats	O
the	O
two	O
players	O
(	O
the	O
maximizing	O
player	O
and	O
the	O
minimizing	O
player	O
)	O
separately	O
in	O
its	O
code	O
.	O
</s>
<s>
Based	O
on	O
the	O
observation	O
that	O
minimax	B-Algorithm
may	O
often	O
be	O
simplified	O
into	O
the	O
negamax	B-Algorithm
algorithm	O
.	O
</s>
<s>
The	O
algorithm	O
evaluates	O
each	O
leaf	B-Data_Structure
node	I-Data_Structure
using	O
a	O
heuristic	B-General_Concept
evaluation	I-General_Concept
function	I-General_Concept
,	O
obtaining	O
the	O
values	O
shown	O
.	O
</s>
<s>
At	O
level3	O
,	O
the	O
algorithm	O
will	O
choose	O
,	O
for	O
each	O
node	B-Data_Structure
,	O
the	O
smallest	O
of	O
the	O
child	B-Data_Structure
node	I-Data_Structure
values	O
,	O
and	O
assign	O
it	O
to	O
that	O
same	O
node	B-Data_Structure
(	O
e.g.	O
</s>
<s>
the	O
node	B-Data_Structure
on	O
the	O
left	O
will	O
choose	O
the	O
minimum	O
between	O
"	O
10	O
"	O
and	O
"	O
+∞	O
"	O
,	O
therefore	O
assigning	O
the	O
value	O
"	O
10	O
"	O
to	O
itself	O
)	O
.	O
</s>
<s>
The	O
next	O
step	O
,	O
in	O
level2	O
,	O
consists	O
of	O
choosing	O
for	O
each	O
node	B-Data_Structure
the	O
largest	O
of	O
the	O
child	B-Data_Structure
node	I-Data_Structure
values	O
.	O
</s>
<s>
Once	O
again	O
,	O
the	O
values	O
are	O
assigned	O
to	O
each	O
parent	B-Application
node	I-Application
.	O
</s>
<s>
The	O
algorithm	O
continues	O
evaluating	O
the	O
maximum	O
and	O
minimum	O
values	O
of	O
the	O
child	B-Data_Structure
nodes	I-Data_Structure
alternately	O
until	O
it	O
reaches	O
the	O
root	B-Application
node	I-Application
,	O
where	O
it	O
chooses	O
the	O
move	O
with	O
the	O
largest	O
value	O
(	O
represented	O
in	O
the	O
figure	O
with	O
a	O
blue	O
arrow	O
)	O
.	O
</s>
<s>
Minimax	B-Algorithm
theory	O
has	O
been	O
extended	O
to	O
decisions	O
where	O
there	O
is	O
no	O
other	O
player	O
,	O
but	O
where	O
the	O
consequences	O
of	O
decisions	O
depend	O
on	O
unknown	O
facts	O
.	O
</s>
<s>
In	O
addition	O
,	O
expectiminimax	B-Algorithm
trees	I-Algorithm
have	O
been	O
developed	O
,	O
for	O
two-player	O
games	O
in	O
which	O
chance	O
(	O
for	O
example	O
,	O
dice	O
)	O
is	O
a	O
factor	O
.	O
</s>
<s>
A	O
key	O
feature	O
of	O
minimax	B-Algorithm
decision	O
making	O
is	O
being	O
non-probabilistic	O
:	O
in	O
contrast	O
to	O
decisions	O
using	O
expected	O
value	O
or	O
expected	O
utility	O
,	O
it	O
makes	O
no	O
assumptions	O
about	O
the	O
probabilities	O
of	O
various	O
outcomes	O
,	O
just	O
scenario	O
analysis	O
of	O
what	O
the	O
possible	O
outcomes	O
are	O
.	O
</s>
<s>
Various	O
extensions	O
of	O
this	O
non-probabilistic	O
approach	O
exist	O
,	O
notably	O
minimax	B-Algorithm
regret	O
and	O
Info-gap	O
decision	O
theory	O
.	O
</s>
<s>
Further	O
,	O
minimax	B-Algorithm
only	O
requires	O
ordinal	O
measurement	O
(	O
that	O
outcomes	O
be	O
compared	O
and	O
ranked	O
)	O
,	O
not	O
interval	O
measurements	O
(	O
that	O
outcomes	O
include	O
"	O
how	O
much	O
better	O
or	O
worse	O
"	O
)	O
,	O
and	O
returns	O
ordinal	O
data	O
,	O
using	O
only	O
the	O
modeled	O
outcomes	O
:	O
the	O
conclusion	O
of	O
a	O
minimax	B-Algorithm
analysis	O
is	O
:	O
"	O
this	O
strategy	O
is	O
minimax	B-Algorithm
,	O
as	O
the	O
worst	O
case	O
is	O
(	O
outcome	O
)	O
,	O
which	O
is	O
less	O
bad	O
than	O
any	O
other	O
strategy	O
"	O
.	O
</s>
<s>
Compare	O
to	O
expected	O
value	O
analysis	O
,	O
whose	O
conclusion	O
is	O
of	O
the	O
form	O
:	O
"	O
This	O
strategy	O
yields	O
Minimax	B-Algorithm
thus	O
can	O
be	O
used	O
on	O
ordinal	O
data	O
,	O
and	O
can	O
be	O
more	O
transparent	O
.	O
</s>
