Games & Adversarial Search

Slides:



Advertisements
Similar presentations
Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Advertisements

Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
CMSC 671 Fall 2001 Class #8 – Thursday, September 27.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Artificial Intelligence for Games Game playing Patrick Olivier
This time: Outline Game playing The minimax algorithm
Game Playing CSC361 AI CSC361: Game Playing.
Searching for Solutions Artificial Intelligence CSPP January 14, 2004.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
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.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Game Playing ECE457 Applied Artificial Intelligence Spring 2007 Lecture #5.
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.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Game Playing ECE457 Applied Artificial Intelligence Spring 2008 Lecture #5.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Game Playing Revision Mini-Max search Alpha-Beta pruning General concerns on games.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search 2 (Game Playing)
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Game Search & Constrained Search CMSC Artificial Intelligence January 18, 2005.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
Artificial Intelligence AIMA §5: Adversarial Search
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
ADVERSARIAL GAME SEARCH: Min-Max Search
Announcements Homework 1 Full assignment posted..
Games and Adversarial Search
Last time: search strategies
PENGANTAR INTELIJENSIA BUATAN (64A614)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Games & Adversarial Search
Games & Adversarial Search
Artificial Intelligence
Artificial Intelligence Chapter 12 Adversarial Search
Game playing.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
Game Playing: Adversarial Search
Game Search & Constrained Search
NIM - a two person game n objects are in one pile
Artificial Intelligence
Alpha-Beta Search.
Instructor: Vincent Conitzer
The Alpha-Beta Procedure
Search and Game Playing
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Game Playing Fifth Lecture 2019/4/11.
Alpha-Beta Search.
Mini-Max search Alpha-Beta pruning General concerns on games
Game Playing: Adversarial Search
Game Playing Chapter 5.
Search.
Search.
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Games & Adversarial Search CMSC 25000 Artificial Intelligence January 18, 2007

Agenda Game search characteristics Minimax procedure Adversarial Search Alpha-beta pruning: “If it’s bad, we don’t need to know HOW awful!” Game search specialties Progressive deepening Singular extensions

Games as Search Nodes = Board Positions Each ply (depth + 1) = Move Special feature: Two players, adversial Static evaluation function Instantaneous assessment of board configuration NOT perfect (maybe not even very good)

Minimax Lookahead Modeling adversarial players: Maximizer = positive values Minimizer = negative values Decisions depend on choices of other player Look forward to some limit Static evaluate at limit Propagate up via minimax

Minimax Procedure If at limit of search, compute static value Relative to player If minimizing level, do minimax Report minimum If maximizing level, do minimax Report maximum

Minimax Search

Minimax Analysis Complete: Optimal: Time: Space: Yes, if finite tree Optimal: Yes, if optimal opponent Time: b^m Space: bm (progressive deepening DFS) Practically: Chess: b~35, m~100 Complete solution is impossible ~2.5*10^154

Alpha-Beta Pruning Alpha-beta principle: If you know it’s bad, don’t waste time finding out HOW bad May eliminate some static evaluations May eliminate some node expansions

Alpha-Beta Pruning

Alpha-Beta Pruning

Alpha-Beta Pruning

Alpha-Beta Pruning

Alpha-Beta Pruning

Alpha-Beta Procedure If level=TOP_LEVEL, alpha = NEGMAX; beta= POSMAX If (reached Search-limit), compute & return static value of current If level is minimizing level, While more children to explore AND alpha < beta ab = alpha-beta(child) if (ab < beta), then beta = ab Report beta If level is maximizing level, ab = alpha-beta(child) if (ab > alpha), then alpha = ab Report alpha

Alpha-Beta Pruning Analysis Worst case: Bad ordering: Alpha-beta prunes NO nodes Best case: Assume cooperative oracle orders nodes Best value on left “If an opponent has some response that makes move bad no matter what the moving player does, then the move is bad.” Implies: check move where opposing player has choice, check all own moves

Optimal Alpha-Beta Ordering 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 14 15 16 17 18 19 20 21 22 13 14 15 26 27 28 29 30 31 13 14 15 35 36 37 38 39 40

Optimal Ordering Alpha-Beta Significant reduction of work: 11 of 27 static evaluations Lower bound on # of static evaluations: if d is even, s = 2*b^d/2-1 if d is odd, s = b^(d+1)/2+b^(d-1)/2-1 Upper bound on # of static evaluations: b^d Reality: somewhere between the two Typically closer to best than worst

Heuristic Game Search Handling time pressure Progressive deepening Focus search Be reasonably sure “best” option found is likely to be a good option. Progressive deepening Always having a good move ready Singular extensions Follow out stand-out moves

Progressive Deepening Problem: Timed turns Limited depth If too conservative, too shallow If too generous, won’t finish Solution: Always have a (reasonably good) move ready Search at progressively greater depths: 1,2,3,4,5…..

Singular Extensions Problem: Explore to some depth, but things change a lot in next ply False sense of security aka “horizon effect” Solution: “Singular extensions” If static value stands out, follow it out Typically, “forced” moves: E.g. follow out captures

Additional Pruning Heuristics Tapered search: Keep more branches for higher ranked children Rank nodes cheaply Rule out moves that look bad Problem: Heuristic: May be misleading Could miss good moves

Due to Russell and Norvig Deterministic Games Due to Russell and Norvig

Games with Chance Many games mix chance and strategy E.g. Backgammon Combine dice rolls + opponent moves Modeling chance in game tree For each ply, add another ply of “chance nodes” Represent alternative rolls of dice One branch per roll Associate probability of roll with branch

Expectiminimax:Minimax+Chance Adding chance to minimax For each roll, compute max/min as before Computing values at chance nodes Calculate EXPECTED value Sum of branches Weight by probability of branch

Expecti… Tree

Summary Game search: Minimax search: Models adversarial game Key features: Alternating, adversarial moves Minimax search: Models adversarial game Alpha-beta pruning: If a branch is bad, don’t need to see how bad! Exclude branch once know can’t change value Can significantly reduce number of evaluations Heuristics: Search under pressure Progressive deepening; Singular extensions