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

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

ARTIFICIAL INTELLIGENCE (CS 370D)

2 person perfect information

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

Adversary Search. Ref: Chapter 5

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

Game-Playing & Adversarial Search

Artificial Intelligence 1: game playing

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

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

Games (adversarial search problems)

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

Artificial Intelligence

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

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

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

mywbut.com Two agent games : alpha beta pruning

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

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

COMP9414: Artificial Intelligence Adversarial Search

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

Programming Project 1: Pacman (Due )

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

Game Playing State-of-the-Art

ADVERSARIAL SEARCH. Chapter 5

Adversarial Search and Game Playing

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

CS 188: Artificial Intelligence

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

Artificial Intelligence

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

CS510 \ Lecture Ariel Stolerman

Adversarial Search 1

Adversarial Search: Game Playing. Reading: Chapter

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

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

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

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

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Adversarial Search (Game Playing)

Solving Problems by Searching: Adversarial Search

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

CS 5522: Artificial Intelligence II

Game Playing AI. Dr. Baldassano Yu s Elite Education

Artificial Intelligence Adversarial Search

Artificial Intelligence

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

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

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

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

CS 331: Artificial Intelligence Adversarial Search II. Outline

Adversarial Search. CMPSCI 383 September 29, 2011

Adversarial Search Lecture 7

CS 188: Artificial Intelligence

Ar#ficial)Intelligence!!

CS188 Spring 2014 Section 3: Games

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

CSCI1410 Fall 2018 Assignment 2: Adversarial Search

Game Playing AI Class 8 Ch , 5.4.1, 5.5

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence Search III

Computer Game Programming Board Games

Games and Adversarial Search

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

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

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

Adverserial Search Chapter 5 minmax algorithm alpha-beta pruning TDDC17. Problems. Why Board Games?

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

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

More Adversarial Search

Adversarial Search Aka Games

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

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

CS 730/730W/830: Intro AI

Lecture 5: Game Playing (Adversarial Search)

Adversarial search (game playing)

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

Game Playing. Philipp Koehn. 29 September 2015

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

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

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

CS188 Spring 2010 Section 3: Game Trees

CS 188: Artificial Intelligence Spring 2007

CSE 332: Data Structures and Parallelism Games, Minimax, and Alpha-Beta Pruning. Playing Games. X s Turn. O s Turn. X s Turn.

COMP5211 Lecture 3: Agents that Search

CS 188: Artificial Intelligence Spring Announcements

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

CMPUT 396 Tic-Tac-Toe Game

CS 380: ARTIFICIAL INTELLIGENCE

CS 4700: Artificial Intelligence

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

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

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

Artificial Intelligence Lecture 3

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

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

Transcription:

CS 171 Introduction to AI Lecture 1 Adversarial search Milos Hauskrecht milos@cs.pitt.edu 39 Sennott Square Announcements Homework assignment is out Programming and experiments Simulated annealing + Genetic algorithm Competition Course web page: http://www.cs.pitt.edu/~milos/courses/cs171/

Search Path search Configuration search Search review Optimality Finding a path versus finding the optimal path Finding a configuration satisfying constraints versus finding the best configuration Game search Game-playing programs developed by AI researchers since the beginning of the modern AI era Programs playing chess, checkers, etc (190s) 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

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 person game: Tic-tac-toe Player 1 (x) moves first Loss Draw Win

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) Consider the opponent s moves and their utility Game problem formulation (Tic-tac-toe) Objectives: Player 1: maximize outcome Player : minimize outcome Operators Initial state Terminal (goal) states Utility: -1 0 1

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 3 1 8 6 1 Minimax algorithm. Example 3 6 1 9 3 1 7

Minimax algorithm. Example 3 6 1 9 3 1 7 Minimax algorithm. Example 3 6 1 9 3 1 7

Minimax algorithm. Example 6 3 6 1 9 3 1 7 Minimax algorithm. Example 6 3 6 1 9 3 1 7

Minimax algorithm. Example 6 3 6 1 9 3 1 7 Minimax algorithm. Example 6 9 3 6 1 9 3 1 7

Minimax algorithm. Example 6 9 3 3 6 1 9 3 1 7 Minimax algorithm. Example 6 9 3 7 3 6 1 9 3 1 7

Minimax algorithm 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 Complexity: m O ( b m ) -1 0 1 Impossible for large games Chess: 3 operators, game can have 0 or more moves 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. 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) Alpha beta pruning. Example 3 6 1 9 3 1 7

Alpha beta pruning. Example 3 6 1 9 3 1 7 Alpha beta pruning. Example 3 6 1 9 3 1 7

Alpha beta pruning. Example 6!! 3 6 1 9 3 1 7 Alpha beta pruning. Example 6 3 6 1 9 3 1 7

Alpha beta pruning. Example 6 3 6 1 9 3 1 7 Alpha beta pruning. Example 6 3 6 1 9 3 1 7

Alpha beta pruning. Example!! 6 3 6 1 9 3 1 7 Alpha beta pruning. Example 6 3 6 1 9 3 1 7

Alpha beta pruning. Example 6 3 6 1 9 3 1 7 Alpha beta pruning. Example 6!! 7 3 6 1 9 3 1 7

Alpha beta pruning. Example 6 7 3 6 1 9 3 1 7 Alpha beta pruning. Example 6 7 3 6 1 9 3 1 7 nodes that were never explored!!!

Alpha-Beta pruning GOAL GOAL 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 Evaluation function Heuristic evaluation function 6 9 3 7 Cutoff level 3

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 K k w k f i w i ( s ) - a feature of a state s - feature weight 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