Artificial Intelligence Search III

Similar documents
2 person perfect information

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

Today. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence. Topic 5. Game playing

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

Programming Project 1: Pacman (Due )

Artificial Intelligence. Minimax and alpha-beta pruning

Adversarial Search. CMPSCI 383 September 29, 2011

Adversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I

Adversarial Search (Game Playing)

Foundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13

Games CSE 473. Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie!

CS 771 Artificial Intelligence. Adversarial Search

CS 188: Artificial Intelligence Spring Game Playing in Practice

CS 188: Artificial Intelligence Spring 2007

Adversarial search (game playing)

Artificial Intelligence Adversarial Search

CPS331 Lecture: Search in Games last revised 2/16/10

CS 188: Artificial Intelligence

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

Foundations of Artificial Intelligence

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Adversarial Search Aka Games

Foundations of Artificial Intelligence

CS 331: Artificial Intelligence Adversarial Search II. Outline

Adversarial Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 9 Feb 2012

Foundations of AI. 6. Board Games. Search Strategies for Games, Games with Chance, State of the Art

CS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH. Santiago Ontañón

Outline. Game Playing. Game Problems. Game Problems. Types of games Playing a perfect game. Playing an imperfect game

Game playing. Chapter 5, Sections 1{5. AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 5, Sections 1{5 1

CS 188: Artificial Intelligence Spring Announcements

Game playing. Chapter 5. Chapter 5 1

Game-Playing & Adversarial Search

Adversarial Search and Game Playing

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

CS 5522: Artificial Intelligence II

CSE 573: Artificial Intelligence Autumn 2010

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

CS 380: ARTIFICIAL INTELLIGENCE

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

Game Playing. Philipp Koehn. 29 September 2015

Game Playing State-of-the-Art

CS 188: Artificial Intelligence

Last update: March 9, Game playing. CMSC 421, Chapter 6. CMSC 421, Chapter 6 1

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters

Game Playing: Adversarial Search. Chapter 5

Outline. Game playing. Types of games. Games vs. search problems. Minimax. Game tree (2-player, deterministic, turns) Games

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5

Intuition Mini-Max 2

Game playing. Outline

CS 188: Artificial Intelligence. Overview

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

Local Search. Hill Climbing. Hill Climbing Diagram. Simulated Annealing. Simulated Annealing. Introduction to Artificial Intelligence

Announcements. CS 188: Artificial Intelligence Fall Local Search. Hill Climbing. Simulated Annealing. Hill Climbing Diagram

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games

Adversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

Adversarial Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA CS188 UC Berkeley

Game Playing. Why do AI researchers study game playing? 1. It s a good reasoning problem, formal and nontrivial.

Game Playing. Dr. Richard J. Povinelli. Page 1. rev 1.1, 9/14/2003

Ar#ficial)Intelligence!!

Game playing. Chapter 6. Chapter 6 1

Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA

Artificial Intelligence

Games vs. search problems. Game playing Chapter 6. Outline. Game tree (2-player, deterministic, turns) Types of games. Minimax

Game playing. Chapter 6. Chapter 6 1

ARTIFICIAL INTELLIGENCE (CS 370D)

Contents. Foundations of Artificial Intelligence. Problems. Why Board Games?

Game Playing State-of-the-Art. CS 188: Artificial Intelligence. Behavior from Computation. Video of Demo Mystery Pacman. Adversarial Search

Adversary Search. Ref: Chapter 5

Adversarial Search: Game Playing. Reading: Chapter

Adversarial Search Lecture 7

Announcements. Homework 1. Project 1. Due tonight at 11:59pm. Due Friday 2/8 at 4:00pm. Electronic HW1 Written HW1

Game Playing AI. Dr. Baldassano Yu s Elite Education

Ch.4 AI and Games. Hantao Zhang. The University of Iowa Department of Computer Science. hzhang/c145

Adversarial Search. Chapter 5. Mausam (Based on slides of Stuart Russell, Andrew Parks, Henry Kautz, Linda Shapiro, Diane Cook) 1

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

Game Playing State of the Art

Artificial Intelligence

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Game playing. Chapter 5, Sections 1 6

Artificial Intelligence

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1

Games vs. search problems. Adversarial Search. Types of games. Outline

Adversarial Search. Chapter 5. Mausam (Based on slides of Stuart Russell, Andrew Parks, Henry Kautz, Linda Shapiro) 1

Lecture 5: Game Playing (Adversarial Search)

CSE 40171: Artificial Intelligence. Adversarial Search: Games and Optimality

Game Playing Beyond Minimax. Game Playing Summary So Far. Game Playing Improving Efficiency. Game Playing Minimax using DFS.

Games (adversarial search problems)

Artificial Intelligence Lecture 3

Artificial Intelligence

Games and Adversarial Search II

Games and Adversarial Search

Game-playing: DeepBlue and AlphaGo

More Adversarial Search

Transcription:

Artificial Intelligence Search III Lecture 5 Content: Search III Quick Review on Lecture 4 Why Study Games? Game Playing as Search Special Characteristics of Game Playing Search Ingredients of 2-Person Games Normal and Game Search Problem A Game Tree for Naughts and Crosses A Perfect Decision Strategy Based on Minimaxing The Need for Imperfect Decision Assigning Utilities: Evaluation Functions When to Cut Search Chess Positions Alpha - Beta Pruning State of the Art in Checkers, Backgammon, Go & Chess What s in Store for Lecture 6 2

Quick Review on Lecture 5 Constrained Satisfaction Search Heuristics for an 8-puzzle problem Heuristic Search Methods Definition of a Heuristic Function Best First Search An example - Sliding Tiles Greedy Search A* Search 3 Class Activity 1: A* Search Workout for Romania Map Figure 6.1 Map of Romania with road distances in km, and straight-line distances to Bucharest. h SLD (n) = straight-line distance between n and the goal location. 4

Class Activity 1: A* Search Workout for Romania Map (cont) Search Method Path Depth No. of Nodes involved Optimal Solution A S R F B - - Depth First Search (DFS) A Z O S R P B 6 7 Breadth First Search (BFS) A Z S T O F R L B 3 9 Bi-directional Search (BDS) A S F B 2 12 Uniform Cost Search (UCS) A S F B 3 8 Greedy Search (GS) A S F B 3 9 A* Search (AS) 5 Why Study Games? Games offer: Intellectual Engagement Abstraction Representability Performance Measure Not all games are suitable for AI research. We will restrict ourselves to 2 person perfect information board games. 6

Game Playing as Search Playing a game involves searching for the best move. Board games clearly involve notions like start state, goal state, operators, etc. We can this usefully import problem solving techniques that we have already met. There are nevertheless important differences from standard search problems. 7 Special Characteristics of Game Playing Search Main differences are uncertainties introduced by Presence of an opponent. One do not know what the opponent will do until he/she does it. Game playing programs must solve the contingency problem. Complexity. Most interesting games are simply too complex to solve by exhaustive means. Chess, for example, has an average branching factor of 35. Uncertainty also arises from not having the resources to compute a move which is guaranteed to be the best. 8

Ingredients of 2-Person Games Players: We call them Max and Min. Initial State: Includes board position and whose turn it is. Operators: These correspond to legal moves. Terminal Test: A test applied to a board position which determines whether the game is over. In chess, for example, this would be a checkmate or stalemate situation. Utility Function: A function which assigns a numeric value to a terminal state. For example, in chess the outcome is win (+1), lose (-1) or draw (0). Note that by convention, we always measure utility relative to Max. 9 Normal and Game Search Problem Normal search problem: Max searches for a sequence of moves yielding a winning position and then makes the first move in the sequence. Game search problem: Clearly, this is not feasible in in a game situation where Min's moves must be taken into consideration. Max must devise a strategy which leads to a winning position no matter what moves Min makes. 10

A Game Tree for Naughts and Crosses 11 A Perfect Decision Strategy Based on Minimaxing 1. Generate the whole game tree. 2. Apply the utility function to leaf nodes to get their values. 3. Use the utility of nodes at level n to derive the utility of nodes at level n-1. 4. Continue backing up values towards the root (one layer at a time). 5. Eventually the backed up values reach the top of the tree, at which point Max chooses the move that yields the highest value. This is called the minimax decision because it maximises the utility for Max on the assumption that Min 12 will play perfectly to minimise it.

The Need for Imperfect Decision Problem: Minimax assumes the program has time to search to the terminal nodes Solution: Cut off search earlier and apply a heuristic evaluation function to the leaves. 13 Assigning Utilities: Evaluation Functions In chess, evaluation function might be based on Material: pawn=1, bishop=3, knight=3, rook=5, queen=9 Position: (1) pawns on final rank, (2) check next move (3) fork next move (4) etc. Weighted linear evaluation function e = w 1 f 1 + w 2 f 2 +... + w n f n where f is some feature and w is a weighting that biases the contribution of that feature to the final score. 14

When to Cut Search Depth Limit: don't search beyond a given depth. Iterative Deepening: Stop search after a given time (i.e. time is up when resources run out). Assume: (1) 1000 positions/second (2) Branching Factor 35 (3) 150 seconds/move (tournament play) N = B d Max effective ply lookahead = 3-4 15 Chess Positions (a) White to move *Fairly even* (b) Black to move *White slightly better* (c) White to move *Black winning* 16

Chess Positions (cont) (d) Black to move *White about to lose* (d) Black to move 17 Alpha - Beta Pruning Alpha-beta pruning is a technique that enables the Minimax algorithm to ignore branches that will not contribute further to the outcome of the search. 18

State of the Art in Checkers 1952: Samuel developed a checkers program that learn its own evaluation function through self play. 1992: Chinook (J. Schaeffer) wins the U.S. Open. At the world championship, Marion Tinsley beat Chinook. Alpha-beta search were used. 19 State of the Art in Backgammon The inclusion of uncertainty from dice rolls makes search an expensive luxury. 1980: BKG using one-ply search and lots of luck defeated the human world champion. 1992: Tesauro combines Samuel's learning method with neural networks to develop a new evaluation function, resulting in a program ranked among the top 3 players in the world. 20

State of the Art in Go The branching factor approaches 360, infeasible for regular search methods. $2,000,000 prize available for first computer program to defeat a top level player. Go seems like an area likely to benefit from intensive research using sophisticated reasoning methods 21 State of the Art in Chess Chess has received by far the largest share of attention in game playing. Progress beyond a mediocre level was initially very slow 1970: First program to win ACM North American Computer Chess Championship, it uses straightforward alpha-beta search, augmented with book openings and infallible end game algorithms. 22

State of the Art in Chess (cont) 1982: Belle, first special-purpose chess computer, can search few million of position per move. 1985: Hitech, ranked among the top 800 human players around the world, can search 10 million of position per move. 1993: Deep Thought 2, ranked top 100 human players, can search 500 million of position per move, reaching a depth of 11. 23 State of the Art in Chess (cont) 1997: Deep Blue, ranked top human player? Can search 1 billion of position per move, reaching a depth of 14. Beat Chess master Gary Kasparov during the last match. Program Strength Graph, as measured by the US Chess Federation s rating scale. Gary Kasparov is rated at 2600. 24

What s in Store for Lecture 6 Knowledge Representation 25 End of Lecture 5 Good Day.