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

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

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

ARTIFICIAL INTELLIGENCE (CS 370D)

Adversarial Search: Game Playing. Reading: Chapter

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

Adversarial Search 1

Game-Playing & Adversarial Search

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

Adversarial Search (Game Playing)

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

CS 771 Artificial Intelligence. Adversarial Search

Adversarial Search. CMPSCI 383 September 29, 2011

Artificial Intelligence. Minimax and alpha-beta pruning

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

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

Game-playing AIs: Games and Adversarial Search I AIMA

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

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

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Programming Project 1: Pacman (Due )

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

Artificial Intelligence Adversarial Search

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

game tree complete all possible moves

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

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 Aka Games

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

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

Adversarial search (game playing)

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

2 person perfect information

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

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

Adversary Search. Ref: Chapter 5

Games (adversarial search problems)

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

Artificial Intelligence. Topic 5. Game playing

Game Playing State-of-the-Art

Game playing. Chapter 5. Chapter 5 1

Adversarial Search and Game Playing

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

CS 5522: Artificial Intelligence II

Artificial Intelligence 1: game playing

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

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

Artificial Intelligence

CS 188: Artificial Intelligence

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

CS 188: Artificial Intelligence Spring Announcements

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

CS 4700: Foundations of Artificial Intelligence

Game Playing. Philipp Koehn. 29 September 2015

ADVERSARIAL SEARCH. Chapter 5

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

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Game playing. Chapter 5, Sections 1 6

CSE 473: Artificial Intelligence. Outline

Game playing. Outline

CSE 573: Artificial Intelligence Autumn 2010

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

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

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

Adversarial Search Lecture 7

CS 380: ARTIFICIAL INTELLIGENCE

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

CS 188: Artificial Intelligence Spring 2007

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

Lecture 5: Game Playing (Adversarial Search)

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

Artificial Intelligence

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

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

Game playing. Chapter 6. Chapter 6 1

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

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

CS 331: Artificial Intelligence Adversarial Search II. Outline

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

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

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

COMP9414: Artificial Intelligence Adversarial Search

Game Playing AI. Dr. Baldassano Yu s Elite Education

Artificial Intelligence

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

CS 188: Artificial Intelligence

Computer Game Programming Board Games

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

Ar#ficial)Intelligence!!

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

Artificial Intelligence

Games and Adversarial Search

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

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

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

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

CS 188: Artificial Intelligence. Overview

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

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

Transcription:

ADVERSARIAL SEARCH Today Reading AIMA Chapter 5.1-5.5, 5.7,5.8 Goals Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning (Real-time decisions) 1

Questions to ask Were there any assumptions in your thinking? What was your strategy for choosing the optimal move? Try to state your strategy in gameindependent terms How did you compensate for the fact that you couldn t read the game all the way to the end? Adversarial Games People like games! Games are fun, engaging, and hard-to-solve Games are amenable to study: precise, easy-torepresent state space Game pieces found in a burial site in Southeast Turkey. Dated about 3000 BC Game of Twenty squares discovered in a burial site in Ur. Dated about 2550-2400 BC Backgammon is also among one of the oldest games still played today 2

Adversarial Games Two-player games have been a focus of AI as long as computers have been around Checkers Backgammon and Chess Solved: state space was completely mapped out! Computers can compete at a championship level Go Computers are still at an amateur club-level Adversarial Games Humans and computers have different relative strengths in game play humans computers good at evaluating the strength of a board for a player good at looking ahead in the game to find winning combinations of moves 3

How humans play games An experiment (by degroot) was performed in which chess positions were shown to novice and expert players. experts could reconstruct these perfectly novice players did far worse Random chess positions (not legal ones) were then shown to the two groups experts and novices did just as badly at reconstructing them! How computers play games Search! 4

Terminology deterministic vs. stochastic games initial state, successor function, goal test, utility function: defines the final numeric value for a game that ends in terminal state s for player p Chess: +1, 0, ½ for a win, loss, or draw zero-sum game: equal and opposite utilities If I win, you lose. Chess: 0 +1, 1 + 0, ½ + ½ policy: a function that maps from the set of states to the set of possible actions Branching factor and depth On average, there are fewer than 40 possible moves that a chess player can make from any board configuration 0 Ply 18 Ply!! 1 Ply 2 Ply Branching Factor Estimates for different two-player games Hydra at home in the United Arab Emirates Tic-tac-toe 4 Connect Four 7 Checkers 10 Othello 30 Chess 40 Go 300 5

Simplified representation for twoplayer games Two players: MAX and MIN MAX always moves first MAX wants high utility (payoff) MIN wants MAX to get low utility (payoff) Minimax: an optimal strategy An optimal strategy is one that is at least as good as any other, no matter what the opponent does If there's a way to force the win, it will Will only lose if there's no other option Minimax is an optimal strategy assuming both players play optimally 6

Minimax: an optimal strategy MAX 3 A a 1 a 2 a 3 MIN 3 B 2 C 2 D b 1 b 2 b 3 c 1 c 2 c 3 d 1 d 2 d 3 3 12 8 2 4 6 14 5 2 What action should MAX take? Minimax: an optimal strategy If I did this, then he would do that, but then I would do that, and then he would do this 8 < UTILITY(s) MINIMAX(s) = max a MINIMAX(RESULT(s, a)) : min a MINIMAX(RESULT(s, a)) if TERMINAL-TEST(s) if PLAYER(s) = MAX if PLAYER(s) =MIN 7

Minimax: An Optimal Strategy Minimax Example: Baby Nim Take 1 or 2 at each turn Goal: take the last match MAX wins W W = 1.0 = -1.0 MIN wins/ MAX loses 8

Minimax Example MAX MIN 3 12 8 2 4 6 14 5 2 Properties of Minimax Minimax performs depth-first exploration of game tree. Recall time complexity for DFS is O(b m ) For chess, b 35, d 100 for "reasonable" games exact solution completely infeasible How can we find the exact solution faster? 9

Baby Nim MAX 5 1 2 MIN 4 3 1 2 1 2-1.0 1.0 Take 1 or 2 at each turn Goal: take the last match W W MAX wins = 1.0 = -1.0 MIN wins/ MAX loses MIN 1.0 3 2 2 1 1 2 1 2 1 2 2 1 1 W 1 W W W W W 1 2 1 1 1 1 1.0 MAX -1.0-1.0-1.01.0-1.0 1.0 1.0-1.0-1.0 1.0 1.0 1.0-1.0-1.0-1.0 1 W W 1 Alpha-Beta Pruning Alpha-beta pruning: eliminate parts of game tree that don t affect the final result Consider a node n If a player has a better choice m (at a parent or further up), then n will never be reached Once we know enough about n by looking at some successors we can prune it. 10

Do depth-first search until first leaf [-,+ ] [-, + ] [-,+ ] [-,3] 11

[-,+ ] [-, 3] [-,+ ] [-,3] 12

[3,+ ] [-,3] [3, [-,2] + ] [3, + ], [3,3] [3, [-,2] + ] [3, [-,2] 14] 13

[3, + ], [3,3] [3, + ] [3, 5] [3, + ] 3 [3,3] [3, + ] [3, 2] 14

Alpha-Beta pruning Properties of α-β Pruning does not affect final result However, effectiveness of pruning affected by order in which we examine successors What do you do if you don t get to the bottom of the tree on time? 15