Game Playing in AI by: Gaurav Phapale 05 IT 6010

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.
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.
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.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
CS 484 – Artificial Intelligence
1 Game Playing. 2 Outline Perfect Play Resource Limits Alpha-Beta pruning Games of Chance.
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
G51IAI Introduction to AI Minmax and Alpha Beta Pruning Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
Lecture 02 – Part C Game Playing: Adversarial Search
Game Playing CSC361 AI CSC361: Game Playing.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Game Playing.
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 6 Section 1 – 4. Search in an Adversarial Environment Iterative deepening and A* useful for single-agent search problems What.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Paula Matuszek, CSC 8520, Fall Based in part on aima.eecs.berkeley.edu/slides-ppt 1 CS 8520: Artificial Intelligence Adversarial Search Paula Matuszek.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
Adversarial Search 2 (Game Playing)
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Artificial Intelligence AIMA §5: Adversarial Search
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
Last time: search strategies
Iterative Deepening A*
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.
Game Playing.
Adversarial Search Chapter 5.
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Artificial Intelligence
Game playing.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
Game Playing: Adversarial Search
NIM - a two person game n objects are in one pile
Artificial Intelligence
Alpha-Beta Search.
CMSC 671 Fall 2010 Tue 9/21/10 Game Playing
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Pruned Search Strategies
Minimax strategies, alpha beta pruning
Game Playing Fifth Lecture 2019/4/11.
Alpha-Beta Search.
Game Playing: Adversarial Search
Artificial Intelligence
Game Playing Chapter 5.
Adversarial Search and Game Playing Examples
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Unit II Game Playing.
Presentation transcript:

Game Playing in AI by: Gaurav Phapale 05 IT 6010 Seminar on Game Playing in AI by: Gaurav Phapale 05 IT 6010 11/6/2018 School of Information Technology

School of Information Technology Definition…. Game Game playing is a search problem defined by: 1. Initial state 2. Successor function 3. Goal test 4. Path cost / utility / payoff function 11/6/2018 School of Information Technology

School of Information Technology Types of Games Perfect Information Game: In which player knows all the possible moves of himself and opponent and their results. E.g. Chess. Imperfect Information Game: In which player does not know all the possible moves of the opponent. E.g. Bridge since all the cards are not visible to player. 11/6/2018 School of Information Technology

Characteristics of game playing Unpredictable Opponent. Time Constraints. 11/6/2018 School of Information Technology

Typical structure of the game in AI 2- person game Players alternate moves Zero-sum game: one player’s loss is the other’s gain Perfect information: both players have access to complete information about the state of the game. No information is hidden from either player. No chance (e.g. using dice) involved E.g. Tic- Tac- Toe, Checkers, Chess 11/6/2018 School of Information Technology

School of Information Technology Game Tree Tic – Tac – Toe Game Tree Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

School of Information Technology MAX 11/6/2018 School of Information Technology

School of Information Technology MAX cont.. 11/6/2018 School of Information Technology

School of Information Technology MINIMAX.. 2 players.. MIN and MAX. Utility of MAX = - (Utility of MIN). Utility of game = Utility of MAX. MIN tries to decrease utility of game. MAX tries to increase utility of game. 11/6/2018 School of Information Technology

School of Information Technology MINIMAX Tree.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Assignment of MINIMAX Values Minimax_value(u) {   //u is the node you want to score  if u is a leaf return score of u; else if u is a min node for all children of u: v1, .. vn ; return min (Minimax_value(v1),..., Minimax_value(vn)) return max (Minimax_value(v1),..., Minimax_value(vn)) } 11/6/2018 School of Information Technology

School of Information Technology MINIMAX Algorithm.. Function MINIMAX-DECISION (state) returns an operator For each op in OPERATORS[game] do VALUE [op] = MINIMAX-VALUE (APPLY (op, state), game) End Return the op with the highest VALUE [op]   Function MINIMAX-VALUE (state, game) returns a utility value If TERMINAL-TEST (state) then Return UTILITY (state) Else If MAX is to move in state then Return the highest MINIMAX-VALUE of SUCCESSORS (state) Else Return the lowest MINIMAX-VALUE of SUCCESSORS (state) 11/6/2018 School of Information Technology

School of Information Technology Properties of MINIMAX Complete: Yes, if tree is finite Optimal: Yes, against an optimal opponent. Time: O(bd) (depth- first exploration) Space: O(bd) (depth- first exploration) b: Branching Factor d: Depth of Search Tree Time constraints does not allow the tree to be fully explored. How to get the utility values without exploring search tree up to leaves? 11/6/2018 School of Information Technology

School of Information Technology Evaluation Function Evaluation function or static evaluator is used to evaluate the ‘goodness’ of a game position. The zero-sum assumption allows us to use a single evaluation function to describe the goodness of a position with respect to both players. E.g. f(n) is the evaluation function of the position ‘n’. Then, – f(n) >> 0: position n is good for me and bad for you – f(n) << 0: position n is bad for me and good for you – f(n) near 0: position n is a neutral position 11/6/2018 School of Information Technology

Evaluation Function cont.. One of the evaluation function for Tic- Tac- Toe can be defined as: f( n) = [# of 3- lengths open for me] - [# of 3- lengths open for you] where a 3- length is a complete row, column, or diagonal 11/6/2018 School of Information Technology

School of Information Technology Alpha Beta Pruning At each MAX node n, alpha(n) = maximum value found so far At each MIN node n, beta(n) = minimum value found so far 11/6/2018 School of Information Technology

Alpha Beta Pruning Cont.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Alpha Beta Pruning Cont.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Alpha Beta Pruning Cont.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Alpha Beta Pruning Cont.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Alpha Beta Pruning Cont.. Ref: www.uni-koblenz.de/~beckert/ Lehre/Einfuehrung-KI-SS2003/folien06.pdf 11/6/2018 School of Information Technology

Effectiveness of Alpha Beta Pruning. Worst-Case branches are ordered so that no pruning takes place alpha-beta gives no improvement over exhaustive search Best-Case each player’s best move is the left-most alternative (i.e., evaluated first) In practice often get O(b(d/2)) rather than O(bd) e.g., in chess go from b ~ 35 to b ~ 6 this permits much deeper search in the same amount of time makes computer chess competitive with humans! 11/6/2018 School of Information Technology

Iterative Deepening Search. IDS runs alpha-beta search with an increasing depth-limit The “inner” loop is a full alpha-beta search with a specified depth limit m When the clock runs out we use the solution found at the previous depth limit 11/6/2018 School of Information Technology

School of Information Technology Applications Entertainment Economics Military Political Science 11/6/2018 School of Information Technology

School of Information Technology Conclusion Game theory remained the most interesting part of AI from the birth of AI. Game theory is very vast and interesting topic. It mainly deals with working in the constrained areas to get the desired results. They illustrate several important points about Artificial Intelligence like perfection can not be attained but we can approximate to it.   11/6/2018 School of Information Technology

School of Information Technology References 'Artificial Intelligence: A Modern Approach' (Second Edition) by Stuart Russell and Peter Norvig, Prentice Hall Pub. http://www.cs.umbc.edu/471/notes/pdf/games.pdf http://l3d.cs.colorado.edu/courses/AI-96/sept23glecture.pdf Theodore L. Turocy, Texas A&M University, Bernhard von Stengel, London School of Economics "Game Theory" CDAM Research Report Oct. 2001 http://www.uni-koblenz.de/~beckert/Lehre/Einfuehrung-KI-SS2003/folien06.pdf http://ai-depot.com/LogicGames/MiniMax.html 11/6/2018 School of Information Technology

School of Information Technology Thank you…… 11/6/2018 School of Information Technology