CS188 Spring 2010 Section 3: Game Trees

Similar documents
CS188 Spring 2010 Section 3: Game Trees

CS188 Spring 2014 Section 3: Games

ARTIFICIAL INTELLIGENCE (CS 370D)

Adversary Search. Ref: Chapter 5

mywbut.com Two agent games : alpha beta pruning

CS188 Spring 2011 Written 2: Minimax, Expectimax, MDPs

game tree complete all possible moves

Adversarial Search (Game Playing)

Game Engineering CS F-24 Board / Strategy Games

CS510 \ Lecture Ariel Stolerman

CSC 380 Final Presentation. Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis

CS 4700: Artificial Intelligence

Data Structures and Algorithms

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

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

Game-playing: DeepBlue and AlphaGo

2 person perfect information

Adversarial Search 1

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

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

Game-playing AIs: Games and Adversarial Search I AIMA

UNIVERSITY of PENNSYLVANIA CIS 391/521: Fundamentals of AI Midterm 1, Spring 2010

Homework Assignment #2

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

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

COMP9414: Artificial Intelligence Adversarial Search

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

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

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Games (adversarial search problems)

Midterm Examination. CSCI 561: Artificial Intelligence

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

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

Computer Game Programming Board Games

Adversarial Search Aka Games

UMBC 671 Midterm Exam 19 October 2009

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

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

Games and Adversarial Search II

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

Multiple Agents. Why can t we all just get along? (Rodney King)

CMPUT 396 Tic-Tac-Toe Game

16.410/413 Principles of Autonomy and Decision Making

Generalized Game Trees

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

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

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

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

CS 540: Introduction to Artificial Intelligence

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Algorithms and Game Theory Date: 12/4/14

Foundations of Artificial Intelligence

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

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

Game Playing State-of-the-Art

Theory and Practice of Artificial Intelligence

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

Game Playing Part 1 Minimax Search

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

Game-Playing & Adversarial Search

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

Adversarial Search: Game Playing. Reading: Chapter

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Algorithmic Game Theory Date: 12/6/18

CS 5522: Artificial Intelligence II

Artificial Intelligence

More on games (Ch )

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

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

CS 188: Artificial Intelligence Spring Announcements

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

Programming Project 1: Pacman (Due )

Adversarial Search and Game Theory. CS 510 Lecture 5 October 26, 2017

CSE 473 Midterm Exam Feb 8, 2018

More on games (Ch )

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

Game Tree Search. Generalizing Search Problems. Two-person Zero-Sum Games. Generalizing Search Problems. CSC384: Intro to Artificial Intelligence

CS 188: Artificial Intelligence

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

Five-In-Row with Local Evaluation and Beam Search

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

CS 188: Artificial Intelligence

CSC384: Introduction to Artificial Intelligence. Game Tree Search

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

Artificial Intelligence. Minimax and alpha-beta pruning

Artificial Intelligence 1: game playing

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

CS 188 Introduction to Fall 2014 Artificial Intelligence Midterm

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

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

CS188: Artificial Intelligence, Fall 2011 Written 2: Games and MDP s

Adversarial Search Lecture 7

UMBC CMSC 671 Midterm Exam 22 October 2012

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

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

Adversarial Search and Game Playing

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

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

CS 188: Artificial Intelligence Spring 2007

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

CS 771 Artificial Intelligence. Adversarial Search

Game Theory and Randomized Algorithms

Transcription:

CS188 Spring 2010 Section 3: Game Trees 1 Warm-Up: Column-Row You have a 3x3 matrix of values like the one below. In a somewhat boring game, player A first selects a row, and then player B selects a column. The game is over after these two moves and the outcome of the game is the value in the square that lies in the intersection of the chosen row and column. 1 8 6 7 3 4 5 9 2 For the following questions, assume that player A wants to maximize the final number that is selected. For each question state which action the player takes and justify your decision in one sentence. (a) What is player A s move if player B is trying to minimize the final number? Draw out the corresponding game tree. A should pick the middle row, resulting in the final outcome of 3. (b) What is player A s move if player B is moving randomly? Draw out the corresponding game tree, labeling non-leaf nodes with their expected value assuming B moves randomly and A maximizes expected value. A should pick the bottom row, resulting in an expected value of 5.33. (c) What is player A s move if player B shares A s value function (i.e. wants to maximize the final value)? Draw out the corresponding game tree. A should pick the bottom row, resulting in a final outcome of 9. 1

2 Min-Max Search In this problem, we will explore adversarial search. Consider the zero-sum game tree shown below. Trapezoids that point up, such as at the root, represent choices for the player seeking to maximize; trapezoids that point down represent choices for the minimizer. Outcome values for the maximizing player are listed for each leaf node. It is your move, and you seek to maximize the expected value of the game. (a) Assuming both opponents act optimally, carry out the min-max search algorithm. Write the value of each node inside the corresponding trapzoid. What move should you make now? How much is the game worth to you? The game is worth 5. We should make the move that takes us left down to the node containing 5. (b) Now reconsider the same game tree, but use α-β pruning (the tree is printed on the next page). Expand successors from left to right. In the brackets [, ], record the [α, β] pair that is passed down that edge (through a call to MIN- VALUE or MAX-VALUE). In the parentheses ( ), record the value (v) that is passed up the edge (the value returned by MIN-VALUE or MAX-VALUE). Circle all leaf nodes that are visited. Put an X through edges that are pruned off. How much is the game worth according to α-β pruning? α-β pruning finds the same solution. The game is still worth 5 to the maximizer. 2

(b) 3

3 Non zero-sum games The standard Minimax algorithm calculates worst-case values in a zero-sum two player game, i.e. a game in which for all terminal states s, the utilities for players A (max) and B (min) obey U A (s) + U B (s) = 0. In the zero sum case, we know that U A (s) = U B (s), and so we can think of player B as simply minimizing U A (s). In this problem, you will consider the non zero-sum generalization in which the sum of the two players utilities are not necessarily zero. Because player A s utility no longer determines player B s utility exactly, the leaf utilities are written as pairs (U A, U B ), with the first and second component indicating the utility to A and B respecively. In this generalized setting, A seeks to maximize U A, while B seeks to maximize U B. (a) Consider the non zero-sum game tree below. Propagate the terminal utility pairs up the tree using the appropriate generalization of the minimax algorithm on this game tree. Fill in the values (as pairs) at each of the internal nodes. Assume that each player maximizes their own utility and that the root node is an A node. In cases of ties, choose the leftmost child. (b) Briefly explain why no α-β style pruning is possible in the general non zero-sum case. Hint: think first about the case where U A = U B for all nodes. The values that the first and second player are trying to maximize are independent, so we no longer have situations where we know that one player will never let the other player down a particular branch of the game tree. For instance, in the case where U A = U B, the problem reduces to searching for the max-valued leaf, which could appear anywhere in the tree. (c) For minimax, we know that the value v computed at the root (say for player A = MAX) is a worst-case value, in that, if the opponent MIN doesn t act optimally, the actual outcome v for MAX can only be better, never worse, than v. In the general non zero-sum setup, can we also say that the value v A computed at the root is a worst-case value, or can A s outcome be worse than the computed v A if B plays suboptimally? Briefly justify. A s outcome can be worse than the computed v A. For instance, in the example game, if B chooses (0, 2) over (1, 1), then A s outcome will decrease from 1 to 0. 4

Now consider the nearly zero sum case, in which case U A (s) + U B (s) ɛ for some ɛ which is known in advance. For example, the game tree from part (a) is nearly zero sum for ɛ = 2. (d) In the nearly zero sum case, pruning is possible. List the nodes in the game tree above that could be pruned with the appropriate generalization of α-β pruning. Assume that the exploration is done in the standard left to right depth first order, and that the value of ɛ is known to be 2. Make sure you make use of ɛ in your reasoning. We can prune the node ( 1, 0). See answers to (e) and (f) for reasoning. (e) Give a general condition under which a child n of a B node b can be pruned. Your condition should generalize alpha-pruning and should be stated in terms of quantities such as the utilities U A (s) and/or U B (s) of relevant nodes s in the game tree, the bound ɛ, and so on. Do not worry about ties. The pruning condition is U b > ɛ α. This is equivalent to the standard pruning condition U b > α, but with an additional requirement ɛ on U b before pruning occurs. (f) In the nearly zero sum case with bound ɛ, what guarantee, if any, can we make for the actual outcome u for player A (in terms of the value U A of the root) in the case where player B might act suboptimally? u U A 2ɛ 5