Rules of the game. chess checkers tic-tac-toe...

Size: px
Start display at page:

Download "Rules of the game. chess checkers tic-tac-toe..."

Transcription

1 Course 8 Games

2 Rules of the game Two players: MAX and MIN Both have as goal to win the game Only one can win or else it will be a draw In the initial modeling there is no chance (but it can be simulated) Examples: chess checkers tic-tac-toe...

3 The tic-tac-toe game MAX plays with Xs MIN plays with Os

4 MAX The tic-tac-toe game

5 The tic-tac-toe game MIN

6 MAX The tic-tac-toe game

7 The tic-tac-toe game MIN

8 MAX The tic-tac-toe game

9 The tic-tac-toe game MIN

10 MAX The tic-tac-toe game

11 The tic-tac-toe game MIN

12 The tic-tac-toe game MAX Draw!

13 The tic-tac-toe game

14 MAX The tic-tac-toe game

15 The tic-tac-toe game MIN

16 MAX The tic-tac-toe game

17 The tic-tac-toe game MIN

18 MAX The tic-tac-toe game

19 The tic-tac-toe game MIN

20 MAX The tic-tac-toe game

21 MAX wins The tic-tac-toe game

22 Representation as an AI problem. Problem versus instance 2. The state space: a state: the position on the board of the signs between two moves the size of the space: Representing a state: a 3x3 matrix 4. Representing a transition algorithmical (in the present approach) 5. How is it controled the evolution of the game? the MIN-MAX method the ALPHA-BETA method

23 The game tree MAX a simetry class

24 The game tree MAX MIN

25 The game tree MAX MIN

26 The game tree MAX MIN

27 The game tree MAX MIN

28 MAX wins: + The value of a state

29 MIN wins: - The value of a state

30 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game

31 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game = 3

32 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

33 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

34 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

35 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

36 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

37 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

38 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

39 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

40 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

41 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players...

42 Evaluating a state A state is better if it opens up more win possibilities until the end of the game. An example of an evaluation function: the value of the state is the difference between the number of lines that MAX could fill in till the end of the game and those that MIN could fill in till the end of the game. Lines having no sign could be taken by any of the players = 3

43 Evaluating a state =

44 Evaluation: bottom-up MAX MIN

45 Evaluation: bottom-up MAX MIN

46 Evaluation: bottom-up MAX MIN -2

47 Evaluation: bottom-up MAX MIN -2

48 Evaluation: bottom-up -2 MAX MIN 2-2

49 Evaluation: bottom-up -2 MAX MIN 2-2

50 Evaluation: bottom-up -2 MAX MIN 2-2

51 Evaluation: bottom-up MAX choses the best move for them Developping the search space for a depth of 2 yields the conclusion that the player at move has a better chance to win if they occupy the center -2 MAX MIN 2 MAX thinks: MIN choses the best move for them = the worst move for me -2

52 The MIN-MAX method function min-max(state, player, depth) begin if (depth = ) then return score(state); val = worst(player); while (there are still states to generate) begin generate a state -> s; val <- back-up-compare(val, min-max(s, not(player), depth), player); // the following instruction reduces the search space in case a win is reached in one of the generated states: if (val = -worst(player)) return(val); end return(val); end function worst(player) begin if player = MAX then return - ; else return + ; end funtion back-up-compare(val, val2, player) begin if player = MAX then return max(val, val2); else return min(val, val2); end The initial call: min-max(,max,2)

53 Evaluation: bottom-up MAX MIN val=; player = MAX; depth=; while (there are still states to generate) begin generate a state -> s;... end

54 Evaluation: bottom-up s MAX min-max(,min,) MIN val=; player = MAX; depth=2; while (there are still states to generate) begin generate a state -> s; val <- back-up-compare(val, min-max(s, not(player), depth), player); if (val = -worst(player)) return(val); end

55 Evaluation: bottom-up MAX s - MIN min-max(,min,) val = worst(player); val= while (there are still states to generate) begin generate a state -> s; val <- back-up-compare(val, min-max(s, not(player), depth), player); if (val = -worst(player)) return(val); end

56 Evaluation: bottom-up MAX s MIN min-max(,max,) if (depth = ) then return score(state);

57 Evaluation: bottom-up MAX s MIN min-max(,min,) -2 val= ; player=min; val <- back-up-compare(val,, player); if (val = -worst(player)) return(val); end

58 Evaluation: bottom-up MAX s MIN min-max(,min,) -2 val= ; player=min; val <- back-up-compare(val,, player); if (val = -worst(player)) return(val); end -2

59 Evaluation: bottom-up MAX s MIN min-max(,min,) -2 val= ; player=min; val <- back-up-compare(val,, player); if (val = -worst(player)) return(val); end -2

60 Evaluation: bottom-up MAX s MIN min-max(,min,) -2 val= ; player=min; val <- back-up-compare(val,, player); if (val = -worst(player)) return(val); end -2

61 The Alpha-Beta method MAX MIN A moment in the development of the tree when a peculier situation occurs: At this level a maximum is computed. The value of the first node on this level borders the range of possible values of the root node to the left!

62 The Alpha-Beta method MAX MIN A moment in the development of the tree when a peculier situation occurs: La At acest this level nivel a se maximum calculează is computed. un maxim. The value of the first node on this level borders the range of possible values of the root node to the left! At this level a minimum is computed. Any value of the parent node could be less then or equal to.

63 The Alpha-Beta method MAX MIN The generation can now be stopped! It can not influence eny longer the value of the root node. A moment in the development of the tree when a peculier situation occurs: La At acest this level nivel a se maximum calculează is computed. un maxim. The value of the first node on this level borders the range of possible values of the root node to the left! At this level a minimum is computed. Any value of the parent node could be less then or equal to.

64 The Alpha-Beta method -2 MAX MIN 2-2

65 The Alpha-Beta method function alpha-beta(state, player, depth) begin if (depth = ) then return score(state); val = worst(player); while (there are still states to generate) begin generate a state -> s; newval <- alpha-beta(s, not(player), depth); if player=max & newval val then return(newval); else if player=min & newval val then return(newval); else val! back-up-compare(val, min-max(s, not(player), depth), player); // the following instruction reduces the search space in case a win is reached in one of the generated states: if (val = -worst(player)) return(val); end return(val); end function worst(player) begin if player = MAX then return - ; else return + ; end function back-up-compare(val, val2, player) begin if player = MAX then return max(val, val2); else return min(val, val2); end The initial call: alpha-beta (,MAX,2)

Rules of the game. chess checkers tic-tac-toe...

Rules of the game. chess checkers tic-tac-toe... Course 9 Games Rules of the game Two players: MAX and MIN Both have as goal to win the game Only one can win or else it will be a draw In the initial modeling there is no chance (but it can be simulated)

More information

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

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties: Playing Games Henry Z. Lo June 23, 2014 1 Games We consider writing AI to play games with the following properties: Two players. Determinism: no chance is involved; game state based purely on decisions

More information

mywbut.com Two agent games : alpha beta pruning

mywbut.com Two agent games : alpha beta pruning Two agent games : alpha beta pruning 1 3.5 Alpha-Beta Pruning ALPHA-BETA pruning is a method that reduces the number of nodes explored in Minimax strategy. It reduces the time required for the search and

More information

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

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements 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

More information

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

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search 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

More information

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

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search) Minimax (Ch. 5-5.3) Announcements Homework 1 solutions posted Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search) Single-agent So far we have look at how a single agent can search

More information

Game Engineering CS F-24 Board / Strategy Games

Game Engineering CS F-24 Board / Strategy Games Game Engineering CS420-2014F-24 Board / Strategy Games David Galles Department of Computer Science University of San Francisco 24-0: Overview Example games (board splitting, chess, Othello) /Max trees

More information

Adversary Search. Ref: Chapter 5

Adversary Search. Ref: Chapter 5 Adversary Search Ref: Chapter 5 1 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans is possible. Many games can be modeled very easily, although

More information

ARTIFICIAL INTELLIGENCE (CS 370D)

ARTIFICIAL INTELLIGENCE (CS 370D) Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) (CHAPTER-5) ADVERSARIAL SEARCH ADVERSARIAL SEARCH Optimal decisions Min algorithm α-β pruning Imperfect,

More information

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

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur Module 3 Problem Solving using Search- (Two agent) 3.1 Instructional Objective The students should understand the formulation of multi-agent search and in detail two-agent search. Students should b familiar

More information

2 person perfect information

2 person perfect information Why Study Games? Games offer: Intellectual Engagement Abstraction Representability Performance Measure Not all games are suitable for AI research. We will restrict ourselves to 2 person perfect information

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms CS245-2015S-P4 Two Player Games David Galles Department of Computer Science University of San Francisco P4-0: Overview Example games (board splitting, chess, Network) /Max

More information

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

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville Computer Science and Software Engineering University of Wisconsin - Platteville 4. Game Play CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 6 What kind of games? 2-player games Zero-sum

More information

Adversarial Search 1

Adversarial Search 1 Adversarial Search 1 Adversarial Search The ghosts trying to make pacman loose Can not come up with a giant program that plans to the end, because of the ghosts and their actions Goal: Eat lots of dots

More information

Adversarial Search: Game Playing. Reading: Chapter

Adversarial Search: Game Playing. Reading: Chapter Adversarial Search: Game Playing Reading: Chapter 6.5-6.8 1 Games and AI Easy to represent, abstract, precise rules One of the first tasks undertaken by AI (since 1950) Better than humans in Othello and

More information

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CSCE 315 Programming Studio Fall 2017 Project 2, Lecture 2 Adapted from slides of Yoonsuck Choe, John Keyser Two-Person Perfect Information Deterministic

More information

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

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13 Algorithms for Data Structures: Search for Games Phillip Smith 27/11/13 Search for Games Following this lecture you should be able to: Understand the search process in games How an AI decides on the best

More information

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

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5 Adversarial Search and Game Playing Russell and Norvig: Chapter 5 Typical case 2-person game Players alternate moves Zero-sum: one player s loss is the other s gain Perfect information: both players have

More information

Games (adversarial search problems)

Games (adversarial search problems) Mustafa Jarrar: Lecture Notes on Games, Birzeit University, Palestine Fall Semester, 204 Artificial Intelligence Chapter 6 Games (adversarial search problems) Dr. Mustafa Jarrar Sina Institute, University

More information

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

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter , 5.7,5.8 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

More information

Artificial Intelligence. Minimax and alpha-beta pruning

Artificial Intelligence. Minimax and alpha-beta pruning Artificial Intelligence Minimax and alpha-beta pruning In which we examine the problems that arise when we try to plan ahead to get the best result in a world that includes a hostile agent (other agent

More information

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

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec CS885 Reinforcement Learning Lecture 13c: June 13, 2018 Adversarial Search [RusNor] Sec. 5.1-5.4 CS885 Spring 2018 Pascal Poupart 1 Outline Minimax search Evaluation functions Alpha-beta pruning CS885

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence CS482, CS682, MW 1 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis, sushil@cse.unr.edu, http://www.cse.unr.edu/~sushil Games and game trees Multi-agent systems

More information

Artificial Intelligence Lecture 3

Artificial Intelligence Lecture 3 Artificial Intelligence Lecture 3 The problem Depth first Not optimal Uses O(n) space Optimal Uses O(B n ) space Can we combine the advantages of both approaches? 2 Iterative deepening (IDA) Let M be a

More information

Artificial Intelligence Adversarial Search

Artificial Intelligence Adversarial Search Artificial Intelligence Adversarial Search Adversarial Search Adversarial search problems games They occur in multiagent competitive environments There is an opponent we can t control planning again us!

More information

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

Adversarial Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA Adversarial Search Robert Platt Northeastern University Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA What is adversarial search? Adversarial search: planning used to play a game

More information

game tree complete all possible moves

game tree complete all possible moves Game Trees Game Tree A game tree is a tree the nodes of which are positions in a game and edges are moves. The complete game tree for a game is the game tree starting at the initial position and containing

More information

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 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 and Game- Playing C H A P T E R 6 C M P T 3 1 0 : S P R I N G 2 0 1 1 H A S S A N K H O S R A V I Adversarial Search Examine the problems that arise when we try to plan ahead in a world

More information

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

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game? CSC384: Introduction to Artificial Intelligence Generalizing Search Problem Game Tree Search Chapter 5.1, 5.2, 5.3, 5.6 cover some of the material we cover here. Section 5.6 has an interesting overview

More information

CMPUT 396 Tic-Tac-Toe Game

CMPUT 396 Tic-Tac-Toe Game CMPUT 396 Tic-Tac-Toe Game Recall minimax: - For a game tree, we find the root minimax from leaf values - With minimax we can always determine the score and can use a bottom-up approach Why use minimax?

More information

Game Playing AI. Dr. Baldassano Yu s Elite Education

Game Playing AI. Dr. Baldassano Yu s Elite Education Game Playing AI Dr. Baldassano chrisb@princeton.edu Yu s Elite Education Last 2 weeks recap: Graphs Graphs represent pairwise relationships Directed/undirected, weighted/unweights Common algorithms: Shortest

More information

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

CPS331 Lecture: Search in Games last revised 2/16/10 CPS331 Lecture: Search in Games last revised 2/16/10 Objectives: 1. To introduce mini-max search 2. To introduce the use of static evaluation functions 3. To introduce alpha-beta pruning Materials: 1.

More information

Game Tree Search 1/6/17

Game Tree Search 1/6/17 Game Tree Search /6/7 Frameworks for Decision-Making. Goal-directed planning Agents want to accomplish some goal. The agent will use search to devise a plan.. Utility maximization Agents ascribe a utility

More information

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina Conversion Masters in IT (MIT) AI as Representation and Search (Representation and Search Strategies) Lecture 002 Sandro Spina Physical Symbol System Hypothesis Intelligent Activity is achieved through

More information

Board Game AIs. With a Focus on Othello. Julian Panetta March 3, 2010

Board Game AIs. With a Focus on Othello. Julian Panetta March 3, 2010 Board Game AIs With a Focus on Othello Julian Panetta March 3, 2010 1 Practical Issues Bug fix for TimeoutException at player init Not an issue for everyone Download updated project files from CS2 course

More information

Artificial Intelligence 1: game playing

Artificial Intelligence 1: game playing Artificial Intelligence 1: game playing Lecturer: Tom Lenaerts Institut de Recherches Interdisciplinaires et de Développements en Intelligence Artificielle (IRIDIA) Université Libre de Bruxelles Outline

More information

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

Adversarial Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA CS188 UC Berkeley Adversarial Search Rob Platt Northeastern University Some images and slides are used from: AIMA CS188 UC Berkeley What is adversarial search? Adversarial search: planning used to play a game such as chess

More information

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

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter Read , Skim 5.7 ADVERSARIAL SEARCH Today Reading AIMA Chapter Read 5.1-5.5, Skim 5.7 Goals Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning 1 Adversarial Games People like games! Games are

More information

CS 771 Artificial Intelligence. Adversarial Search

CS 771 Artificial Intelligence. Adversarial Search CS 771 Artificial Intelligence Adversarial Search Typical assumptions Two agents whose actions alternate Utility values for each agent are the opposite of the other This creates the adversarial situation

More information

COMP9414: Artificial Intelligence Adversarial Search

COMP9414: Artificial Intelligence Adversarial Search CMP9414, Wednesday 4 March, 004 CMP9414: Artificial Intelligence In many problems especially game playing you re are pitted against an opponent This means that certain operators are beyond your control

More information

Programming Project 1: Pacman (Due )

Programming Project 1: Pacman (Due ) Programming Project 1: Pacman (Due 8.2.18) Registration to the exams 521495A: Artificial Intelligence Adversarial Search (Min-Max) Lectured by Abdenour Hadid Adjunct Professor, CMVS, University of Oulu

More information

Game-Playing & Adversarial Search

Game-Playing & Adversarial Search Game-Playing & Adversarial Search This lecture topic: Game-Playing & Adversarial Search (two lectures) Chapter 5.1-5.5 Next lecture topic: Constraint Satisfaction Problems (two lectures) Chapter 6.1-6.4,

More information

INF September 25, The deadline is postponed to Tuesday, October 3

INF September 25, The deadline is postponed to Tuesday, October 3 INF 4130 September 25, 2017 New deadline for mandatory assignment 1: The deadline is postponed to Tuesday, October 3 Today: In the hope that as many as possibble will turn up to the important lecture on

More information

Adversarial Search (Game Playing)

Adversarial Search (Game Playing) Artificial Intelligence Adversarial Search (Game Playing) Chapter 5 Adapted from materials by Tim Finin, Marie desjardins, and Charles R. Dyer Outline Game playing State of the art and resources Framework

More information

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

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax Game Trees Lecture 1 Apr. 05, 2005 Plan: 1. Introduction 2. Game of NIM 3. Minimax V. Adamchik 2 ü Introduction The search problems we have studied so far assume that the situation is not going to change.

More information

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

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5 CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Topics Game playing Game trees

More information

Game-playing AIs: Games and Adversarial Search I AIMA

Game-playing AIs: Games and Adversarial Search I AIMA Game-playing AIs: Games and Adversarial Search I AIMA 5.1-5.2 Games: Outline of Unit Part I: Games as Search Motivation Game-playing AI successes Game Trees Evaluation Functions Part II: Adversarial Search

More information

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

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard CS 109: Introduction to Computer Science Goodney Spring 2018 Homework Assignment 4 Assigned: 4/2/18 via Blackboard Due: 2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard Notes: a. This is the fourth homework

More information

16.410/413 Principles of Autonomy and Decision Making

16.410/413 Principles of Autonomy and Decision Making 16.10/13 Principles of Autonomy and Decision Making Lecture 2: Sequential Games Emilio Frazzoli Aeronautics and Astronautics Massachusetts Institute of Technology December 6, 2010 E. Frazzoli (MIT) L2:

More information

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM. Game Playing Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM. Game Playing In most tree search scenarios, we have assumed the situation is not going to change whilst

More information

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

Game Playing. Why do AI researchers study game playing? 1. It s a good reasoning problem, formal and nontrivial. Game Playing Why do AI researchers study game playing? 1. It s a good reasoning problem, formal and nontrivial. 2. Direct comparison with humans and other computer programs is easy. 1 What Kinds of Games?

More information

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

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search CSE 473: Artificial Intelligence Fall 2017 Adversarial Search Mini, pruning, Expecti Dieter Fox Based on slides adapted Luke Zettlemoyer, Dan Klein, Pieter Abbeel, Dan Weld, Stuart Russell or Andrew Moore

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence CS482, CS682, MW 1 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis, sushil@cse.unr.edu, http://www.cse.unr.edu/~sushil Non-classical search - Path does not

More information

More on games (Ch )

More on games (Ch ) More on games (Ch. 5.4-5.6) Announcements Midterm next Tuesday: covers weeks 1-4 (Chapters 1-4) Take the full class period Open book/notes (can use ebook) ^^ No programing/code, internet searches or friends

More information

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

CS440/ECE448 Lecture 9: Minimax Search. Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017 CS440/ECE448 Lecture 9: Minimax Search Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017 Why study games? Games are a traditional hallmark of intelligence Games are easy to formalize

More information

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

Game Tree Search. Generalizing Search Problems. Two-person Zero-Sum Games. Generalizing Search Problems. CSC384: Intro to Artificial Intelligence CSC384: Intro to Artificial Intelligence Game Tree Search Chapter 6.1, 6.2, 6.3, 6.6 cover some of the material we cover here. Section 6.6 has an interesting overview of State-of-the-Art game playing programs.

More information

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

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5 Adversarial Search CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2017 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5 Outline Game

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2011 Lecture 7: Minimax and Alpha-Beta Search 2/9/2011 Pieter Abbeel UC Berkeley Many slides adapted from Dan Klein 1 Announcements W1 out and due Monday 4:59pm P2

More information

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

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask Set 4: Game-Playing ICS 271 Fall 2017 Kalev Kask Overview Computer programs that play 2-player games game-playing as search with the complication of an opponent General principles of game-playing and search

More information

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk 4/2/0 CS 202 Introduction to Computation " UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department Lecture 33: How can computation Win games against you? Professor Andrea Arpaci-Dusseau Spring 200

More information

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

Artificial Intelligence. 4. Game Playing. Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder Artificial Intelligence 4. Game Playing Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder University of Zagreb Faculty of Electrical Engineering and Computing Academic Year 2017/2018 Creative Commons

More information

CSC384: Introduction to Artificial Intelligence. Game Tree Search

CSC384: Introduction to Artificial Intelligence. Game Tree Search CSC384: Introduction to Artificial Intelligence Game Tree Search Chapter 5.1, 5.2, 5.3, 5.6 cover some of the material we cover here. Section 5.6 has an interesting overview of State-of-the-Art game playing

More information

Solving Problems by Searching: Adversarial Search

Solving Problems by Searching: Adversarial Search Course 440 : Introduction To rtificial Intelligence Lecture 5 Solving Problems by Searching: dversarial Search bdeslam Boularias Friday, October 7, 2016 1 / 24 Outline We examine the problems that arise

More information

Game Playing State-of-the-Art

Game Playing State-of-the-Art Adversarial Search [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Game Playing State-of-the-Art

More information

CS 4700: Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Bart Selman Reinforcement Learning R&N Chapter 21 Note: in the next two parts of RL, some of the figure/section numbers refer to an earlier edition of R&N

More information

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

Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA 5.1-5.2 Games: Outline of Unit Part I: Games as Search Motivation Game-playing AI successes Game Trees Evaluation

More information

Adversarial Search and Game Playing

Adversarial Search and Game Playing Games Adversarial Search and Game Playing Russell and Norvig, 3 rd edition, Ch. 5 Games: multi-agent environment q What do other agents do and how do they affect our success? q Cooperative vs. competitive

More information

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Game Playing AI Class 8 Ch , 5.4.1, 5.5 Game Playing AI Class Ch. 5.-5., 5.4., 5.5 Bookkeeping HW Due 0/, :59pm Remaining CSP questions? Cynthia Matuszek CMSC 6 Based on slides by Marie desjardin, Francisco Iacobelli Today s Class Clear criteria

More information

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II CS 5522: Artificial Intelligence II Adversarial Search Instructor: Alan Ritter Ohio State University [These slides were adapted from CS188 Intro to AI at UC Berkeley. All materials available at http://ai.berkeley.edu.]

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Adversarial Search Instructor: Stuart Russell University of California, Berkeley Game Playing State-of-the-Art Checkers: 1950: First computer player. 1959: Samuel s self-taught

More information

1 Introduction. 1.1 Game play. CSC 261 Lab 4: Adversarial Search Fall Assigned: Tuesday 24 September 2013

1 Introduction. 1.1 Game play. CSC 261 Lab 4: Adversarial Search Fall Assigned: Tuesday 24 September 2013 CSC 261 Lab 4: Adversarial Search Fall 2013 Assigned: Tuesday 24 September 2013 Due: Monday 30 September 2011, 11:59 p.m. Objectives: Understand adversarial search implementations Explore performance implications

More information

CS188 Spring 2014 Section 3: Games

CS188 Spring 2014 Section 3: Games CS188 Spring 2014 Section 3: Games 1 Nearly 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

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Adversarial Search Instructors: David Suter and Qince Li Course Delivered @ Harbin Institute of Technology [Many slides adapted from those created by Dan Klein and Pieter Abbeel

More information

Computer Game Programming Board Games

Computer Game Programming Board Games 1-466 Computer Game Programg Board Games Maxim Likhachev Robotics Institute Carnegie Mellon University There Are Still Board Games Maxim Likhachev Carnegie Mellon University 2 Classes of Board Games Two

More information

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

CSE 473: Artificial Intelligence Fall Outline. Types of Games. Deterministic Games. Previously: Single-Agent Trees. Previously: Value of a State CSE 473: Artificial Intelligence Fall 2014 Adversarial Search Dan Weld Outline Adversarial Search Minimax search α-β search Evaluation functions Expectimax Reminder: Project 1 due Today Based on slides

More information

More on games (Ch )

More on games (Ch ) More on games (Ch. 5.4-5.6) Alpha-beta pruning Previously on CSci 4511... We talked about how to modify the minimax algorithm to prune only bad searches (i.e. alpha-beta pruning) This rule of checking

More information

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

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games CPS 57: Artificial Intelligence Two-player, zero-sum, perfect-information Games Instructor: Vincent Conitzer Game playing Rich tradition of creating game-playing programs in AI Many similarities to search

More information

CSE 473: Artificial Intelligence. Outline

CSE 473: Artificial Intelligence. Outline CSE 473: Artificial Intelligence Adversarial Search Dan Weld Based on slides from Dan Klein, Stuart Russell, Pieter Abbeel, Andrew Moore and Luke Zettlemoyer (best illustrations from ai.berkeley.edu) 1

More information

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

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1 Lecture 14 Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1 Outline Chapter 5 - Adversarial Search Alpha-Beta Pruning Imperfect Real-Time Decisions Stochastic Games Friday,

More information

Adversarial search (game playing)

Adversarial search (game playing) Adversarial search (game playing) References Russell and Norvig, Artificial Intelligence: A modern approach, 2nd ed. Prentice Hall, 2003 Nilsson, Artificial intelligence: A New synthesis. McGraw Hill,

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 10 Today Adversarial search (R&N Ch 5) Tuesday, March 7 Knowledge Representation and Reasoning (R&N Ch 7)

More information

A Tic Tac Toe Learning Machine Involving the Automatic Generation and Application of Heuristics

A Tic Tac Toe Learning Machine Involving the Automatic Generation and Application of Heuristics A Tic Tac Toe Learning Machine Involving the Automatic Generation and Application of Heuristics Thomas Abtey SUNY Oswego Abstract Heuristics programs have been used to solve problems since the beginning

More information

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

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters CS 188: Artificial Intelligence Spring 2011 Announcements W1 out and due Monday 4:59pm P2 out and due next week Friday 4:59pm Lecture 7: Mini and Alpha-Beta Search 2/9/2011 Pieter Abbeel UC Berkeley Many

More information

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

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 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 Contents Board Games Minimax Search Alpha-Beta Search Games with

More information

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

2/5/17 ADVERSARIAL SEARCH. Today. Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning Real-time decision making ADVERSARIAL SEARCH Today Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning Real-time decision making 1 Adversarial Games People like games! Games are fun, engaging, and hard-to-solve

More information

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

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here: Adversarial Search 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse471/lectures/adversarial.pdf Slides are largely based

More information

The game of Reversi was invented around 1880 by two. Englishmen, Lewis Waterman and John W. Mollett. It later became

The game of Reversi was invented around 1880 by two. Englishmen, Lewis Waterman and John W. Mollett. It later became Reversi Meng Tran tranm@seas.upenn.edu Faculty Advisor: Dr. Barry Silverman Abstract: The game of Reversi was invented around 1880 by two Englishmen, Lewis Waterman and John W. Mollett. It later became

More information

CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA

CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA Game playing was one of the first tasks undertaken in AI as soon as computers became programmable. (e.g., Turing, Shannon, and

More information

Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN

Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN Weijie Chen Fall 2017 Weijie Chen Page 1 of 7 1. INTRODUCTION Game TEN The traditional game Tic-Tac-Toe enjoys people s favor. Moreover,

More information

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

Adverserial Search Chapter 5 minmax algorithm alpha-beta pruning TDDC17. Problems. Why Board Games? TDDC17 Seminar 4 Adversarial Search Constraint Satisfaction Problems Adverserial Search Chapter 5 minmax algorithm alpha-beta pruning 1 Why Board Games? 2 Problems Board games are one of the oldest branches

More information

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

Adversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1 Adversarial Search Read AIMA Chapter 5.2-5.5 CIS 421/521 - Intro to AI 1 Adversarial Search Instructors: Dan Klein and Pieter Abbeel University of California, Berkeley [These slides were created by Dan

More information

Adversarial Search Lecture 7

Adversarial Search Lecture 7 Lecture 7 How can we use search to plan ahead when other agents are planning against us? 1 Agenda Games: context, history Searching via Minimax Scaling α β pruning Depth-limiting Evaluation functions Handling

More information

Math 152: Applicable Mathematics and Computing

Math 152: Applicable Mathematics and Computing Math 152: Applicable Mathematics and Computing April 16, 2017 April 16, 2017 1 / 17 Announcements Please bring a blue book for the midterm on Friday. Some students will be taking the exam in Center 201,

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Adversarial Search Prof. Scott Niekum The University of Texas at Austin [These slides are based on those of Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

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

Last update: March 9, Game playing. CMSC 421, Chapter 6. CMSC 421, Chapter 6 1 Last update: March 9, 2010 Game playing CMSC 421, Chapter 6 CMSC 421, Chapter 6 1 Finite perfect-information zero-sum games Finite: finitely many agents, actions, states Perfect information: every agent

More information

Adversarial Search Aka Games

Adversarial Search Aka Games Adversarial Search Aka Games Chapter 5 Some material adopted from notes by Charles R. Dyer, U of Wisconsin-Madison Overview Game playing State of the art and resources Framework Game trees Minimax Alpha-beta

More information

Game Playing Part 1 Minimax Search

Game Playing Part 1 Minimax Search Game Playing Part 1 Minimax Search Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [based on slides from A. Moore http://www.cs.cmu.edu/~awm/tutorials, C.

More information

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

Game-Playing & Adversarial Search Alpha-Beta Pruning, etc. Game-Playing & Adversarial Search Alpha-Beta Pruning, etc. First Lecture Today (Tue 12 Jul) Read Chapter 5.1, 5.2, 5.4 Second Lecture Today (Tue 12 Jul) Read Chapter 5.3 (optional: 5.5+) Next Lecture (Thu

More information

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

Game Playing State-of-the-Art. CS 188: Artificial Intelligence. Behavior from Computation. Video of Demo Mystery Pacman. Adversarial Search CS 188: Artificial Intelligence Adversarial Search Instructor: Marco Alvarez University of Rhode Island (These slides were created/modified by Dan Klein, Pieter Abbeel, Anca Dragan for CS188 at UC Berkeley)

More information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic So far we assumed a single-agent environment, but what if there are more agents and

More information