CSE 473: Artificial Intelligence. Outline

Similar documents
CSE 573: Artificial Intelligence

CSE 473: Artificial Intelligence Fall Outline. Types of Games. Deterministic Games. Previously: Single-Agent Trees. Previously: Value of a State

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

CS 188: Artificial Intelligence

Game Playing State-of-the-Art

Artificial Intelligence

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

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

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

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

CS 5522: Artificial Intelligence II

Game Playing State of the Art

Programming Project 1: Pacman (Due )

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

Adversarial Search Lecture 7

CS 188: Artificial Intelligence Spring Announcements

Artificial Intelligence

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

CSE 473: Ar+ficial Intelligence

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

CS 188: Artificial Intelligence. Overview

CSE 573: Artificial Intelligence Autumn 2010

CS 188: Artificial Intelligence Spring Game Playing in Practice

Game playing. Chapter 5. Chapter 5 1

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

CS 188: Artificial Intelligence

Announcements. CS 188: Artificial Intelligence Fall Today. Tree-Structured CSPs. Nearly Tree-Structured CSPs. Tree Decompositions*

Game Playing: Adversarial Search. Chapter 5

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

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

Adversarial Search 1

Game playing. Chapter 6. Chapter 6 1

Artificial Intelligence

Lecture 5: Game Playing (Adversarial Search)

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

CS 188: Artificial Intelligence Spring 2007

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 4: Search 3.

Game playing. Chapter 5, Sections 1 6

Game Playing State-of-the-Art. CS 188: Artificial Intelligence. Behavior from Computation. Adversarial Games. Deterministic Games.

CS 188: Artificial Intelligence

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

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

CS 380: ARTIFICIAL INTELLIGENCE

Artificial Intelligence. Topic 5. Game playing

Game Playing. Philipp Koehn. 29 September 2015

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

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

CSE 473: Artificial Intelligence Autumn 2011

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

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

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

Artificial Intelligence Adversarial Search

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

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

Game playing. Outline

Adversarial Search. CMPSCI 383 September 29, 2011

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

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

CS 771 Artificial Intelligence. Adversarial Search

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

Game-Playing & Adversarial Search

Adversarial search (game playing)

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

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

Game-playing: DeepBlue and AlphaGo

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

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

School of EECS Washington State University. Artificial Intelligence

Intuition Mini-Max 2

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

Adversarial Search and Game Playing

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

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

Artificial Intelligence. Minimax and alpha-beta pruning

Foundations of Artificial Intelligence

ADVERSARIAL SEARCH. Chapter 5

Adversarial Search (a.k.a. Game Playing)

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

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

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

Game-Playing & Adversarial Search Alpha-Beta Pruning, etc.

Games (adversarial search problems)

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

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

Adversarial Search (Game Playing)

CS 331: Artificial Intelligence Adversarial Search II. Outline

Games and Adversarial Search

6. Games. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Mechanical Turk. Origins. origins. motivation. minimax search

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

CSEP 573 Adversarial Search & Logic and Reasoning

ARTIFICIAL INTELLIGENCE (CS 370D)

Game Playing AI Class 8 Ch , 5.4.1, 5.5

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

CS 4700: Foundations of Artificial Intelligence

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

Path Planning as Search

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

Transcription:

CSE 473: Artificial Intelligence Adversarial Search Dan Weld Based on slides from Dan Klein, Stuart Russell, Pieter Abbeel, Andrew Moore and Luke Zettlemoyer (best illustrations from ai.berkeley.edu) 1 Adversarial Search Minimax search α-β search Evaluation functions Expectimax Outline Reminder: Project 2 due in 7 days 1

Game Playing State-of-the-Art 1994: Checkers. Chinook ended 40-year-reign of human world champion Marion Tinsley. Used search plus an endgame database defining perfect play for all positions involving 8 or fewer pieces on the board, a total of 443,748,401,247 positions. Checkers is now solved! Game Playing State-of-the-Art 1997: Chess. Deep Blue defeated human world champion Gary Kasparov in a six-game match. Deep Blue examined 200 million positions per second, used very sophisticated evaluation and undisclosed methods for extending some lines of search up to 40 ply. Current programs are even better, if less historic. 2

Game Playing State-of-the-Art Go: b > 300! Programs use monte carlo tree search + pattern KBs 2015: AlphaGo beats European Go champion Fan Hui (2 dan) 5-0 2016: AlphaGo beats Lee Sedol (9 dan) 4-1 Game Playing State-of-the-Art Othello: Human champions refuse to compete against computers. 3

Game Playing State-of-the-Art Pacman: unknown Types of Games stratego Number of Players? 1, 2,? 4

Deterministic Games Many possible formalizations, one is: States: S (start at s 0 ) Players: P={1...N} (usually take turns) Actions: A (may depend on player / state) Transition Function: S x A à S Terminal Test: S à {t,f} Terminal Utilities: S x Pà R Solution for a player is a policy: S à A Previously: Single-Agent Trees Slide from Dan Klein & Pieter Abbeel - ai.berkeley.edu 5

Previously: Value of a State Value of a state: The best achievable outcome (utility) from that state Non-Terminal States: 8 2 0 2 6 4 6 Terminal States: Slide from Dan Klein & Pieter Abbeel - ai.berkeley.edu Adversarial Game Trees -20-8 -18-5 -10 +4-20 +8 Slide adapted from Dan Klein & Pieter Abbeel - ai.berkeley.edu 6

Minimax Values States Under Agent s Control: States Under Opponent s Control: -8-5 Terminal States: -10 + 8 Slide from Dan Klein & Pieter Abbeel - ai.berkeley.edu Adversarial Search (Minimax) Deterministic, zero-sum games: Tic-tac-toe, chess, checkers One player maximizes result The other minimizes result Minimax search: A state-space search tree Players alternate turns Compute each node s minimax value: the best achievable utility against a rational (optimal) adversary Minimax values: computed recursively 5 max 2 5 8 2 5 6 Terminal values: part of the game min Slide from Dan Klein & Pieter Abbeel - ai.berkeley.edu 7

Minimax Implementation Need Base case for recursion def max-value(state): initialize v = - for each c in children(state) v = max(v, min-value(c)) def min-value(state): initialize v = + for each c in children(state) v = min(v, max-value(c)) Slide from Dan Klein & Pieter Abbeel - ai.berkeley.edu Concrete Minimax Example max min 8

Minimax Example max A 1 min Quiz Max: Min: 9 1 8 5 4 3 2 7 8 9

Answer Max: 3 Min: 1 3 2 9 1 8 5 4 3 2 7 8 Minimax Properties Optimal? Yes, against perfect player. Otherwise? Time complexity? O(b m ) Space complexity? O(bm) max min For chess, b ~ 35, m ~ 100 Exact solution is completely infeasible But, do we need to explore the whole tree? 10 10 9 100 10

Do We Need to Evaluate Every Node? Max: Min: Do We Need to Evaluate Every Node? Max: ³3 Min: 3 Progress of search 11

a-b Pruning Example Max: ³3 Min: 3 2 Progress of search a-b Pruning General configuration a is MAX s best choice on path to root If n becomes worse than a, MAX will avoid it, so can stop considering n s other children Define b similarly for MIN Player Opponent Player Opponent α n 12

Min-Max Implementation def max-val(state ): initialize v = - for each c in children(state): v = max(v, min-val(c )) def min-val(state ): initialize v = + for each c in children(state): v = min(v, max-val(c )) Slide adapted from Dan Klein & Pieter Abbeel - ai.berkeley.edu Alpha-Beta Implementation α: MAX s best option on path to root β: MIN s best option on path to root def max-val(state, α, β): initialize v = - for each c in children(state): v = max(v, min-val(c, α, β)) def min-val(state, α, β): initialize v = + for each c in children(state): v = min(v, max-val(c, α, β)) Slide adapted from Dan Klein & Pieter Abbeel - ai.berkeley.edu 13

Alpha-Beta Implementation α: MAX s best option on path to root β: MIN s best option on path to root def max-val(state, α, β): initialize v = - for each c in children(state): v = max(v, min-val(c, α, β)) if v β α = max(α, v) def min-val(state, α, β): initialize v = + for each c in children(state): v = min(v, max-val(c, α, β)) if v α β = min(β, v) Slide adapted from Dan Klein & Pieter Abbeel - ai.berkeley.edu 14