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

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

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

2 person perfect information

ARTIFICIAL INTELLIGENCE (CS 370D)

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

Adversary Search. Ref: Chapter 5

CS 771 Artificial Intelligence. Adversarial Search

Artificial Intelligence. Minimax and alpha-beta pruning

game tree complete all possible moves

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

Game-Playing & Adversarial Search

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

Artificial Intelligence 1: game playing

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

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

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

mywbut.com Two agent games : alpha beta pruning

Games (adversarial search problems)

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

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

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

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

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

Artificial Intelligence

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

Adversarial Search 1

Game Playing State-of-the-Art

CS 331: Artificial Intelligence Adversarial Search II. Outline

ADVERSARIAL SEARCH. Chapter 5

CS 188: Artificial Intelligence

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

Adversarial Search (Game Playing)

Programming Project 1: Pacman (Due )

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

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

Adversarial Search and Game Playing

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

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)

Adversarial Search: Game Playing. Reading: Chapter

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

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

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

CS 5522: Artificial Intelligence II

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

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Solving Problems by Searching: Adversarial Search

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Artificial Intelligence

Computer Game Programming Board Games

Artificial Intelligence. 4. Game Playing. Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder

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

Ar#ficial)Intelligence!!

CS 188: Artificial Intelligence

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

Adversarial Search. CMPSCI 383 September 29, 2011

CS188 Spring 2014 Section 3: Games

CSCI1410 Fall 2018 Assignment 2: Adversarial Search

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence Search III

Games and Adversarial Search

COMP9414: Artificial Intelligence Adversarial Search

Adversarial Search Lecture 7

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

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

Game Playing AI. Dr. Baldassano Yu s Elite Education

Artificial Intelligence

Lecture 5: Game Playing (Adversarial Search)

CS188 Spring 2010 Section 3: Game Trees

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

Adversarial Search Aka Games

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

CS 4700: Artificial Intelligence

CMPUT 396 Tic-Tac-Toe Game

CS510 \ Lecture Ariel Stolerman

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

Artificial Intelligence Lecture 3

4. Games and search. Lecture Artificial Intelligence (4ov / 8op)

Game Playing. Philipp Koehn. 29 September 2015

CS188 Spring 2010 Section 3: Game Trees

Adversarial search (game playing)

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

CS61B Lecture #22. Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55: CS61B: Lecture #22 1

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

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

More Adversarial Search

Artificial Intelligence Adversarial Search

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

Othello/Reversi using Game Theory techniques Parth Parekh Urjit Singh Bhatia Kushal Sukthankar

CS 4700: Foundations of Artificial Intelligence

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

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.

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

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

Game-playing AIs: Games and Adversarial Search I AIMA

Artificial Intelligence. Topic 5. Game playing

Game playing. Chapter 5. Chapter 5 1

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

Game Playing: Adversarial Search. Chapter 5

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

Transcription:

CS 2710 Foundations of AI Lecture 9 Adversarial search Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square CS 2710 Foundations of AI Game search Game-playing programs developed by AI researchers since the beginning of the modern AI era Programs playing chess, checkers, etc (1950s) Specifics of the game search: Sequences of player s decisions we control Decisions of other player(s) we do not control Contingency problem: many possible opponent s moves must be covered by the solution Opponent s behavior introduces an uncertainty in to the game We do not know exactly what the response is going to be Rational opponent maximizes it own utility (payoff) function 1

Types of game problems Types of game problems: Adversarial games: win of one player is a loss of the other Cooperative games: players have common interests and utility function A spectrum of game problems in between the two: Adversarial games Fully cooperative games we focus on adversarial games only!! Example of an adversarial 2 person game: Tic-tac-toe Player 1 (x) moves Player 2 (o) moves Player 1 (x) moves Loss Draw Win 2

Game search problem Game problem formulation: Initial state: initial board position + info whose move it is Operators: legal moves a player can make Goal (terminal test): determines when the game is over Utility (payoff) function: measures the outcome of the game and its desirability Search objective: find the sequence of player s decisions (moves) maximizing its utility (payoff) Caveat: Consider the opponent s moves and their utility Game problem formulation (Tic-tac-toe) Objectives: Player 1: maximize outcome Player 2: minimize outcome Operators Initial state Terminal (goal) states Utility: -1 0 1 3

Minimax algorithm How to deal with the contingency problem? Assuming that the opponent is rational and always optimizes its behavior (opposite to us) we consider the best opponent s response Then the minimax algorithm determines the best move 3 3 2 2 3 12 8 2 4 6 14 5 2 Minimax algorithm. Example 4

Minimax algorithm. Example Minimax algorithm. Example 4 5

Minimax algorithm. Example 4 6 Minimax algorithm. Example 4 4 6 6

Minimax algorithm. Example 4 4 6 2 Minimax algorithm. Example 4 4 6 2 9 7

Minimax algorithm. Example 4 4 6 2 9 3 Minimax algorithm. Example 5 4 2 5 4 6 2 9 3 5 7 8

Minimax algorithm. Example 5 4 2 5 4 6 2 9 3 5 7 Minimax algorithm 9

Complexity of the minimax algorithm We need to explore the complete game tree before making the decision b Complexity: m? -1 0 1 Complexity of the minimax algorithm We need to explore the complete game tree before making the decision b m Complexity: O( b m ) -1 0 1 Impossible for large games Chess: 35 operators, game can have 50 or more moves 10

Solution to the complexity problem Two solutions: 1. Dynamic pruning of redundant branches of the search tree identify a provably suboptimal branch of the search tree before it is fully explored Eliminate the suboptimal branch Procedure: Alpha-Beta pruning 2. Early cutoff of the search tree uses imperfect minimax value estimate of non-terminal states (positions) Alpha beta pruning Some branches will never be played by rational players since they include sub-optimal decisions (for either player) 11

Alpha beta pruning. Example Alpha beta pruning. Example 12

Alpha beta pruning. Example Alpha beta pruning. Example 13

Alpha beta pruning. Example!! Alpha beta pruning. Example 14

Alpha beta pruning. Example Alpha beta pruning. Example 15

Alpha beta pruning. Example!! Alpha beta pruning. Example 16

Alpha beta pruning. Example Alpha beta pruning. Example 17

Alpha beta pruning. Example!! 7 Alpha beta pruning. Example 7 18

Alpha beta pruning. Example 7 nodes that were never explored!!! Alpha-Beta pruning GOAL GOAL 19

Using minimax value estimates Idea: Cutoff the search tree before the terminal state is reached Use imperfect estimate of the minimax value at the leaves Heuristic evaluation function 5 4 2 5 Heuristic evaluation function 4 6 2 9 3 5 7 Cutoff level Design of evaluation functions Heuristic estimate of the value for a sub-tree Examples of a heuristic functions: Material advantage in chess, checkers Gives a value to every piece on the board, its position and combines them More general feature-based evaluation function Typically a linear evaluation function: f s) f ( s) w f ( s) w f ( s) ( 1 1 2 2 k w k (s) f i wi - a feature of a state s - feature weight 20

Further extensions to real games Restricted set of moves to be considered under the cutoff level to reduce branching and improve the evaluation function E.g., consider only the capture moves in chess Heuristic estimates 21