Chapter 6 Adversarial Search. Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test.

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.
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Adversarial Search Chapter 6 Section 1 – 4. Warm Up Let’s play some games!
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
CMSC 671 Fall 2001 Class #8 – Thursday, September 27.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
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.
1 Game Playing. 2 Outline Perfect Play Resource Limits Alpha-Beta pruning Games of Chance.
Adversarial Search: Game Playing Reading: Chapter next time.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
This time: Outline Game playing The minimax algorithm
Lecture 02 – Part C Game Playing: Adversarial Search
CS 561, Sessions Administrativia Assignment 1 due tuesday 9/24/2002 BEFORE midnight Midterm exam 10/10/2002.
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
CS 561, Sessions Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first.
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.
Min-Max Trees Based on slides by: Rob Powers Ian Gent Yishay Mansour.
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)
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Chap. 6 [AIMA] Chang-Sheng Chen.
CS 460, Sessions Last time: search strategies Uninformed: Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Adversarial Search Chapter 5 Adapted from Tom Lenaerts’ lecture notes.
Lecture 6: Game Playing Heshaam Faili University of Tehran Two-player games Minmax search algorithm Alpha-Beta pruning Games with chance.
Games CPS 170 Ron Parr. Why Study Games? Many human activities can be modeled as games –Negotiations –Bidding –TCP/IP –Military confrontations –Pursuit/Evasion.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Adversarial Search CS311 David Kauchak Spring 2013 Some material borrowed from : Sara Owsley Sood and others.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Notes on Game Playing by Yun Peng of theYun Peng University of Maryland Baltimore County.
For Wednesday Read Weiss, chapter 12, section 2 Homework: –Weiss, chapter 10, exercise 36 Program 5 due.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Quiz 4 : Minimax Minimax is a paranoid algorithm. True
For Friday Finish chapter 6 Program 1, Milestone 1 due.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Game-playing AIs Part 2 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part II  The Minimax Rule  Alpha-Beta Pruning  Game-playing.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
Game tree search As ever, slides drawn from Andrew Moore’s Machine Learning Tutorials: as well as from Faheim Bacchus.
Game Playing: Adversarial Search chapter 5. Game Playing: Adversarial Search  Introduction  So far, in problem solving, single agent search  The machine.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
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.
Adversarial Search CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and Java.
CS 460 Spring 2011 Lecture 4.
Adversarial Search.
Based on slides by: Rob Powers Ian Gent
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

Chapter 6 Adversarial Search

Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test Payoff Function Payoff Function Numeric value for terminal states Numeric value for terminal states Usually + for one player -- for the other player Usually + for one player -- for the other player

Mini-Max Algorithm function maxValue(state) if (terminal) return value; for s in succ(state) maxValue = max(minValue(s), maxValue) return maxValue function minValue(state) if (terminal) return value; for s in succ(state) minValue = min(maxValue(s), minValue) return minValue

Mini-Max Example

Mini-max Algorithm Complete Depth-First Search Complete Depth-First Search Space Complexity Space Complexity O(bd) O(bd) Time Complexity Time Complexity O(b d ) O(b d ) Need Some method of pruning the search tree Need Some method of pruning the search tree

Alpha-Beta Pruning Some parts of the tree clearly do not need to be searched Some parts of the tree clearly do not need to be searched

Alpha-Beta Pruning alpha (α) : best choice so far for Max alpha (α) : best choice so far for Max beta (β) :best choice so far for Min beta (β) :best choice so far for Min alpha cut-off if alpha cut-off if min on a branch is < alpha min on a branch is < alpha beta cut-off if beta cut-off if Max on a branch is > beta Max on a branch is > beta

Alpha-Beta Algorithm function maxValue(state,A,B) if (terminal) return value; for s in succ(state) v = max(minValue(s,A,B), v) if (v >= B) then return v A = max(A,v) return v function minValue(state,A,B) if (terminal) return value; for s in succ(state) v = min(maxValue(s,A,B), v) if (v <= A) then return v B = min(B,v) return v

Alpha-Beta Pruning Effectiveness Effectiveness Highly dependent on which node is expanded first Highly dependent on which node is expanded first However, if a good ordering can be found However, if a good ordering can be found O(b d/2 ) instead of O(b d ) O(b d/2 ) instead of O(b d ) Effective branching factor is sqrt(b) Effective branching factor is sqrt(b) Chess 6 vs 35 Chess 6 vs 35

Imperfect Real-time decisions Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test Payoff Function Payoff Function Numeric value for terminal states Numeric value for terminal states Usually + for one player -- for the other player Usually + for one player -- for the other player

Imperfect Real-time decisions Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test Heuristic Evaluation Function Heuristic Evaluation Function Numeric value for terminal states Numeric value for terminal states Usually + for one player -- for the other player Usually + for one player -- for the other player

Imperfect Real-time decisions Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test Heuristic Evaluation Function Heuristic Evaluation Function Numeric value for terminal states Numeric value for terminal states Usually + for one player -- for the other player Usually + for one player -- for the other player

Evaluation Functions Properties of a good evaluation function Properties of a good evaluation function Accurate Accurate Fast Fast Features Features Important aspects of the Game Important aspects of the Game Chess Chess Material Advantage Material Advantage Positional Advantage Positional Advantage Pawn Structure Pawn Structure King Safety King Safety Checkers? Checkers?

Evaluation Function Weighted Linear Function Weighted Linear Function Assumes Feature Independence Assumes Feature Independence