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

Similar documents
Artificial Intelligence

CS 188: Artificial Intelligence

Game Playing State-of-the-Art

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

CS 5522: Artificial Intelligence II

CSE 473: Artificial Intelligence. Outline

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

Programming Project 1: Pacman (Due )

Game Playing State of the Art

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

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

CS 188: Artificial Intelligence Spring Announcements

CSE 473: Ar+ficial Intelligence

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

Adversarial Search Lecture 7

CS 188: Artificial Intelligence

CSE 573: Artificial Intelligence

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

CS 188: Artificial Intelligence Spring Game Playing in Practice

CS 188: Artificial Intelligence. Overview

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

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

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

CS 771 Artificial Intelligence. Adversarial Search

Lecture 5: Game Playing (Adversarial Search)

Artificial Intelligence Adversarial Search

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

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

CSE 573: Artificial Intelligence Autumn 2010

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

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

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

CS 188: Artificial Intelligence

Game Playing: Adversarial Search. Chapter 5

Adversarial Search 1

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

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

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

CS 188: Artificial Intelligence Spring 2007

Game playing. Chapter 5. Chapter 5 1

CS 380: ARTIFICIAL INTELLIGENCE

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

Game playing. Chapter 5, Sections 1 6

Game-Playing & Adversarial Search

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

Game playing. Chapter 6. Chapter 6 1

Adversarial Search and Game Playing

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

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence. Topic 5. Game playing

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

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

Game playing. Outline

Artificial Intelligence

Game Playing. Philipp Koehn. 29 September 2015

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

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.

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

CSE 473: Artificial Intelligence Autumn 2011

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

Adversarial search (game playing)

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

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

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

CS 331: Artificial Intelligence Adversarial Search II. Outline

Artificial Intelligence. Minimax and alpha-beta pruning

ARTIFICIAL INTELLIGENCE (CS 370D)

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

School of EECS Washington State University. Artificial Intelligence

Games (adversarial search problems)

Artificial Intelligence Search III

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

Artificial Intelligence

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

CS510 \ Lecture Ariel Stolerman

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

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

Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence

Games and Adversarial Search

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

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

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

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

Adversarial Search: Game Playing. Reading: Chapter

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

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

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

Path Planning as Search

Adversarial Search (Game Playing)

Games and Adversarial Search II

Foundations of Artificial Intelligence

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

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

Game-playing: DeepBlue and AlphaGo

Transcription:

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

What is a game?

Game Playing State-of-the-Art Checkers: 1950: First computer player. 1994: First computer champion: Chinook ended 40-year-reign of human champion Marion Tinsley using complete 8-piece endgame. 2007: Checkers solved! Chess: 1997: Deep Blue defeats human champion Gary Kasparov in a six-game match. Deep Blue examined 200M 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. Go: 2016: AlphaGo, a deep learning-based system, beat Lee Sedol, a 9-dan professional without handicaps, in a five game match. The win was a major milestone in data driven approaches to game playing. Pacman Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Behavior from Computation Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188 Adversarial Games

Types of Games Many different kinds of games! Axes: Deterministic or stochastic? One, two, or more players? Zero sum? Perfect information (can you see the state)? Want algorithms for calculating a strategy (policy) which recommends a move from each state Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Formal Elements of a Game S0: the initial state, which specifies how the game is set up at the start PLAYER(s): Defines which player has the move in a state ACTIONS(s): Returns the set of legal moves in a state RESULT(s, a): the transition model, which defines the result of a move

Formal Elements of a Game TERMINAL-TEST(s): a terminal test, which is true when the game is over and false otherwise. States where the game has ended are called terminal states. UTILITY(s, p): a utility function (a.k.a. objective or payoff function) defines the final numeric value for a game that ends in terminal state s for a player p.

Zero-Sum Games Agents have opposite utilities (values on outcomes) Lets us think of a single value that one maximizes and the other minimizes Adversarial, pure competition Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

General Games Agents have independent utilities (values on outcomes) Cooperation, indifference, competition, and more are all possible More later on non-zero-sum games

Two Players MAX Moves first High values are good for MAX MIN Moves after MAX High values are bad for MIN

Image credit: Russell and Norvig Game Trees

Optimal Decisions in Games

What is different about this compared to basic search?

Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188 Adversarial Search

Single-Agent Trees 8 2 0 2 6 4 6 Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

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 credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Adversarial Game Trees -20-8 -18-5 -10 +4-20 +8 Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Minimax Values States Under Agent s Control: States Under Opponent s Control: -8-5 -10 +8 Terminal States: Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Adversarial Search (Minimax) 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 credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Minimax Implementation def min-value(state): initialize v = + for each successor of state: v = min(v, max-value(successor)) return v def max-value(state): initialize v = - for each successor of state: v = max(v, min-value(successor)) return v

Minimax Implementation (Dispatch) def value(state): if the state is a terminal state: return the state s utility if the next agent is MAX: return max-value(state) if the next agent is MIN: return min-value(state) def max-value(state): initialize v = - for each successor of state: v = max(v, minvalue(successor)) return v def min-value(state): initialize v = + for each successor of state: v = min(v, maxvalue(successor)) return v Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Minimax Example 3 12 8 2 4 6 14 5 2

Minimax Efficiency How efficient is minimax? Just like (exhaustive) DFS Time: O(b m ) Space: O(bm) Example: For chess, b 35, m 100 Exact solution is completely infeasible But, do we need to explore the whole tree? Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Minimax Properties max min 10 10 9 100 Optimal against a perfect player. Otherwise? Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Minmax Demo

But we have two of these guys what do we do?

Image credit: Russell and Norvig Multi-player Games

Multi-player Games x Now what if A and B begin to collaborate? Image credit: Russell and Norvig

Multi-player Games Diplomacy: Game 1 - Round 1 BY-SA 2.0 condredge