1 DCP 1172 Introduction to Artificial Intelligence Chang-Sheng Chen Topics Covered: Introduction to Planning (generalized state-space search) Means-Ends.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Heuristics, and what to do if you dont know what to do Carl Hultquist.
Heuristic Search techniques
An Introduction to Artificial Intelligence
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Formal Description of a Problem
Part2 AI as Representation and Search
Problem-solving as search. History Problem-solving as search – early insight of AI. Newell and Simon’s theory of human intelligence and problem-solving.
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
State Spaces Introduction to Artificial Intelligence Dr. Robin Burke.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
State-Space Searches. State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
Artificial Intelligence Chapter 11: Planning
1 Chapter 3 Knowledge Representation. 2 Chapter 3 Contents l The need for a good representation l Semantic nets l Inheritance l Frames l Object oriented.
Computer Simulation (1). 8 A (8) Initial State 44 Goal State B (5) C (3) A (8) B (5) C (3) Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7.
1 Solving Problems by Searching. 2 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
1 Chapter 3 Knowledge Representation. 2 Chapter 3 Contents l The need for a good representation l Semantic nets l Inheritance l Frames l Object oriented.
CSE (c) S. Tanimoto, 2008 State-Space Search 1 State-Space Search Motivation: Understanding “dynamics” in AI Statics versus Dynamics of AI Statics:
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
1 Problem Solving We view many situations in life as problems we need to solve Also, much of human behavior can be considered problem solving, even if.
Solving Problems by Searching
State-Space Searches.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
(Classical) AI Planning. Some Examples Route search: Find a route between Lehigh University and the Naval Research Laboratory Project management: Construct.
Artificial Intelligence LECTURE 3 ARTIFICIAL INTELLIGENCE LECTURES BY ENGR. QAZI ZIA 1.
Human Cognitive Processes: psyc 345 Ch. 11: Problem Solving Takashi Yamauchi © Takashi Yamauchi (Dept. of Psychology, Texas A&M University)
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms,
Introduction to Planning Han Yu University of Central Florida.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Partial Ordering Planning Lecture Module 10. Partial Ordering Any planning algorithm that can place two actions into a plan without specifying which comes.
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
1 Search vs. planning Situation calculus STRIPS operators Search vs. planning Situation calculus STRIPS operators.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Problem solving What is problem solving? Weak and strong methods.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
1 Solving Problems by Searching. 2 Terminology State State Space Goal Action Cost State Change Function Problem-Solving Agent State-Space Search.
Informed Search II CIS 391 Fall CIS Intro to AI 2 Outline PART I  Informed = use problem-specific knowledge  Best-first search and its variants.
(Classical) AI Planning. General-Purpose Planning: State & Goals Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table)
Searching for Solutions
Knowledge Representation Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
Searches Algorithms for Exploration. Graphs Graphs represent spatial data How do I get from Augsburg to Wurzburg?
Introduction to State Space Search
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Planning in FOL Systems sequences of actions to achieve goals.
CS621: Artificial Intelligence Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay Lecture 19: Hidden Markov Models.
Recursively Defined Sequences Lecture 40 Section 8.1 Wed, Apr 11, 2007.
Knowledge Representation
L9. Planning Agents L7_exAnswer and explanation Review
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
Constraint Satisfaction Problems vs. Finite State Problems
Abstraction Transformation & Heuristics
Problem Solving by Searching
L11. Planning Agents and STRIPS
Planning Problems On(C, A)‏ On(A, Table)‏ On(B, Table)‏ Clear(C)‏
More on Search: A* and Optimization
Knowledge Representation
CPSC 322 Introduction to Artificial Intelligence
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
State-Space Searches.
State-Space Searches.
HW 1: Warmup Missionaries and Cannibals
Prof. Pushpak Bhattacharyya, IIT Bombay
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
Presentation transcript:

1 DCP 1172 Introduction to Artificial Intelligence Chang-Sheng Chen Topics Covered: Introduction to Planning (generalized state-space search) Means-Ends Analysis (back-chaining)

DCP 1172, Ch. 6 2 Outline What is planning? Formal definitions of planning problems Basic planning algorithms Recent development Appendix Tower of Hanoi Missionaries & Cannibals

DCP 1172, Ch. 6 3 Planning as a Real-World Problem What is Planning? Planning is a search problem that requires to find an efficient sequence of actions that transform a system from a given starting state to the goal state Planning problem has a wide range of applications in the real world planning in daily life game world workflow management

DCP 1172, Ch. 6 4 Planning a Trip Begin PreparationAirline Reservation Hotel ReservationRental Car Reservation Confirm ReservationsEnd

DCP 1172, Ch. 6 5 Towers of Hanoi

DCP 1172, Ch. 6 6 Sliding-Tile Puzzle

DCP 1172, Ch. 6 7 Planning in Workflow Management Start Assembly Examine Order Gather Components Install Motherboard Test Install Internal Disk Install Network Card Assembly Box and Motherboard Plug in CD Insert Modem Plug in Battery Install Video Card End Assembly

DCP 1172, Ch. 6 8 Partial-Order Plan versus Total-Order Plan Partial-order plan consists partially ordered set of actions sequence constraints exist on these actions plan generation algorithm can be applied to transform partial-order plan to total-order plan Total-order plan consists totally ordered set of actions

DCP 1172, Ch. 6 9 Partial-Order Plan Start Get brush Get ladder Paint ceilingFinish

DCP 1172, Ch Total-Order Plan StartGet brushGet ladderPaint ceilingFinish StartGet brushGet ladderPaint ceilingFinish

DCP 1172, Ch Features of Planning Problems Large search space Action is associated with system states Restrictions on the action sequence Valid solution may not exist Optimization requirement

DCP 1172, Ch The Problem Space Formal way to specify the details of a specific problem; captures critical features that influence problem solving Problem Space: Includes the initial, intermediate and goal states of the problem. Also includes the problem solver ’ s knowledge at each of these steps.

DCP 1172, Ch Planning - Information Processing Approach Elements in the Representation of a Problem: The givens (or start state) The goal (or end state) The operators The constraints Example: Tower of Hanoi Problem Concept of the problem solving process Heuristics for moving through the problem space Means-ends analysis 2

DCP 1172, Ch Problem Space: Operators and Goals Operators: The set of legal moves that can be performed during problem solving. Goal: Ultimate solution to the problem. Well-defined problems explicitly specify the final goal. Tower of Hanoi -- all disks moved to target peg Algebra equation -- x = ?? Ill-defined problems only vaguely specify the goal state, the operators or both. Write a coherent essay about ………. Become a millionaire!

DCP 1172, Ch What ’ s Given? Initial state of the problem Goal state of the problem A finite set of actions: pre-conditions: a finite set of conditions for the action to be performed post-conditions: a finite set of conditions that will be changed after the action is performed cost

DCP 1172, Ch What ’ s Output? A sequence of actions that meet the following criteria every action matches the current system state can transform system from initial state to goal state the total cost of the actions is below a specified value

DCP 1172, Ch The Problem Space, Illustrated

DCP 1172, Ch Tower of Hanoi Operators: Moving disks from peg to peg Constraints: Can only move one disk at a time A larger disk can’t be stacked on a smaller disk A disk can’t be moved if there is another disk on top of it Start State Goal State 3

DCP 1172, Ch Idea of a Problem Space.. At each state: Number of possible “next moves” Can be thought of as a “space of all possible moves” 4

DCP 1172, Ch Problem Space Legal moves between two states Problem solving = search in problem space 5

DCP 1172, Ch Towers of Hanoi Optimal solution: 7 moves (shortest route from start state to goal state) 6

DCP 1172, Ch Towers of Hanoi Less than optimal solution: 19 moves 7

DCP 1172, Ch Algorithms vs. Heuristics Algorithms guarantee a solution to a problem e.g., algebra: 3x + 4 = 2x Usually problem specific Heuristics don't guarantee a solution to a problem, cut down search can be used on a lot of problems 9

DCP 1172, Ch Heuristics: Subgoaling Break the problem down into subgoals and solve these one at a time E.g. Tower of Hanoi First concentrate on getting the large disk to the third peg 12

DCP 1172, Ch Heuristics: Means-Ends Analysis I want to go to the mall. What’s the difference between what I have and what I want? One of distance. What changes distance? My car. My car won’t work. What is needed to make it work? A new battery. What has new batteries? An auto repair shop. I want the auto repair shop to put in a new battery; but the shop doesn’t know I need one. What is the difficulty? One of communication. What allows communication? A telephone...and so on. 14

DCP 1172, Ch Means-End Analysis Simon (1972) Solving problems by repeatedly determining the difference between the current state and the goal or subgoal state, then finding an operator that reduces this difference. Used the Tower of Hanoi Problem to study means-end analysis.

DCP 1172, Ch Heuristics: Means-Ends Analysis Identify a difference between current state and goal state Set a subgoal to reduce the difference. Apply an operator to reduce the difference (If operator can ’ t be applied, new subgoal = remove obstacle that prevents applying the operator) 13

DCP 1172, Ch The Recursive Structure of Means-Ends Analysis Transform Reduce Apply

DCP 1172, Ch Algorithms vs Heuristics Algorithmic Search Start Choose Operators Randomly Apply Operator Start Choose Operator Feasible? Favored by Means Ends? Apply Operator yes no Heuristic Search

DCP 1172, Ch Heuristics: Means-Ends Analysis I want to solve the Tower of Hanoi S1: Set a subgoal to move the largest disk to the right S1: I can ’ t move it because the middle disk is on top S2: Set a subgoal to move the middle disk S2: I can;t move it because the small disk is on top S3: Set a subgoal to move the small disk S3 Move the small disk S2: Move the middle disk S1:Move the large disk. S1: I can ’ t move it because there is no free disk 14

DCP 1172, Ch STRIPS Planning System A tuple T = (P, O, I, G), where P is a finite set of ground literals, the conditions O is a finite set of operators I is the initial state, a subset of P G is the goal state, a subset of P

DCP 1172, Ch STRIPS Operators Each operator O has the following attributes PC, a set of ground literals, defines the precondition of the operator D, a set of ground literals, defines the conditions that will be removed after the operation is executed A, a set of ground literals, defines the conditions that will be added after the operation is executed C, the cost of the operation

DCP 1172, Ch A Simple Example - Blocks World BA C C B A Initial State Goal State On(C, A) Clear(Fl) On(A, Fl) Clear(B) On(B, Fl) Clear(C) On(A, B) On(B, C) On(C, Fl) Clear(A) Clear(Fl)

DCP 1172, Ch Graphical Representation of Initial State Start T Clear(Fl)On(A, Fl)On(B, Fl)On(C, A)Clear(B)Clear(C)

DCP 1172, Ch Graphical Representation of Goal State Nil finish On(A, B)On(B, C)On(C, Fl)Clear(A)Clear(Fl)

DCP 1172, Ch Block World - Operator Move(x, y, z) Move block x that is above y to above z PC: On(x,y), Clear(x), Clear(z) D: Clear(z), On(x, y) A: On(x,z), Clear(y), Clear(Fl)

DCP 1172, Ch Graphical Representation of Operator A Clear(y)On(x, z) Move(x, y, z) On(x, y)Clear(x)Clear(z) Operator PC Clear(Fl)

DCP 1172, Ch Forward Chaining Search from the initial state Expand the search tree by finding the set of all applicable operators from the current state applicable means the precondition of the operator is a subset of current state Update current state For every state that is reached, record the shortest path (or path with lowest cost) from the initial state to this state If the goal state is reached, stop the algorithm

DCP 1172, Ch Forward Chaining On(C, A) Clear(Fl) On(A, Fl) Clear(B) On(B, Fl) Clear(C) On(C, Fl) Clear(Fl) On(A, Fl) Clear(B) On(B, Fl) Clear(C) Clear(A) Move(C, A, Fl) Move(B, Fl, C) On(B, C) Clear(Fl) On(C, A) Clear(B) On(A, Fl)

DCP 1172, Ch Backward Chaining Search backward from the goal state Expand the search tree by finding the set of all applicable operators that can reach the current state applicable means set A of the operator is a subset of current state Update the state If the initial state is reached, stop the algorithm The solution is a partial-ordered plan Constraints in action ordering may be violated

DCP 1172, Ch Backward Chaining On(A, B) On(B, C) On(C, Fl) Clear(A) Clear(Fl) Move(A, Fl, B) On(B, C) On(C, Fl) Clear(A) Clear(Fl) On(A, Fl) Clear(B)

DCP 1172, Ch Missionaries & Cannibals Three missionaries and three cannibals on one bank of a river -- need to get to other bank Boat holds 2 Move them across Constraint: the number of cannibals can never be larger than the number of missionaries on any bank of the river Reminder: someone must row boat back Let ’ s play: ’ s play:

DCP 1172, Ch Heuristics - Missionaries & Cannibals Missionaries & Cannibals Problem 3 Missionaries and 3 Cannibals goal: get all 6 across river boat can carry 2 at a time Cannibals can never outnumber Missionaries MMM CCC 15

DCP 1172, Ch MMM CCC (b) MM CC MMM CC (b) MMM MMM C (b) M C CC CCC (b) C M C (b) MM CC (b) CC (b) C CCC (b) CC MM CC (b) MMM CCC (b) MMM C (b) MMM MMM CC (b) MMM C M C Missionaries & Cannibals Solution increasing difference between initial and goal state

DCP 1172, Ch Recent Developments Plan Reuse Graphplan Problem-specific planning Evolutionary computation approach

DCP 1172, Ch Plan Reuse Reuse old plans for new planning problems Consists of two steps plan matching plan modification Research findings generally, plan reuse is even harder than plan from scratch do better only when two problems are close enough plan matching could be the bottleneck

DCP 1172, Ch Graphplan Partial-order general planner Constructing a planning graph before search plan graph contains all possible actions that can be taken in each time step actions that interfere with one another can coexist in the graph More efficient than other general planners in some problems

DCP 1172, Ch Problem-specific Planning Heuristics combined during search heuristics is problem dependent cannot apply to other problems Usually outperforms general planners in specific problems Example in sliding-tile puzzle, accurate estimation of the distance between current state and goal state can speed up the search for a plan

DCP 1172, Ch Evolutionary Computation Approach Non-deterministic algorithm Starts from a set of randomized plan Plans are evolved during generations In each generation evaluate the performance of the plan select the plans to next generation, based on performance crossover, mutation to create new plans

DCP 1172, Ch Experimental Results Towers of Hanoi can solve the 5 and 6-disk case with high probability state-aware crossover does not perform well Sliding-tile puzzle can solve 3*3 problem case with high probability state-aware crossover perform much better since a looser definition of matching state is used Performance scalability is not good Heuristics may be helpful to improve the performance