Games with Chance 2012/04/25 1. Nondeterministic Games: Backgammon White moves clockwise toward 25. Black moves counterclockwise toward 0. A piece can.

Slides:



Advertisements
Similar presentations
Seminar on Game Playing in AI. 1/21/2014University College of Engineering2 Definition…. Game Game playing is a search problem defined by: 1. Initial state.
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.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
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.
Adversarial Search Chapter 5.
1 Game Playing. 2 Outline Perfect Play Resource Limits Alpha-Beta pruning Games of Chance.
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 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
EIE426-AICV 1 Game Playing Filename: eie426-game-playing-0809.ppt.
Game Playing 최호연 이춘우. Overview Intro: Games as search problems Perfect decisions in 2-person games Imperfect decisions Alpha-beta pruning.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Summary So Far Extremes in classes of games: –Nonadversarial, perfect information, deterministic –Adversarial, imperfect information, chance  Adversarial,
This time: Outline Game playing The minimax algorithm
CS 561, Sessions Administrativia Assignment 1 due tuesday 9/24/2002 BEFORE midnight Midterm exam 10/10/2002.
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.
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.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
6. Fully Observable Game Playing
Notes adapted from lecture notes for CMSC 421 by B.J. Dorr
Adversarial Search Chapter 5 Adapted from Tom Lenaerts’ lecture notes.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Game Playing. Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space.
Game Playing.
AD FOR GAMES Lecture 4. M INIMAX AND A LPHA -B ETA R EDUCTION Borrows from Spring 2006 CS 440 Lecture Slides.
Adversarial Search. Game playing Perfect play The minimax algorithm alpha-beta pruning Resource limitations Elements of chance Imperfect information.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Computing & Information Sciences Kansas State University Lecture 9 of 42 CIS 530 / 730 Artificial Intelligence Lecture 9 of 42 William H. Hsu Department.
Pitch Playing Agent Project for Into to AI Jody Ammeter.
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Games 1 Alpha-Beta Example [-∞, +∞] Range of possible values Do DF-search until first leaf.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
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.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
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.
5/4/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 9, 5/4/2005 University of Washington, Department of Electrical Engineering Spring 2005.
Artificial Intelligence AIMA §5: Adversarial Search
Adversarial Search and Game-Playing
Last time: search strategies
PENGANTAR INTELIJENSIA BUATAN (64A614)
Game Playing.
Adversarial Search Chapter 5.
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Game playing.
Games & Adversarial Search
Games & Adversarial Search
Game Playing Fifth Lecture 2019/4/11.
Games & Adversarial Search
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Games with Chance 2012/04/25 1

Nondeterministic Games: Backgammon White moves clockwise toward 25. Black moves counterclockwise toward 0. A piece can move to any position unless there are multiple opponent pieces there; if there is one opponent, it is captured and must start over. White has rolled 6-5 and must choose among four legal moves: (5- 10, 5-11), (5-11, 19-24), (5-10, 10-16), (5-11, 11-16) 2

Nondeterministic Games: Backgammon (cont.-1) Backgammon – White can decide what his legal moves are, but cannot determine black’s because that depends on what black rolls Game must include chance nodes How to pick best move? – Cannot apply minimax directly 3

Nondeterministic Games: Backgammon (cont.-1) Chance nodes are included in the game tree 4

Nondeterministic Games in General In nondeterministic games, chance introduced by dice, card-shuffling, face- down shuffling 5

Algorithm for Nondeterministic Games Expectiminimax gives perfect play Expectiminimax(n) = Utility(n)if n  Terminal max s  Successors(n) Expectiminimax(s)if n  MAX min s  Successors(n) Expectiminimax(s)if n  MIN  s  Successors(n) P(s)Expectiminimax(s)if n  Chance Successor function for a chance node n augments the state of n with each possible dice roll to produce successor s and P(s) 6

Pruning in Nondeterministic Game Trees A version of  -  pruning is possible [-∞,+∞] [-∞,2][-∞,+∞] 2 [2,2][-∞,+∞] 2 [2,2][-∞,2][-∞,+∞] [-∞,2][-∞,+∞] [2,2][1,1][-∞,+∞] [1.5,1.5][-∞,+∞] [2,2][1,1][-∞,0][-∞,+∞] [1.5,1.5][-∞,+∞] [2,2][1,1][0,0][-∞,+∞] [1.5,1.5][-∞,+∞] [2,2][1,1][0,0][-∞,1] [1.5,1.5][-∞,0.5]

Pruning Contd. More pruning occurs if we can bound the leaf values [-2,2] 2 [2,2][-2,2] [0,2][-2,2] 2 [2,2][-2,2] [0,2][-2,2] [2,2][1,1][-2,2] [1.5,1.5][-2,2] [2,2][1,1][-2,0][-2,2] [1.5,1.5][-2,1]

Digression: Exact Value DO Matter Behavior is preserved only by positive linear transformation of Eval Hence Eval should be proportional to the expected payoff Move to A 1 is best Move to A 2 is best 9

10 Nondeterministic games in practice

Games of Imperfect Information e.g., card game, where opponent’s initial cards are unknown Typically we can calculate a probability for each possible deal Seems just like having a big dice roll at the beginning of games Idea: averaging over clairvoyancy – compute the minimax value of each action for each possible deal of the cards – choose the action with the highest expected value over all deals Special case: if an action is optimal for all deals, it is optimal GIB (Ginsberg, 1999), current best bridge program, approximate this idea by modifying averaging over clairvoyancy – generating 100 deals consistent with bidding information – picking the action that wins most tricks on average 11

Example Four-card bridge/whist/hearts hand, Max to play first 12

13 Proper analysis

 -  Algorithm function A LPHA -B ETA -S EARCH ( state ) returns an action inputs: state, current state in game v  M AX -V ALUE ( state, – ,   ) return the action in S UCCESSORS ( state ) with value v function M AX -V ALUE ( state, ,  ) returns a utility value inputs: state, current state in game , the value of the best alternative for MAX along the path to state , the value of the best alternative for MIN along the path to state if T ERMINAL -T EST ( state ) then return U TILITY ( state ) v  –  for a, s in S UCCESSORS ( state ) do v  M AX ( v, M IN -V ALUE ( s, ,  )) if v   then return v// fail-high   M AX ( , v ) return v 14

 -  Algorithm (cont.) function M IN -V ALUE ( state, ,  ) returns a utility value inputs: state, current state in game , the value of the best alternative for MAX along the path to state , the value of the best alternative for MIN along the path to state if T ERMINAL -T EST ( state ) then return U TILITY ( state ) v    for a, s in S UCCESSORS ( state ) do v  M IN ( v, M AX -V ALUE ( s, ,  )) if v   then return v// fail low   M IN ( , v ) return v 15

Negamax(B. Chen, 2010) 16