Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 8 of 42 Monday, 11 September.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Adversarial Search Chapter 6 Section 1 – 4.
Adversarial Search Chapter 5.
Artificial Intelligence for Games Game playing Patrick Olivier
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.
Computing & Information Sciences Kansas State University Lecture 20 of 42 CIS 530 / 730 Artificial Intelligence Lecture 20 of 42 Introduction to Classical.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
This time: Outline Game playing The minimax algorithm
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
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.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Constraint Satisfaction Problems
Constraint Satisfaction Problems
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 4 Constraint Satisfaction Problems Instructor: Alireza Tavakkoli September 17, 2009 University.
Game Playing. Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 9 of 42 Wednesday, 13 September.
Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture 10 of 42 William H. Hsu Department.
University of Amsterdam Search, Navigate, and Actuate – Search through Game Trees Arnoud Visser 1 Game Playing Search the action space of 2 players Russell.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 14 Friday, 10 September.
Computing & Information Sciences Kansas State University Lecture 9 of 42 CIS 530 / 730 Artificial Intelligence Lecture 9 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University Wednesday, 15 Oct 2008CIS 530 / 730: Artificial Intelligence Lecture 20 of 42 Wednesday, 15 October.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Computing & Information Sciences Kansas State University Wednesday, 22 Oct 2008CIS 530 / 730: Artificial Intelligence Lecture 22 of 42 Wednesday, 22 October.
Computing & Information Sciences Kansas State University Wednesday, 12 Sep 2007CIS 530 / 730: Artificial Intelligence Lecture 9 of 42 Wednesday, 12 September.
CSC 8520 Spring Paula Matuszek Based on Hwee Tou Ng, aima.eecs.berkeley.edu/slides-ppt, which are based on Russell, aima.eecs.berkeley.edu/slides-pdf.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Computing & Information Sciences Kansas State University Wednesday, 25 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 26 of 42 Wednesday. 25 October.
Computing & Information Sciences Kansas State University Lecture 8 of 42 CIS 530 / 730 Artificial Intelligence Lecture 8 of 42 William H. Hsu Department.
1 Chapter 5 Constraint Satisfaction Problems. 2 Outlines  Constraint Satisfaction Problems  Backtracking Search for CSPs  Local Search for CSP  The.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 42 Wednesday, 14.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Computing & Information Sciences Kansas State University Monday, 25 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 14 of 42 Monday, 25 September.
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Satisfaction Problems University of Berkeley, USA
Computing & Information Sciences Kansas State University Monday, 23 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 25 of 42 Monday, 23 October.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 24 of 42 Friday, 20 October.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 7 of 42 Friday, 08 September.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Computing & Information Sciences Kansas State University Monday, 09 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 19 of 42 Monday, 09 October.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
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.
Constraint Propagation CS121 – Winter Constraint Propagation2 Constraint Propagation … … is the process of determining how the possible values of.
Constraint Satisfaction Problems
Computing & Information Sciences Kansas State University Wednesday, 25 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 26 of 42 Wednesday. 25 October.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Artificial Intelligence AIMA §5: Adversarial Search
Artificial Intelligence
Constraint Propagation
Artificial Intelligence
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Presentation transcript:

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 8 of 42 Monday, 11 September 2006 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course page: Course web site: Instructor home page: Reading for Next Class: Section 6.2 – 6.8, p. 162 – 189, Russell & Norvig 2 nd edition CSP Techniques and Game Tree Search Discussion: Project Plans, MP2 Design

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture Outline Reading for Next Class: Sections 6.2 – 6.8, R&N 2 e Today: CSP Concluded This Week: Intro to Game Theory  Game tree search: minimax, alpha-beta  Ideas from economics  Relationship between heuristics for games and other heuristics  Role of constraints, learning Looking Ahead: Knowledge Representation and Logic  Rest of this month and first week of October  Classical knowledge representation  Relation to planning  Where things break in practice  Segue (back) to uncertain reasoning and preferences Wednesday: More on Game Theory, Game Tree Search

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Constraint satisfaction problems (CSPs): Review Standard search problem:  state is a "black box“ – any data structure that supports successor function, heuristic function, and goal test CSP:  state is defined by variables X i with values from domain D i  goal test is a set of constraints specifying allowable combinations of values for subsets of variables Simple example of a formal representation language Allows useful general-purpose algorithms with more power than standard search algorithms © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Constraint graph: Review Binary CSP: each constraint relates two variables Constraint graph: nodes are variables, arcs are constraints © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Standard search formulation: Review Let's start with the straightforward approach, then fix it States are defined by the values assigned so far Initial state: the empty assignment { } Successor function: assign a value to an unassigned variable that does not conflict with current assignment  fail if no legal assignments Goal test: the current assignment is complete 1.This is the same for all CSPs 2.Every solution appears at depth n with n variables  use depth-first search 3.Path is irrelevant, so can also use complete-state formulation 4.b = (n - l )d at depth l, hence n! · d n leaves © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Arc consistency algorithm AC-3: Review Time complexity: O(n 2 d 3 ) © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Local search for CSPs Hill-climbing, simulated annealing typically work with "complete" states, i.e., all variables assigned To apply to CSPs:  allow states with unsatisfied constraints  operators reassign variable values Variable selection: randomly select any conflicted variable Value selection by min-conflicts heuristic:  choose value that violates the fewest constraints  i.e., hill-climb with h(n) = total number of violated constraints © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Example: 4-Queens States: 4 queens in 4 columns (4 4 = 256 states) Actions: move queen in column Goal test: no attacks Evaluation: h(n) = number of attacks Given random initial state, can solve n-queens in almost constant time for arbitrary n with high probability (e.g., n = 10,000,000) © 2004 S. J. Russell From: Reused with permission.

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Games versus Search Problems Unpredictable Opponent  Solution is contingency plan  Time limits  Unlikely to find goal  Must approximate Plan of Attack  Algorithm for perfect play (J. von Neumann, 1944)  Finite horizon, approximate evaluation (C. Zuse, 1945; C. Shannon, 1950, A. Samuel, )  Pruning to reduce costs (J. McCarthy, 1956) Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Types of Games Information: Can Know (Observe)  … outcomes of actions / moves?  … moves committed by opponent? Uncertainty  Deterministic vs. nondeterministic outcomes  Thought exercise: sources of nondeterminism? Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Minimax Adapted from slides by S. Russell UC Berkeley Figure 6.2 p. 164 R&N 2e

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Minimax Algorithm: Decision and Evaluation  what’s this? Figure 6.3 p. 166 R&N 2e Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Properties of Minimax Complete?  … yes, provided following are finite:  Number of possible legal moves (generative breadth of tree)  “Length of game” (depth of tree) – more specifically?  Perfect vs. imperfect information?  Q: What search is perfect minimax analogous to?  A: Bottom-up breadth-first Optimal?  … yes, provided perfect info (evaluation function) and opponent is optimal!  … otherwise, guaranteed if evaluation function is correct Time Complexity?  Depth of tree: m  Legal moves at each point: b  O(b m ) – NB, m  100, b  35 for chess! Space Complexity? O(bm) – why? Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Resource Limits Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Static Evaluation Function Example: Chess Figure 6.8 p. 173 R&N 2e Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Do Exact Values Matter? Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Cutting Off Search [1] Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Cutting Off Search [2] Issues  Quiescence  Play has “settled down”  Evaluation function unlikely to exhibit wild swings in value in near future  Horizon effect  “Stalling for time”  Postpones inevitable win or damaging move by opponent  See: Figure 5.5 R&N Solutions?  Quiescence search: expand non-quiescent positions further  “No general solution to horizon problem at present Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Why Prune? Figure 6.5 p. 168 R&N 2e Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Alpha-Beta (  -  ) Pruning: Example [1] ≥ MAX MIN MAX 128 ≤ ≤ 14 2 ≤52 Figure 6.5 p. 168 R&N 2e Adapted from slides by S. Russell UC Berkeley ,  here? What are ,  values here?

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Alpha-Beta (  -  ) Pruning: Modified Minimax Algorithm Adapted from slides by S. Russell UC Berkeley

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Digression: Learning Evaluation Functions Learning = Improving with Experience at Some Task  Improve over task T,  with respect to performance measure P,  based on experience E. Example: Learning to Play Checkers  T: play games of checkers  P: percent of games won in world tournament  E: opportunity to play against self Refining the Problem Specification: Issues  What experience?  What exactly should be learned?  How shall it be represented?  What specific algorithm to learn it? Defining the Problem Milieu  Performance element: How shall the results of learning be applied?  How shall performance element be evaluated? Learning system?

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Summary Points Introduction to Games as Search Problems  Frameworks  Two-player versus multi-player  Zero-sum versus cooperative  Perfect information versus partially-observable (hidden state)  Concepts  Utility and representations (e.g., static evaluation function)  Reinforcements: possible role for machine learning  Game tree Family of Algorithms for Game Trees: Minimax  Propagation of credit  Imperfect decisions  Issues  Quiescence  Horizon effect  Need for pruning

Computing & Information Sciences Kansas State University Monday, 11 Sep 2006CIS 490 / 730: Artificial Intelligence Terminology Constraint Satisfaction Problems (CSP): Min-Conflicts Game Graph Search  Frameworks  Two-player versus multi-player  Zero-sum versus cooperative  Perfect information versus partially-observable (hidden state)  Concepts  Utility and representations (e.g., static evaluation function)  Reinforcements: possible role for machine learning  Game tree: node/move correspondence, search ply Family of Algorithms for Game Trees: Minimax  Propagation of credit  Imperfect decisions  Quiescence  Horizon effect  Alpha-beta pruning