














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















































Games: Outline of Unit
The Minimax Procedure
This is the move 2 Evaluation function selected by minimax value
Minimax Algorithm
function MINIMAX-DECISION(state) returns an action inputs: state, current state in game vMAX-VALUE(state) return theaction in SUCCESSORS(state) with value v
function MIN-VALUE(state) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v ∞ for a,s in SUCCESSORS(state) do v MIN(v, MAX-VALUE(s) ) return v
function MAX-VALUE(state) returns a utility value if TERMINAL-TEST(state) then return UTILITY(state) v - ∞ for a,s in SUCCESSORS(state) do v MAX(v, MIN-VALUE(s) ) return v
Comments on Minimax Search
Depth-first search with fixed number of ply as the limit.
10
MINI MAX
Restrictions:
MAX
MIN
MAX
Select this move
11
The MINI-MAX algorithm:
Initialise depthbound; Minimax (board, depth) = IF depth = depthbound THEN return static_evaluation(board); ELSE IF maximizing_level(depth) THEN FOR EACH child child of board compute Minimax(child, depth+1); return maximum over all children; ELSE IF minimizing_level(depth) THEN FOR EACH child child of board compute Minimax(child, depth+1); return minimum over all children;
Call: Minimax(current_board, 0)
When to Cut Search
Depth Limit: don't search beyond a given depth.
Iterative Deepening: Stop search after a given time (i.e. time is up when resources run out). Assume: (1) 1000 positions/second (2) Branching Factor 35 (3) 150 seconds/move (tournament play)
Max effective ply look ahead = 3-
Game Playing: Adversarial Search
Problem of minimax search
—Alpha = value of best choice found so far at any choice point along the MAX path. —Beta = value of best choice found so far at any choice point along the MIN path.
Alpha-Beta Pruning
A way to improve the performance of the Minimax Procedure
2 7 1
=
>=
<=
?
17
Alpha-Beta Cut-off
Generally applied optimization on Mini-max.
Instead of:
first creating the entire tree (up to depth-level) then doing all propagation
Interleave the generation of the tree and the propagation of values.
Point:
some of the obtained values in the tree will provide information that other (non-generated) parts are redundant and do not need to be generated.
Alpha-Beta Pruning
Traverse the search tree in depth-first order For each MAX node n, α(n)=maximum child value found so far
Game Playing: Adversarial Search
Alpha-beta pruning Basic idea:
2 7 1
=
>=
<=
?
Some branches will never be played by rational players since they include sub-optimal decisions (for either player).