Artificial Intelligence

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Advertisements

Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
1 CSC 550: Introduction to Artificial Intelligence Fall 2008 search in game playing  zero-sum games  game trees, minimax principle  alpha-beta pruning.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6 Section 1 – 4.
Adversarial Search Chapter 5.
COMP-4640: Intelligent & Interactive Systems Game Playing A game can be formally defined as a search problem with: -An initial state -a set of operators.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
G5AIAI Introduction to AI Graham Kendall Game Playing Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
G51IAI Introduction to AI Minmax and Alpha Beta Pruning Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
This time: Outline Game playing The minimax algorithm
Game Playing CSC361 AI CSC361: Game Playing.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
MIU Mini-Max Graham Kendall Game Playing Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Game Playing Revision Mini-Max search Alpha-Beta pruning General concerns on games.
Artificial Intelligence
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Artificial Intelligence AIMA §5: Adversarial Search
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
EA C461 – Artificial Intelligence Adversarial Search
Last time: search strategies
Iterative Deepening A*
PENGANTAR INTELIJENSIA BUATAN (64A614)
Games and adversarial search (Chapter 5)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
Adversarial Search Chapter 5.
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Artificial Intelligence
Game playing.
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
Artificial Intelligence
Alpha-Beta Search.
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Alpha-Beta Search.
Mini-Max search Alpha-Beta pruning General concerns on games
Adversarial Search and Game Playing Examples
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Adversarial Search Game Theory.
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

Artificial Intelligence Game / Adversarial Search

Garry Kasparov and Deep Blue, 1997 Outline Minimax Search Alpha-Beta Pruning Garry Kasparov and Deep Blue, 1997

Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits  unlikely to find goal, must approximate

Game tree (2-player, deterministic, turns)

Game Playing - Minimax Game Playing: An opponent tries to thwart your every move 1944 - John von Neumann outlined a search method (Minimax) that maximised your position whilst minimising your opponents In order to implement we need a method of measuring how good a position is. Often called a utility function (or payoff function) e.g. outcome of a game; win 1, loss -1, draw 0 Initially this will be a value that describes our position exactly

Game Playing - Minimax Restrictions: 2 players: MAX (computer) and MIN (opponent) deterministic, perfect information Select a depth-bound (say: 2) and evaluation function MAX MIN - Construct the tree up till the depth-bound Select this move 3 - Compute the evaluation function for the leaves 2 1 3 - Propagate the evaluation function upwards: - taking minima in MIN 2 5 3 1 4 - taking maxima in MAX

Game Playing - Minimax example 1 A Select this move B C MIN 1 -3 D E F G MAX 4 1 2 -3 4 -5 1 -7 2 -3 -8 = terminal position = agent = opponent

Alpha-Beta Pruning Generally applied optimization on Mini-max. Kecerdasan Buatan Alpha-Beta Pruning 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. Handayani Tjandrasa

Alpha-Beta idea: Principles: generate the tree depth-first, left-to-right propagate final values of nodes as initial estimates for their parent node. MIN MAX 2 2 - The MIN-value (1) is already smaller than the MAX-value of the parent (2) 1 - The MIN-value can only decrease further, 2 =2 1 - The MAX-value is only allowed to increase, 5 - No point in computing further below this node

Terminology: - The (temporary) values at MAX-nodes are ALPHA-values - The (temporary) values at MIN-nodes are BETA-values Alpha-value MIN MAX 2 2 5 =2 2 1 1 Beta-value

The Alpha-Beta principles (1): - If an ALPHA-value is larger or equal than the Beta-value of a descendant node: stop generation of the children of the descendant MIN MAX 2 2 5 =2 2 1 1 Alpha-value Beta-value 

The Alpha-Beta principles (2): - If an Beta-value is smaller or equal than the Alpha-value of a descendant node: stop generation of the children of the descendant MIN MAX 2 2 5 =2 2 3 1 Alpha-value Beta-value 

Alpha-Beta Pruning example MAX A B C MIN <=6 D E MAX 6 >=8 H I J K 6 5 8 = agent = opponent

Alpha-Beta Pruning example >=6 MAX B C MIN 6 <=2 D E F G MAX 6 >=8 2 H I J K L M 6 5 8 2 1 = agent = opponent

Alpha-Beta Pruning example >=6 MAX B C MIN 6 2 D E F G MAX 6 >=8 2 H I J K L M 6 5 8 2 1 = agent = opponent

Alpha-Beta Pruning example MAX 6 B C MIN 6 2 beta cutoff D E F G MAX 6 >=8 alpha cutoff 2 H I J K L M 6 5 8 2 1 = agent = opponent

Mini-Max with  at work: 8 7 3 9 1 6 2 4 5  4 16  5 31 39 = 5 MAX 6  8  5 23 15 = 4 30 = 5  3 38 MIN 33  1 2  8 10  2 18  1 25  3 35  2 12  4 20  3 5 = 8 8  9 27  9 29  6 37 = 3 14 = 4 22 = 5 MAX 1 3 4 7 9 11 13 17 19 21 24 26 28 32 34 36 11 static evaluations saved !!