06-adversarial_search - Game Playing Foundations of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Foundations of Artificial Intelligence Adversarial Search CS472 – Fall 2007 Thorsten Joachims Game Playing An AI Favorite • structured task • clear definition of success and failure • does not require large amounts of knowledge (at first glance) • focus on games of perfect information Game Playing Initial State is the initial board/position Successor Function defines the set of legal moves from any position Terminal Test determines when the game is over Utility Function gives a numeric outcome for the game Game Playing as Search x Partial Search Tree for Tic-Tac-Toe x x x x xxx xx x xo o ooo o o o o oo o o x x x x x x x x x x x o …… MIN(O) MAX(X) MIN(O) TERMINAL UTILITY MAX(X) 0+ 1 -1 Simplified Minimax Algorithm 1. Expand the entire tree below the root. 2. Evaluate the terminal nodes as wins for the minimizer or maximizer (i.e. utility). 3. Select an unlabeled node, n , all of whose children have been assigned values. If there is no such node, we're done --- return the value assigned to the root. 4. If n is a minimizer move, assign it a value that is the minimum of the values of its children. If n is a maximizer move, assign it a value that is the maximum of the values of its children. Return to Step 3.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Another Example 1 A 3 A 2 A 3 3 3 22 2 2 AAA A AA AA A 12 12 8 4 6 14 5 11 13 21 22 23 31 32 33 MAX MIN Minimax function MINIMAX-DECISION( game ) returns an operator for each op in OPERATORS[game] do VALUE[ op ] MINIMAX-VALUE(APPLY( op,game ), game ) end return the op with the highest VALUE[ op ] function MINIMAX-VALUE( state,game ) returns a utility value if TERMINAL-TEST[ game ]( state ) then return UTILITY[ game ]( state ) else if MAX is to move in state then return the highest MINIMAX-VALUE of SUCCESSORS( state ) else return the lowest MINIMAX-VALUE of SUCCESSORS( state ) Improving Minimax: Pruning Idea: Avoid generating the whole search tree Approach: Analyze which subtrees have no influence on the solution α β Features of Evolution m n Player Opponent .. .. Player Opponent If m is better than n for Player, never get to n in play.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2008 for the course CS 4700 taught by Professor Joachims during the Fall '07 term at Cornell.

Page1 / 6

06-adversarial_search - Game Playing Foundations of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online