Adversarial Search: Game Playing Reading: Chapter 6.5-6.8 next time.

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
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.
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Adversarial Search Chapter 5.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Hoe schaakt een computer? Arnold Meijster. Why study games? Fun Historically major subject in AI Interesting subject of study because they are hard Games.
Adversarial Search Chapter 6.
Artificial Intelligence for Games Game playing Patrick Olivier
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
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.
Game Playing in the Real World Oct 8 th : Uncertainty and Probabilistic reasoning Oct 10th: How should we define artificial intelligence? Reading for Oct.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
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)
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing in the Real World Next time: Wrap-up on Game playing and Knowledge Representation Reading: IBM’s Deep Blue Chess Grandmaster Chips, Feng-hsiung.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
ICS-270a:Notes 5: 1 Notes 5: Game-Playing ICS 270a Winter 2003.
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
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
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Lecture 6: Game Playing Heshaam Faili University of Tehran Two-player games Minmax search algorithm Alpha-Beta pruning Games with chance.
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.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
Chapter 6 Adversarial Search. Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test.
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.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
Instructor: Vincent Conitzer
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
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.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search In this lecture, we introduce a new search scenario: game playing 1.two players, 2.zero-sum game, (win-lose, lose-win, draw) 3.perfect.
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.
Adversarial Search and Game-Playing
PENGANTAR INTELIJENSIA BUATAN (64A614)
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.
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Adversarial Search: Game Playing Reading: Chapter next time

2 Computers better than humans Computers have won against human grandmasters Humans still ahead

3 Computer Checkers Program is Invincible  19/science/19cnd-checkers.html 19/science/19cnd-checkers.html

4 Difficulty  Games are interesting because they are too hard to solve Chess has a branching factor of 35, nodes, approx Need to make some decision even when the optimal decision is infeasible Drives bounded rationality research

5 Playing Chess on an IBM

6

7 Deep Blue  Kasparov vs. Deep Blue, May game full-regulation chess match (sponsored by ACM) Kasparov lost the match (2.5 to 3.5) Historic achievement for computer chess: first time a computer is the best chess-player on the planet

8  The decisive game of the match was Game 2, which left a scare in my memory … we saw something that went well beyond our wildest expectations of how well a computer would be able to foresee the long-term positional consequences of its decisions. The machine refused to move to a position that had a decisive short-term advantage – showing a very human sense of danger. I think this moment could mark a revolution in computer science that could earn IBM and the Deep Blue team a Nobel Prize. Even today, weeks later, no other chess-playing program in the world has been able to evaluate correctly the consequences of Deep Blue’s position. (Kasparov, 1997)

9 Types of Games  2 player vs. multiplayer Chess vs. Risk  Zero-sum vs. general-sum Chess vs. an auction  Perfect information vs. incomplete information Chess vs. bridge  Deterministic vs. stochastic Chess vs. backgammon

10

11 Search Formulation  Two players: Max and Min. Max moves first  States: board configurations  Operators: legal moves  Initial State: start configuration  Terminal State: final configuration  Goal test: (for max) a terminal state with high utility  Utility function: numeric values for final states. E.g., win, loss, draw with values 1, -1, 0

12 Minimax Algorithm  Find the optimal strategy for Max: Depth-first search of the game tree  Note: an optimal leaf node could appear at any depth of the tree Minimax principle: compute the utility of being in a state assuming both players play optimally from there until the end of the game Propogate minimax values up the tree once terminal nodes are discovered  Eventually, read off the optimal strategy for Max

13

14

15

16 Represents Max’s turn Represents Min’s turn

17 Represents Max’s turn Represents Min’s turn

18 Size of Game Search Trees  DFS, time complexity O(b d ) Chess  B~35(average branching factor)  D~100(depth of game tree for typical game)  B d ~ ~ nodes Tic-Tac-Toe  ~5 legal moves, total of 9 moves  5 9 =1,953,125  9!=362,880 (Computer goes first)  8!=40,320 (Computer goes second) Go, branching factor starts at 361 (19X19 board); backgammon, branching factor around 20X20 (because of chance nodes)

19 Which values are necessary?

20  -  values  Computing alpha-beta values   value is a lower-bound on the actual value of a MAX node, maximum across seen children   value is an upper-bound on actual value of a MIN node, minimum across seen children  Propagation:  Update , values by propagating upwards values of terminal nodes  Update , values down to allow pruning

21

22

23

24

25

26  -  pruning  Below a MIN node whose  value is lower than or equal to the  value of its ancestor  A MAX ancestor will never choose that MIN node, because there is another choice with a higher value  Below a MAX node whose  value is greater than or equal to the  value of its answer  A MIN ancestor will never choose that MAX node because there is another choice with a lower value

27 Effectiveness of  -  pruning (Knuth&Moore 75)  [best-case] if successors are ordered best-first  - must only examine O(b d/2 ) nodes instead of O(b d )  Effective branching factor is sqrt(b) and not b; can look twice as far ahead.  [avg-case] if successors are examined in random order then nodes will be O(b 3d/4 ) for moderate b  For chess, a fairly simple ordering function (e.g., captures, then threats, then forward moves) gets close to theoretical limit  [worst case] in worst-case, - gives no improvement over exhaustive search

28 What if  -  search is not fast enough?  Notice that we’re allowing smart ordering heuristics, but otherwise -  still has to search all the way to terminal states for at least a portion of the search space.  What else can we do??

29 Heuristics: evaluation functions  Bound the depth of search, and use an evaluation function to estimate value of current board configurations  E.g., Othello: #white pieces - #black pieces  E.g., Chess: Value of all white pieces – Value of all black pieces  Typical values from –infinity (lost) to +infinity (won) or [-1,+1]  turn non-terminal nodes into terminal leaves And, - pruning continues to apply

30 Evaluation Functions  An ideal evaluation function would rank terminal states in the same way as the true utility function; but must be fast  Typical to define features, & make the function a linear weighted sum of the features

31 Chess  F 1 =number of white pieces  F 2 =number of black pieces  F 3 =F 1 /F 2  F 4 =number of white bishops  F 5 =estimate of “threat” to white king

32 Weighted Linear Function  Eval(s)=w 1 F 1 (s)+w 2 F 2 (s)+…+w n F n (s)  Given features and weights  Assumes independence  Can use expert knowledge to construct an evaluation function  Can also use self-play and machine learning

33

34