CSCI 4310 Lecture 6: Adversarial Tree Search. Book Winston Chapter 6.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
Games & Adversarial Search
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
1 CSC 550: Introduction to Artificial Intelligence Fall 2008 search in game playing  zero-sum games  game trees, minimax principle  alpha-beta pruning.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Artificial Intelligence in Game Design
This time: Outline Game playing The minimax algorithm
Lecture 02 – Part C Game Playing: Adversarial Search
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
Game Playing CSC361 AI CSC361: Game Playing.
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)
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Chap. 6 [AIMA] Chang-Sheng Chen.
How computers play games with you CS161, Spring ‘03 Nathan Sturtevant.
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”
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.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
CISC 235: Topic 6 Game Trees.
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 Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing.
AD FOR GAMES Lecture 4. M INIMAX AND A LPHA -B ETA R EDUCTION Borrows from Spring 2006 CS 440 Lecture Slides.
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.
For Wednesday Read Weiss, chapter 12, section 2 Homework: –Weiss, chapter 10, exercise 36 Program 5 due.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
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.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
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.
Quiz 4 : Minimax Minimax is a paranoid algorithm. True
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.
CSE473 Winter /04/98 State-Space Search Administrative –Next topic: Planning. Reading, Chapter 7, skip 7.3 through 7.5 –Office hours/review after.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
CSE373: Data Structures & Algorithms Lecture 23: Intro to Artificial Intelligence and Game Theory Based on slides adapted Luke Zettlemoyer, Dan Klein,
Game tree search Thanks to Andrew Moore and Faheim Bacchus for slides!
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search. Game playing u Multi-agent competitive environment u The most common games are deterministic, turn- taking, two-player, zero-sum game.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
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.
CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
PENGANTAR INTELIJENSIA BUATAN (64A614)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Artificial Intelligence
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Artificial Intelligence
Adversarial Search CS 171/271 (Chapter 6)
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

CSCI 4310 Lecture 6: Adversarial Tree Search

Book Winston Chapter 6

Adversaries Many games involve two players Competing Agents Previous Trees were exploring search space

Adversaries Now, alternating levels of the tree represent each player P 1 decision P 2 decision P 1 decision

Adversaries Making choices based on scoring function for each node Ideally, fully expand the tree, follow the choice that leads you to the best subtree

Adversaries A completed game

Scoring path outcomes Domain specific We need expert advice Tic-tac-toe is easy Maximize winning possibilities X This position has a score of 3 for X

Scoring path outcomes Other games can become much more difficult or no apparent best strategy. X This position has a score of 4 for X

Scoring path outcomes Tuning parameters are important Piece count – often underperforms Not effective in chess, unless you are playing against a chimp Positional strategy – more involved Works well in Othello Moriarty paper on NN Othello play Computers crush the best human Othello players

Scoring path outcomes Make it fast – we will do this often Every potential game (along a path we have not pruned) will need to be evaluated by score function

Minimax P 1 is maximizing Maximizer (p1) must take p2’s decisions into account Min = 2Min = 1 P 1 decision - MAX P 2 decision - MIN P 1 decision - MAX s g1 =2s g2 =7s g3 =1s g4 =8

Minimax In practice, we limit the search depth Assuming, if we are p max, other player will minimize Can lead to poor play against poor players Assuming (if I am maximizing) that the opponent is minimizing is sometimes risky

Zugzwang from wikipediawikipedia A situation where someone is forced to act, but would prefer not to. In chess, zugzwang occurs when one player is put at a disadvantage because he has to make a move.

 -  pruning We do not need to evaluate every possibility to the leaves of the tree Book: If you have an idea that is surely bad, do not take time to see how truly awful it is

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL 872 DFS starts by exploring leftmost child of each node Scoring function assigns values to children

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL 872 Maximizer will choose 8 at this node

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL This is already better for maximizer than the 8 of the sibling nodes. But…

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL The minimizer will never choose this path over the 8. We need not score these nodes

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Minimizer one level above only cares if this is < 8.

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL It is - after the first node (value = 2), so we proceed Minimizer will choose 4 here – will maximizer at root?

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL We need to score the leftmost branch of the center subtree for a baseline

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Once we hit 9, minimizer at level above will never choose this node – no need to evaluate siblings

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Minimizer one level above wants a max of 4 from the children of this node

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Oops – we can ignore siblings

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Oops – we can ignore siblings

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Maximizer at root wants ≥ 6, which means…

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Minimum of these siblings must be ≥ 6 Which means…

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Maximum of these groups must be ≥ 6 Didn’t work, so…

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Discontinue further evaluation

 -  pruning MAX LEVEL MIN LEVEL MAX LEVEL Maximizer will follow middle path. Alpha-Beta prunes 11/27 40% This minimax search is evaluating 3 levels

 -  pruning Effectiveness of alpha-beta pruning dependent on the ordering of successor nodes in the minimax DFS. We can get lucky from the perspective of min or max.

 -  pruning If we manage to get the perfect ordering of successors Minimax O(b d ) Branching factor b Search depth d Minimax with alpha-beta Ideal branching factor  b O(b d/2 ) perfect O(b 3d/4 ) realistic Computational savings may allow larger d in simulations

 -  pruning Recursive algorithm on p. 110 Or, a nice explanation with application to Othello Or, a nice explanation with application to Othello

Horizon effect Not seeing the big picture Going for quick points may lead to a state that was worse than the original even with the extra points We did not search deep enough Did not have time

Horizon effect Problem occurs in many algorithms Attempting to avoid local optima may be considered the defining characteristic of many algorithms Neural networks can be overtrained GA’s can converge too soon Greedy search problems Etc.

Horizon effect P. 114 describes heuristics that attempt to mitigate the horizon effect

McAllester’s conspiracy number Nodes that, if changed, could cause different choices higher in the search are expanded for further evaluation David Allen McAllester, Conspiracy numbers for min-max search, Artificial Intelligence, v.35 n.3, p , July 1988