Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Similar documents
Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

CS 331: Artificial Intelligence Adversarial Search II. Outline

Ar#ficial)Intelligence!!

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

CS 4700: Foundations of Artificial Intelligence

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

Artificial Intelligence Adversarial Search

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter , 5.7,5.8

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter Read , Skim 5.7

Pengju

Games and Adversarial Search

Game Playing: Adversarial Search. Chapter 5

CS 188: Artificial Intelligence

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

Adversary Search. Ref: Chapter 5

School of EECS Washington State University. Artificial Intelligence

ARTIFICIAL INTELLIGENCE (CS 370D)

Artificial Intelligence

Artificial Intelligence. Minimax and alpha-beta pruning

Lecture 5: Game Playing (Adversarial Search)

Adversarial Search. CMPSCI 383 September 29, 2011

CS440/ECE448 Lecture 9: Minimax Search. Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017

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

More on games (Ch )

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

CS 5522: Artificial Intelligence II

CS 380: ARTIFICIAL INTELLIGENCE

Programming Project 1: Pacman (Due )

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

Artificial Intelligence

2/5/17 ADVERSARIAL SEARCH. Today. Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning Real-time decision making

Artificial Intelligence

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

Artificial Intelligence 1: game playing

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

Game Playing State-of-the-Art

More on games (Ch )

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

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

CS 188: Artificial Intelligence Spring Announcements

Game playing. Chapter 6. Chapter 6 1

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

Game playing. Outline

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

Adversarial Search and Game Playing

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

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

Game Playing. Philipp Koehn. 29 September 2015

More Adversarial Search

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

ADVERSARIAL SEARCH. Chapter 5

CS 188: Artificial Intelligence

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

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

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

Game-Playing & Adversarial Search

Adversarial search (game playing)

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Theory and Practice of Artificial Intelligence

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

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

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

Artificial Intelligence

Game playing. Chapter 6. Chapter 6 1

CS 188: Artificial Intelligence. Overview

Artificial Intelligence. Topic 5. Game playing

CS 4700: Artificial Intelligence

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

CSE 40171: Artificial Intelligence. Adversarial Search: Game Trees, Alpha-Beta Pruning; Imperfect Decisions

Game playing. Chapter 5. Chapter 5 1

Adversarial Search 1

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

CSE 573: Artificial Intelligence Autumn 2010

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

CS 188: Artificial Intelligence Spring Game Playing in Practice

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

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

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

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

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

Adversarial Search (Game Playing)

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

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

mywbut.com Two agent games : alpha beta pruning

Artificial Intelligence

CSE 473: Artificial Intelligence. Outline

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

CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions

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

Game playing. Chapter 5, Sections 1 6

CS 771 Artificial Intelligence. Adversarial Search

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search

Game Playing AI Class 8 Ch , 5.4.1, 5.5

CS 387/680: GAME AI BOARD GAMES

Adversarial Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA

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

Game Playing State of the Art

Games (adversarial search problems)

Transcription:

Adversarial Search CS 486/686: Introduction to Artificial Intelligence 1

Introduction So far we have only been concerned with a single agent Today, we introduce an adversary! 2

Outline Games Minimax search Alpha-beta pruning Evaluation functions Coping with chance 3

Games Games are the oldest, most well-studied domain in AI Why? - They are fun - Easy to represent, rules are clear - State spaces can be very large - In chess, the search tree has ~10 154 nodes - Like the real world in that decisions have to be made and time is important - Easy to determine when a program is doing well 4

Types of Games Perfect vs Imperfect Information - Perfect information: You can see the entire state of the game - Imperfect information: Deterministic vs Stochastic - Deterministic: change in state is fully controlled by the players - Stochastic: change in state is partially determined by chance 5

Games as Search Problems 2-player perfect information game State: Successor function: Terminal state: Utility function: Solution: 6

Game Search Challenge What makes game search challenging? - There is an opponent - The opponent is malicious - it wants to win (by making you lose) - We need to take this into account when choosing moves Notation: - MAX player wants to maximize its utility - MIN player wants to minimize its utility 7

Example MAX s job is to use the search tree to determine the best move 8

Optimal Strategies In standard search - Optimal solution is sequence of moves leading to a goal state Strategy (from MAX s perspective) - Specify a move for the initial state - Specify a move for all possible states arising from MIN s response - Then all possible responses to all of MIN s responses to MAX s previous moves -... 9

Optimal Strategies Goal: Find optimal strategy What do we mean by optimal? - Strategy that leads to outcomes at least as good as any other strategy, given that MIN is playing optimally - Equilibrium (game theory) Today we focus mainly on zero-sum games of perfect information - Easy games according to game theory 10

Minimax Value MINIMAX-VALUE(n) = Utility(n) if n is a terminal state Max s in Succ(n) MINIMAX-VALUE(s) if n is a MAX node Min s in Succ(n) MINIMAX-VALUE(s) is n is a MIN node ply 11

Properties of Minimax Complete: Time complexity: Space complexity: Optimal: 12

Minimax and Multi-Player Games 13

Question Can we now write a program that will play chess reasonably well? 14

Question Can we now write a program that will play chess reasonably well? For chess b~35 and m~100 15

Alpha-Beta Pruning If we are smart (and lucky) we can do pruning - Eliminate large parts of the tree from consideration Alpha-beta pruning applied to a minimax tree 16

Alpha-Beta Pruding Alpha: - Value of best (highest value) choice we have found so far on path for MAX Beta: - Value of best (lowest value) choice we have found so far on path for MIN Update alpha and beta as search continues Prune as soon as value of current node is known to be worse than current alpha or beta values for MAX or MIN 17

Example MAX MIN 3 12 8 2 30 12 14 5 2 18

Properties of Alpha-Beta Can pruning result in a different outcome than minimax search? How much can be pruned when searching? 19

Real-Time Decisions Alpha-Beta can be a huge improvement over minimax - Still not good enough - Need to search to terminal states for at least part of search space - Need to make decisions quickly Solution - Heuristic evaluation function + cutoff tests 20

Evaluation Functions Apply an evaluation function to a state - If terminal state, function returns actual utility - If non-terminal, function returns estimate of the expected utility Function must be fast to compute 21

Evaluation Functions How do we get evaluation functions? - Expert knowledge - Learned from experience Look for features of states - Weighted linear function Eval(s)= i wifi(s) 22

Cutting Off Search Do we have to search to terminal states? - No! Cut search early and apply evaluation function When? - Arbitrarily (but deeper is better) - Quiescent states - States that are stable - Singular extensions - Searching deeper when you have a move that is clearly better - Can be used to avoid the horizon effect 23

Cutting Off Search How deep? Novice player - 5-ply (minimax) Master player - 10-ply (alpha-beta) Grandmaster - 14-ply + fantastic evaluation function, opening and endgame databases,... 24

Stochastic Games 25

Stochastic Games Need to consider best/worst cases + probability they will occur Recall: Expected value of a random variable x E[x]= x in X P(x)x Expectiminimax: minimax but at chance nodes compute the expected value 26

Expectiminimax 27

Expectiminimax WARNING: exact values do matter! Order-preserving transformations of the evaluation function can change the choice of moves. Must have positive linear transformations only 28

What about Go? 29

What about Go? Monte-Carlo Tree Search (MCTS) - Build search tree according to outcomes of simulated plays Upper Confidence Bounds for Trees (UCT): Minimax search using UCB 30

Summary Games pose lots of fascinating challenges for AI researchers Minimax search allows us to play optimally against an optimal opponent Alpha-beta pruning allows us to reduce the search space A good evaluation function is key to doing well Games are fun! 31