Artificial Intelligence

Slides:



Advertisements
Similar presentations
Chapter 6, Sec Adversarial Search.
Advertisements

Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Games & Adversarial Search
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Adversarial Search Chapter 5.
Adversarial Search Chapter 6.
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
Game Playing CSC361 AI CSC361: Game Playing.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Chap. 6 [AIMA] Chang-Sheng Chen.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
CSE373: Data Structures & Algorithms Lecture 23: Intro to Artificial Intelligence and Game Theory Based on slides adapted Luke Zettlemoyer, Dan Klein,
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Chapter 5 Adversarial Search. 5.1 Games Why Study Game Playing? Games allow us to experiment with easier versions of real-world situations Hostile agents.
5/4/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 9, 5/4/2005 University of Washington, Department of Electrical Engineering Spring 2005.
Artificial Intelligence AIMA §5: Adversarial Search
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Games and adversarial search (Chapter 5)
EA C461 – Artificial Intelligence Adversarial Search
Announcements Homework 1 Full assignment posted..
4. Games and adversarial search
Last time: search strategies
PENGANTAR INTELIJENSIA BUATAN (64A614)
Games and adversarial search (Chapter 5)
CS 460 Spring 2011 Lecture 4.
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
David Kauchak CS52 – Spring 2016
Adversarial Search Chapter 5.
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Games & Adversarial Search
Artificial Intelligence
Games & Adversarial Search
Adversarial Search.
Artificial Intelligence
Game playing.
Games & Adversarial Search
Games & Adversarial Search
NIM - a two person game n objects are in one pile
Instructor: Vincent Conitzer
Minimax strategies, alpha beta pruning
Game Playing Fifth Lecture 2019/4/11.
Games & Adversarial Search
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Minimax strategies, alpha beta pruning
Adversarial Search Game Theory.
CS51A David Kauchak Spring 2019
Games & Adversarial Search
Adversarial Search Chapter 6 Section 1 – 4.
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Artificial Intelligence Lecture 7 – Adversarial Search Dr. Muhammad Adnan Hashmi 2 January 2019

MAEs and Games Multi-agent environment: every agent needs to consider the actions of the other agents, in order to optimize its own welfare Normally considered in terms of economies Cooperative: Agents act collectively to achieve a common goal Competitive: Agents compete against each other Their goals are in conflict Gives rise to the concept of adversarial search problems – often known as games.

Game Theory It’s a branch of economics Views any MAE as a game provided that the impact of each agent on the other is “significant”, i.e., able to affect the actions of the other agent(s) In AI, “game” is a specialized concept: Deterministic, fully-observable environments Two agents whose actions must alternate Utility values at the end of the game are always equal and opposite +1 = Chess winner -1 = Chess looser. 2 January 2019

AI Games Tackled by Konrad Zuse, Claude Shannon, Norbert Wiener, Alan Turing Have seen lot of successes recently, e.g., DeepBlue Game states are easy to represent: Agents restricted by a limited action rules Outcomes defined by precise rules Games: interesting because they are hard to solve: Chess: average branching factor of 35 If 50 moves by each player, search tree has 35100 nodes! 2 January 2019

Games vs. Search problems In typical search problems, we optimize a measure to acquire the goal: there is no opponent In games, there is an "Unpredictable" opponent Strict penalty on an inefficient move Stringent time constraints Unlikely to find goal, must approximate Requires some type of a decision to move the search forward.

Types of Games 2 January 2019

Game Formulation Initial state Successor function Terminal state test Utility function: defining the usefulness of the terminal states from the point of view of one of the players. Imagine 2 players of tic-tac-toe: MAX and MIN MAX moves first: We can generate a game tree The terminal states are at the leaves MAX should play in order to maximize its utility, which will minimize the utility for MIN This is called a Zero-Sum Game. 2 January 2019

Game tree (2-player, deterministic, fully observable) This terminal state is one of the best for MAX and one of the worst for MIN This terminal state is one of the worst for MAX and one of the best for MIN

Optimal Strategy For MAX This is a MAE In discovering the sequence of optimal moves by MAX, we have to consider that MIN is taking moves as well So, the optimal strategy will tell how should MAX play against MIN (by considering the moves of the latter), in order to win the game Let us consider a shortened game tree of TIC-TAC-TOE Numbers are the utilities Ply: a move by MAX followed by a move from MIN. 2 January 2019

Shortened Game Tree Move of MAX Move of MIN

Minimax When it is the turn of MAX, it will always take an action in order to maximize its utility, because it’s winning configurations have high utilities When it is the turn of MIN, it will always take an action in order to minimize its utility, because it’s winning configurations have low utilities In order to implement this, we need to define a measure in each state that takes the move of the opponent into account: This measure is called Minimax. 2 January 2019

Minimax Minimax represents the utility of a state, given that both MAX and MIN will play optimally till the end of the game In any state s, one or more actions are possible For every possible new state that can be transited into from s, we compute the minimax value The term “Minimax” is used because: the opponent is always trying to minimize the utility of the player, and the player is always trying to maximize this minimized selection of the opponent. Confused? See next slide… 2 January 2019

Minimax Consider “3” at Level 1: MIN selects an action (A11) that leads to a state of minimum utility for MAX, i.e., minimum{3,12,8} Consider “3” at Level 0: MAX selects an action (A1) that leads to a state of maximum utility for MIN, i.e., maximum{3,2,2} Both are opposing what is best for the other. 2 January 2019

Minimax At each node, MAX will always select the action with highest minimax value (it wants to reach states with higher utilities) At each node, MIN will always select the action with lowest minimax value (it wants to reach states with lower utilities). 2 January 2019

Minimax algorithm Depth-First Exploration Recursion: Winds all the way to the terminal nodes, and then unwinds back by backing up the values Min(minimax) for MIN moves Max(minimax) for MAX moves

Properties of Minimax Complete? Yes (if tree is finite) Optimal? Yes (against an optimal opponent) Time complexity? O(bm) Space complexity? O(bm) (depth-first exploration) For chess, b ≈ 35, m ≈100 for "reasonable" games  exact solution completely infeasible We need to think of a way to cut down the number of search paths.

α-β pruning example

α-β pruning example

α-β pruning example

α-β pruning example

α-β pruning example

Why is it called α-β? α is the value of the best (i.e., highest-value) choice found so far at any choice point along the path for MAX If v is worse than α, MAX will avoid it  prune that branch Define β similarly for MIN.

The α-β algorithm

Properties of α-β Pruning does not affect final result Good move ordering improves effectiveness of pruning With "perfect ordering," time complexity = O(bm/2)  doubles depth of search A simple example of the value of reasoning about which computations are relevant (a form of meta-reasoning)

Questions 2 January 2019