1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.

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.
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.
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
Adversarial Search Chapter 6 Section 1 – 4. Warm Up Let’s play some games!
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.
COMP-4640: Intelligent & Interactive Systems Game Playing A game can be formally defined as a search problem with: -An initial state -a set of operators.
Adversarial Search CSE 473 University of Washington.
Adversarial Search Chapter 6.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Artificial Intelligence for Games Game playing Patrick Olivier
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
EIE426-AICV 1 Game Playing Filename: eie426-game-playing-0809.ppt.
G51IAI Introduction to AI Minmax and Alpha Beta Pruning Garry Kasparov and Deep Blue. © 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.
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.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
Adversarial Search: Game Playing Reading: Chess paper.
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”
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
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Game Playing.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
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.
Games 1 Alpha-Beta Example [-∞, +∞] Range of possible values Do DF-search until first leaf.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
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.
Artificial Intelligence
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search Adversarial Search (game playing search) We have experience in search where we assume that we are the only intelligent being and we.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
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.
Game Playing Why do AI researchers study game playing?
Stochastic tree search and stochastic games
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
Adversarial Search Chapter 5.
Dakota Ewigman Jacob Zimmermann
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

1 Chapter 6 Game Playing

2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead l Alpha-beta pruning l Checkers

3 Chapter 6 Contents (2) l Chess l Go l Games of chance

4 Game Trees l Game trees are used to represent two- player games. l Alternate moves in the game are represented by alternate levels in the tree (plies). l Nodes in the tree represent positions. l Edges between nodes represent moves. l Leaf nodes represent won, lost or drawn positions. l For most games, the game tree can be enormous.

5 Game Trees This is an example of a partial game tree for the game tic-tac-toe. Even for this simple game, the game tree is very large.

6 Assumptions l In talking about game playing systems, we make a number of assumptions: nThe opponent is rational – will play to win. nThe game is zero-sum – if one player wins, the other loses. nUsually, the two players have complete knowledge of the game. For games such as poker, this is clearly not true.

7 Static Evaluation Functions l Since game trees are too large to be fully searched, it is important to have a function to statically evaluate a given position in the game. l A static evaluator assigns a score to a position: nHigh positive = computer is winning nZero = even game nHigh negative = opponent is winning l It is most important that a static evaluator will give a better score to a better position – the actual values are not so important.

8 Searching Game Trees l Exhaustively searching a game tree is not usually a good idea. l Even for a game as simple as tic-tac-toe there are over 350,000 nodes in the complete game tree. l An additional problem is that the computer only gets to choose every other path through the tree – the opponent chooses the others.

9 Minimax l Minimax is a method used to evaluate game trees. l A static evaluator is applied to leaf nodes, and values are passed back up the tree to determine the best score the computer can obtain against a rational opponent.

10 Minimax – Animated Example Max Min Max The computer can obtain 6 by choosing the right hand edge from the first node.

11 Bounded Lookahead l For trees with high depth or very high branching factor, minimax cannot be applied to the entire tree. l In such cases, bounded lookahead is applied: nWhen search reaches a specified depth, the search is cut off, and the static evaluator applied. l Must be applied carefully: In some positions a static evaluator will not take into account significant changes that are about to happen.

12 Alpha-beta Pruning l A method that can often cut off a large part of the game tree. l Based on the idea that if a move is clearly bad, there is no need to follow the consequences of it.

13 Alpha-beta Pruning – Example. l In this tree, having examined the nodes with values 7 and 1 there is no need to examine the final node.

14 Alpha-beta Pruning – Better Ex a b c de f g max min max

15 Checkers l In 1959, Arthur Samuel published a paper in which he described a computer program that could play checkers to a high level using minimax and alpha-beta pruning. l Chinook, developed in Canada defeated the world champion: nUses alpha-beta pruning. nHas a database of millions of end games. nAlso has a database of openings. nUses heuristics and knowledge about the game.

16 Chess l In 1997, Deep Blue defeated world champion, Garry Kasparov. l This has not yet been repeated. l Current systems use parallel search, alpha-beta pruning, databases of openings and heuristics. l The deeper in a search tree the computer can search, the better it plays.

17 Go l Go is a complex game played on a 19x19 board. l Average branching factor in search tree around 360 (compared to 38 for chess). l The best computer programs cannot compete yet with the best human players. l Methods use pattern matching or selective search to explore the most appropriate parts of the search tree.

18 Games of Chance l The methods described so far do not work well with games of chance such as poker or backgammon. l Expectiminimax is a variant of minimax designed to deal with chance. l Nodes have expected values based on probabilities.

19 Games of Chance, Example MAX CHANCE MIN