Adversarial Search and Game Playing Examples

Slides:



Advertisements
Similar presentations
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.
Advertisements

Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
Tic Tac Toe Architecture CSE 5290 – Artificial Intelligence 06/13/2011 Christopher Hepler.
1 Game Playing. 2 Outline Perfect Play Resource Limits Alpha-Beta pruning Games of Chance.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Adversarial Search Board games. Games 2 player zero-sum games Utility values at end of game – equal and opposite Games that are easy to represent Chess.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Games Henry Kautz.
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)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
Adversarial Search and Game Playing Examples. Game Tree MAX’s play  MIN’s play  Terminal state (win for MAX)  Here, symmetries have been used to reduce.
Adversarial Search: Game Playing Reading: Chess paper.
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
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.
CSC 412: AI Adversarial Search
Notes adapted from lecture notes for CMSC 421 by B.J. Dorr
Lecture 6: Game Playing Heshaam Faili University of Tehran Two-player games Minmax search algorithm Alpha-Beta pruning Games with chance.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Chapter 12 Adversarial Search. (c) 2000, 2001 SNU CSE Biointelligence Lab2 Two-Agent Games (1) Idealized Setting  The actions of the agents are interleaved.
Adversarial Search; Heuristics in Games Foundations of Artificial Intelligence.
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.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Adversarial Search and Game Playing Russell and Norvig: Chapter 5 Russell and Norvig: Chapter 6 CS121 – Winter 2003.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1 Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game.
Adversarial Search Chapter Two-Agent Games (1) Idealized Setting – The actions of the agents are interleaved. Example – Grid-Space World – Two.
Adversarial Search and Game-Playing
ADVERSARIAL GAME SEARCH: Min-Max Search
Adversarial Search Aka Games
Iterative Deepening A*
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
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
Optimizing Minmax Alpha-Beta Pruning Real Time Decisions
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Artificial Intelligence
Artificial Intelligence
CMSC 471 Fall 2011 Class #8-9 Tue 9/27/11 – Thu 9/29/11 Game Playing
Artificial Intelligence Chapter 12 Adversarial Search
Game playing.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Game Playing: Adversarial Search
Kevin Mason Michael Suggs
NIM - a two person game n objects are in one pile
Artificial Intelligence
CMSC 671 Fall 2010 Tue 9/21/10 Game Playing
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Search and Game Playing
Minimax strategies, alpha beta pruning
Adversarial Search and Game Playing
Mini-Max search Alpha-Beta pruning General concerns on games
Game Playing: Adversarial Search
Based on slides by: Rob Powers Ian Gent
Artificial Intelligence
Game Playing Chapter 5.
Adversarial Search CMPT 420 / CMPG 720.
Minimax strategies, alpha beta pruning
Adversarial Search Game Theory.
CS51A David Kauchak Spring 2019
Unit II Game Playing.
Presentation transcript:

Adversarial Search and Game Playing Examples

Game Tree MAX nodes MAX’s play  MIN’s play  Terminal state (win for MAX)  MIN nodes Here, symmetries have been used to reduce the branching factor

Game Tree MAX’s play  MIN’s play  Terminal state (win for MAX)  In general, the branching factor and the depth of terminal states are large Chess: Number of states: ~1040 Branching factor: ~35 Number of total moves in a game: ~100

Example: Tic-tac-Toe e(s) = number of rows, columns, and diagonals open for MAX - number of rows, columns, and diagonals open for MIN 8-8 = 0 6-4 = 2 3-3 = 0

Backing up Values Tic-Tac-Toe tree at horizon = 2 1 -1 1 -2 Best move 6-5=1 5-6=-1 5-5=0 4-5=-1 6-4=2 5-4=1 6-6=0 4-6=-2

Continuation 1 1 1 3 2 1 2 1 2 3 1 1

Example

Example The beta value of a MIN node is an upper bound on the final backed-up value. It can never increase b = 2 2

Example 1 b = 1 2 The beta value of a MIN node is an upper bound on the final backed-up value. It can never increase

Example 1 b = 1 2 a = 1 The alpha value of a MAX node is a lower bound on the final backed-up value. It can never decrease

Example 1 b = 1 2 a = 1 -1 b = -1

Example 1 b = 1 2 a = 1 -1 b = -1 Search can be discontinued below any MIN node whose beta value is less than or equal to the alpha value of one of its MAX ancestors

An example of Alpha-beta pruning 5 -3 3 2 -2 max min -3 3 -3

Example of Alpha-beta pruning Final tree max min max min max 5 -3 3 3 -3 2 -2 3

An example of Alpha-beta pruning 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 -3 3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 -3 3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 -3 3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 -3 3 5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 2 -3 3 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 3 2 -3 3 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 -3 3 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 -3 3 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 -3 3 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 -3 3 2 5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 1 -3 3 2 1 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 1 -3 3 2 1 -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 2 3 2 1 -3 3 2 1 -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 1 2 1 3 2 1 -3 3 2 1 -3 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 1 2 1 3 2 1 -3 3 2 1 -3 -5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 1 2 1 3 2 1 -3 3 2 1 -3 -5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 1 2 1 -5 3 2 1 -5 -3 3 2 1 -3 -5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 2 1 2 1 -5 3 2 1 -5 -3 3 2 1 -3 -5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 1 2 1 2 1 -5 3 2 1 -5 -3 3 2 1 -3 -5 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 1 1 2 1 2 2 1 -5 2 3 2 1 -5 2 -3 3 2 1 -3 -5 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Example 1 1 2 1 2 2 1 -5 2 3 2 1 -5 2 -3 3 2 1 -3 -5 2 5 -3 3 3 -3 2 -2 3 5 2 5 -5 1 5 1 -3 -5 5 -3 3 2

Nondeterminstic games are the games with both an element of chance and Add chance nodes to tree Example with coin flip instead of dice 0.5 0.5 0.5 0.5 2 4 7 4 6 5 -2

Example with coin flip instead of dice (cont.) 3 3 -1 0.5 0.5 0.5 0.5 2 4 -2 2 4 7 4 6 5 -2

Alpha-Beta prunning in Tic-Tac-Toe