1 State-Space representation and Production Systems Introduction: what is State-space representation? What are the important trade-offs? (E.Rich, Chapt.2)

Slides:



Advertisements
Similar presentations
Problems and Search Chapter 2.
Advertisements

Applications Computational LogicLecture 11 Michael Genesereth Spring 2004.
Constraint Satisfaction Problems
Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization.
Artificial Intelligence: Knowledge Representation
Advanced Piloting Cruise Plot.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Multicriteria Decision-Making Models
Chapter 1 The Study of Body Function Image PowerPoint
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
UNITED NATIONS Shipment Details Report – January 2006.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 10 second questions
Chapter 6 File Systems 6.1 Files 6.2 Directories
1 Chapter 12 File Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Pole Placement.
Chapter 4: Informed Heuristic Search
Chapter Objectives To learn about recursive data structures and recursive methods for a LinkedList class To understand how to use recursion to solve the.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
Data Structures Using C++
ABC Technology Project
EU market situation for eggs and poultry Management Committee 20 October 2011.
Chapter 9 -- Simplification of Sequential Circuits.
Hash Tables.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
Chapter 5 Plan-Space Planning.
VOORBLAD.
Name Convolutional codes Tomashevich Victor. Name- 2 - Introduction Convolutional codes map information to code bits sequentially by convolving a sequence.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
6.4 Best Approximation; Least Squares
25 seconds left…...
Chapter 6 Equations 6.1 Solving Trigonometric Equations 6.2 More on Trigonometric Equations 6.3 Trigonometric Equations Involving Multiples Angles 6.4.
Solving Systems of Linear Equations By Elimination
Januar MDMDFSSMDMDFSSS
Analyzing Genes and Genomes
Chapter 12 Analyzing Semistructured Decision Support Systems Systems Analysis and Design Kendall and Kendall Fifth Edition.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Local Search Jim Little UBC CS 322 – CSP October 3, 2014 Textbook §4.8
Intracellular Compartments and Transport
PSSA Preparation.
Chapter 11 Describing Process Specifications and Structured Decisions
Essential Cell Biology
Mani Srivastava UCLA - EE Department Room: 6731-H Boelter Hall Tel: WWW: Copyright 2003.
1 Chapter 13 Nuclear Magnetic Resonance Spectroscopy.
Energy Generation in Mitochondria and Chlorplasts
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Part2 AI as Representation and Search
1 State-Space representation and Production Systems Introduction: what is State-space representation? (E.Rich, Chapt.2) Basis search methods. (Winston,
Artificial Intelligence Search Problem. Search is a problem-solving technique to explores successive stages in problem-solving process.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Problems, Problem Spaces and Search
Introduction to State Space Search
Presentation transcript:

1 State-Space representation and Production Systems Introduction: what is State-space representation? What are the important trade-offs? (E.Rich, Chapt.2) Basis search methods. (Winston, Chapt.4 + Russel&Norvig) Optimal-path search methods. (Winston, Chapt.5 + Russel&Norvig) Advanced properties and variants. (Rich, Chapt.3 + Russel&Norvig + Nilsson) Game Playing (Winston, Chapt.6 + Rich + Russel&Norvig )

2

3 State-space representation: Introduction and trade-offs  What is state-space representation?  Which are the technical issues that arise in that context?  What are the alternatives that the paradigm offers to solve a problem in the state-space representation?

4 Example: the 8-puzzle.  Given: a board situation for the 8-puzzle:  Problem: find a sequence of moves (allowed under the rules of the 8-puzzle game) that transform this board situation in a desired goal situation:

5 State-space representation: general outline:  Select some way to represent states in the problem in an unambiguous way.  Formulate all actions that can be preformed in states:  including their preconditions and effects  == PRODUCTION RULES  Represent the initial state (s).  Formulate precisely when a state satisfies the goal of our problem.  Activate the production rules on the initial state and its descendants, until a goal state is reached.

6 Initial issues to solve:  How to formulate production rules? (repr. 2 )  Ex.:  express how/when squares may be moved?  Or: express how/when the blank space is moved?  When is a rule applicable to a state? (matching)  How to formulate when the goal criterion is satified and how to verify that it is?  How/which rules to activate? (control)  How to represent states? (repr.1)  Ex.: using a 3 X 3 matrix

7 The (implicit) search tree  Each state-space representation defines a search tree: !/2nodes! goal  But this tree is only IMPLICITLY available !!

8 A second example: Chess  Problem: develop a program that plays chess (well) A B C D E F G H  1. A way to represent board situations in an unambiguous way:  Ex.: List: (( king_black, 8, C), ( knight_black, 7, B), ( knight_black, 7, B), ( pawn_black, 7, G), ( pawn_black, 7, G), ( pawn_black, 5, F), ( pawn_black, 5, F), ( pawn_white, 2, H), ( pawn_white, 2, H), ( king_white, 1, E)) ( king_white, 1, E))

9 Chess (2):  2. Describe the rules that represent allowed moves:  Ex.: A B C D E F G H ( (pawn_white,2,x), (blank, 3, x), (blank, 4, x) ) add( ( pawn_white, 4, x) ), remove( (pawn_white, 2, x) )

10 Chess (3):  3. Provide a way to check whether a rule is applicable to some state:  Ex.: Matching mechanism !! ( (pawn_white,2,x), (blank, 3, x), (blank, 4, x) ) add( ( pawn_white, 4, x) ), remove( (pawn_white, 2, x) ) List: (( king_black, 8, C), ( knight_black, 7, B), ( knight_black, 7, B), ( pawn_black, 7, G), ( pawn_black, 7, G), ( pawn_black, 5, F), ( pawn_black, 5, F), ( pawn_white, 2, H), ( pawn_white, 2, H), ( king_white, 1, E)) ( king_white, 1, E)) A B C D E F G H

11 Chess (4):  4. How to specify a state in which the goal is reached (= a winning state):  Ex.: win( black )  attacked( king_white ) and no_legal_move( king_white ) no_legal_move( king_white ) + similar definitions for: + similar definitions for: attacked( Piece )  … no_legal_move( Piece ) ...

12 Chess (5):  5. A way to verify whether a winning state is reached.  Ex.: ?- win( black ). win( black )  attacked( king_white ) and no_legal_move( king_white ) no_legal_move( king_white )… Need a theorem prover ( e.g. Prolog) to verify that the state is a winning one.

13 Chess (6).  6. The initial state. A program that is ABLE to play chess. The control problem ! Main focus of this entire chapter of the course !!  7. A mechanism that selects in each state an appropriate rule to apply.

14 Chess (7). Move 1 Move 2 Move 3 Implicit search tree ~15 ~ (15) 2 ~ (15) 3 Need very efficient search techniques to find good paths in such combinatorial trees.

15 Very many issues and trade-offs: 1. How to choose the rules? 2. Should we search through the implicit tree or through an implicit graph? 3. Do we need an optimal solution, or just any solution? ‘optimal path problems’ ‘optimal path problems’ 4. Can we decompose states into components on which simple rules can in an independent way? Problem reduction or decomposability Problem reduction or decomposability 5. Should we search forwards from the initial state, or backwards from a goal state?

16 1. Choice of the rules Example: The water jugs problem:  Given: 2 jugs:  Problem: fill the 4 l jug with 2 l of water. 4 l 3 l  Representation:  a state:  [content of large jug, content of small jug]  initial state:  [ 0, 0 ]  goal state:  [ 2, x ]

17 Rules for the jugs example:  Fill large:  [ x, y ] and x < 4  [ 4, y ]  Fill small:  [ x, y ] and y < 3  [ x, 3 ]  Empty large:  [ x, y ] and x > 0  [ 0, y ]  Remove some from large:  [ x, y ] and x > d > 0  [ x - d, y ]  Empty (remove some from) small.

18 Rules for the jugs example (2):  Fill large from small: [ x, y ] and x + y  4 and y > 0  [ 4, y-(4-x) ]  Fill small from large.   Empty small in large: [ x, y ] and x + y  4 and y > 0  [ x + y, 0 ] [ x, y ] and x + y  4 and y > 0  [ x + y, 0 ]  Empty large in small.

19 [ 0, 0 ] [ 0, 3 ] Fill small [ 3, 0 ] Empty small in large in large [ 3, 3 ] Fill small [ 4, 2 ] Fill large from small Part of the state space: [ 4, 0 ] [ 0, 0 ] [ 0, 3-d1] [ 4, 3] [ 0, 0] [ 0, 3-d1-d2] [ 3-d1, 0] [ 4, 3-d1] Redundant subspace ! * * [ 2, 0 ] Empty small in large [ 0, 2 ] Empty large

20 Rules for the jugs example:  Fill large:  [ x, y ] and x < 4  [ 4, y ]  Fill small:  [ x, y ] and y < 3  [ x, 3 ]  Empty large:  [ x, y ] and x > 0  [ 0, y ]  Remove some from large:  [ x, y ] and x > d > 0  [ x - d, y ]  Empty (remove some from) small. *

21 Part of the state space: [ 0, 0 ] [ 0, 3 ] [ 3, 0 ] [ 3, 3 ] [ 4, 2 ] [ 0, 2 ] [ 2, 0 ] Fill small Empty small in large in large Fill small Fill large from small Empty large Empty small in large [ 0, 0 ] [ 0, 3 ] [ 0, 0 ] LOOP !

22 2. Avoiding loops: search in trees or graphs ? [ 0, 0 ] [ 0, 3 ] [ 4, 0 ] Avoids generating loops: but needs to keep track of ALL the nodes. [ 1, 3 ] [ 4, 3 ] [ 3, 0 ] [ 1, 0 ] [ 3, 3 ]...

23 3. Any path, versus shortest path, versus best path: Ex.: 8-puzzle: any or shortest path problem. Ex.: Traveling salesperson problem:  Find a sequence of cities ABCDEA such that the total distance is MINIMAL. Boston Miami NewYork SanFrancisco Dallas Best path problem

24 State space representation:  State:  the list of cities that are already visited  Ex.: ( NewYork, Boston )  Initial state:  Ex.: ( NewYork )  Rules:  add 1 city to the list that is not yet a member  add the first city if you already have 5 members  Goal criterion:  first and last city are equal Boston Miami NewYork SanFrancisco Dallas

25 ( NewYork ) ( NewYork, Boston ) Boston ) ( NewYork, Miami ) Miami ) ( NewYork, Dallas ) Dallas ) ( NewYork, Frisco ) Frisco ) ( NewYork, Boston, Boston, Miami ) Miami ) ( NewYork, Frisco, Frisco, Miami ) Miami ) Keep track of accumulated costs in each state if you want to be sure to get the best path.

26 4. Problem reduction or problem decomposition: Ex.: Computing symbolic integrals:  State: the integral to compute  Rules: integration reduction rules  Goal: all integrals have been eliminated AND-OR-tree search  x 2 + 3x + sin 2 x. cos 2 x dx  x 2 dx  3x dx  sin 2 x. cos 2 x dx x 3 /3 3  xdx  ((sin2x)/2) 2 dx  (1 - cos 2 x).cos 2 x dx AND

27 Necessary for decomposition: independence of states: Ex.: Blocks world problem.  Initially: C is on A and B is on the table.  Rules: to move any free block to another or to the table  Goal: A is on B and B is on C. A C B Goal: A on B and B on C A C B Goal: A on B A C B Goal: B on C AND-OR-tree? AND

28 A C B Goal: A on B A C B Goal: B on C AND ACB Goal: A on B A C B A CB But: branches cannot be combined

29 5. Forward versus backward reasoning:  Forward reasoning (or forward chaining): from initial states to goal states.

30 5. Forward versus backward reasoning:  Backward reasoning (or backward chaining): from goal states to initial states.

31 Criteria:  Branching factor (Ex.: see previous slide)  Sometimes: no way to start from the goal states  because there are too many (Ex.: chess)  because you can’t (easily) formulate the rules in 2 directions In this case: even the same rules !!  Sometimes equivalent: (Ex.: 8-puzzle:)

32 Criteria (2):  Other possibility: middle-out reasoning.  The ratio of initial states versus goal states: Ex.: finding your way to some destination Backward reasoning!  Providing explanation facilities: (Ex.: expert systems with user interaction)

33  Definition: Programs that implement approaches to search problems using the state space representation. Programs that implement approaches to search problems using the state space representation. Production-rule systems:  Consist of:  A rule base,  a ‘working memory’, containing the state(s) that have currently been reached,  a control strategy for selecting the rules to apply next to the states in the ‘working memory’ (including techniques for matching, verifying preconditions and whether a goal state has been reached)