Partial Ordering Planning Lecture Module 10. Partial Ordering Any planning algorithm that can place two actions into a plan without specifying which comes.

Slides:



Advertisements
Similar presentations
Planning.
Advertisements

Heuristic Search techniques
SYMBOL TABLES &CODE GENERATION FOR EXECUTABLES. SYMBOL TABLES Compilers that produce an executable (or the representation of an executable in object module.
Planning II: Partial Order Planning
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Intermediate Code Generation
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
1 MODULE name (parameters) “Ontology” “Program” “Properties” The NuSMV language A module can contain modules Top level: parameters less module Lower level.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Sussman anomaly - analysis The start state is given by: ON(C, A) ONTABLE(A) ONTABLE(B) ARMEMPTY The goal by: ON(A,B) ON(B,C) This immediately leads to.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Section 2.3 Gauss-Jordan Method for General Systems of Equations
Artificial Intelligence 2005/06
Artificial Intelligence Chapter 11: Planning
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Tirgul 9 Amortized analysis Graph representation.
1 Planning. R. Dearden 2007/8 Exam Format  4 questions You must do all questions There is choice within some of the questions  Learning Outcomes: 1.Explain.
Chapter 6 Stacks. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 6-2 Chapter Objectives Examine stack processing Define a stack abstract.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Linear Programming Applications
CHAPTER 3 : STACKS 3.1 Understand Stacks 3.2 Implement the operation of stack By : Suzila Yusof.
Table of Contents Solving Systems of Linear Equations - Gaussian Elimination The method of solving a linear system of equations by Gaussian Elimination.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
Nonlinear Planning Lecture Module 9. Nonlinear Planning with Goal Set Generate a plan by doing some work on one goal, then some on another and then some.
22/11/04 AIPP Lecture 16: More Planning and Operators1 More Planning Artificial Intelligence Programming in Prolog.
Prerequisites: Fundamental Concepts of Algebra
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Parallel Algorithms Patrick Cozzi University of Pennsylvania CIS Spring 2012.
1 Chapter 17 Object-Oriented Data Structures. 2 Objectives F To describe what a data structure is (§17.1). F To explain the limitations of arrays (§17.1).
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
For Friday No reading Homework: –Chapter 11, exercise 4.
Chapter 12: Collections by Lewis and Loftus (Updated by Dan Fleck) Coming up: Collections.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
ECSE Software Engineering 1I HO 4 © HY 2012 Lecture 4 Formal Methods A Library System Specification (Continued) From Specification to Design.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
Advanced Problem Solving Systems: Planning  In order to solve nontrivial problems, it is necessary to combine 1.Basic problem solving strategies 2.Knowledge.
Advanced Problem Solving Systems: Planning Lecture Module 8.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Pima Elementary School 5th Grade Math Ms. Haas
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Intro to Planning Or, how to represent the planning problem in logic.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
CHP-3 STACKS.
Planning I: Total Order Planners Sections
Top 50 Data Structures Interview Questions
Introduction To Repetition The for loop
The minimum cost flow problem
Pushdown Automata.
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
Linear Algebra Lecture 4.
Problem Reduction -AND-OR Graph -AO* Search CSE 402 K3R23/K3R20.
Class #17 – Thursday, October 27
Graphplan/ SATPlan Chapter
Class #19 – Monday, November 3
Cs212: Data Structures Computer Science Department Lecture 6: Stacks.
UNIT V Run Time Environments.
Data Structures & Algorithms
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
Implementation of Learning Systems
Presentation transcript:

Partial Ordering Planning Lecture Module 10

Partial Ordering Any planning algorithm that can place two actions into a plan without specifying which comes first is called a partial- order planner. actions dependent on each other are ordered in relation to themselves but not necessarily in relation to other independent actions. The solution is represented as a graph of actions, not a sequence of actions.

Cont.. Let us define following two macros for the sake of simplicity for block world example.

Cont… To achieve Goal state ON(a,b), move ‘b’ onto table should occur before move ‘a’ to ‘b’ Hence partial ordering MOT(b)  MOVE(a, b) holds true MOT(b) should come before MOVE(a, b) in the final plan. Similarly to achieve Goal state ON(c,d), partial order MOT(d)  MOVE(c, d) is established.

Partial Graph Partial graph contains the dummy actions START and FINISH to mark the beginning and end of the plan in the graph. The planner can generate total plans from the graph.

Total Plans Generation From this representation total six plans are generated. Each of these is called a linearization of the partial-order plan.

Nonlinear Planning - Constraint Posting Idea of constraint posting is to build up a plan by incrementally hypothesizing operators, partial ordering between operators and binding of variables within operators At any given time in planning process, a solution is a partially ordered. To generate actual plan, convert the partial order into total orders.

Steps in Non Linear Plan Generation Step addition Creating new operator (step) for a plan Promotion Constraining one operator to come before another in final plan Declobbering Placing operator Op2 between two operators Op1 and Op3 such that Op2 reasserts some pre conditions of Op3 that was negated by Op1 Simple Establishment Assigning a value to a variable, in order to ensure the pre conditions of some step.

Algorithm 1. Initialize S to be set of propositions in the goal state. 2. Remove some unachieved proposition P from S. 3. Achieve P by using step addition, promotion, declobbering, simple establishment. 4. Review all the steps in the plan, including any new steps introduced by step addition to see if any of their preconditions are unachieved. 5. Add to S the new set of unachieved preconditions. 6. If S = , complete the plan by converting the partial order of steps into a total order and instantiate any variables as necessary and exit. 7. Otherwise go to step 2.

Example: Sussman anomaly problem Begin with null plan (no operators). Look at the goal state and find the operators that can achieve them. There are two operators (steps) ST(A, B) and ST(B,C) which have post conditions as ON(A,B) and ON(B, C).

Cont… Pre CondCL(B)CL(C ) *HOLD(A)*HOLD(B) _________________________________________ OperatorST(A, B)ST(B,C) _________________________________________________ ON(A, B)ON(B,C) Post CondAEAE ~ CL(B)~ CL(C ) ~ HOLD(A)~ HOLD(B) ______________________________________________ Here unachieved conditions are marked with *. HOLD in both the cases is not true as AE is true initially. Introduce new operator (step) to achieve these goals. This is called operator (step) addition. Add PU operator on both the goals.

Cont... Pre Con*CL(A)*CL(B ) ONT(A)ONT(B)*AE OperatorPU(A)PU(B) Post CondHOLD(A)HOLD(B) ~ ONT(A)~ ONT(B)~ AE ~ CL(A)~ CL(B ) ______________________________________________________ Pre ConCL(B)CL(C ) *HOLD(A)*HOLD(B) OperatorST(A, B)ST(B,C) ON(A, B)ON(B,C) Post CondAEAE ~ CL(B)~ CL(C ) ~ HOLD(A)~ HOLD(B)

Cont.. It is clear that in a final plan, PU must precede STACK operator. Introduce the ordering as follows: Whenever we employ operator, we need to introduce ordering constraints called promotion. ___________________Plan 1____________________ PU(A)  ST(A, B) PU(B)  ST(B, C) _______________________________________ Here we partially ordered operators and four unachieved pre conditions:- CL(A), CL(B ), AE on both the paths CL(A) is unachieved as C is on A in initial state. Also CL(B) is unachieved even though top of B is clear in initial state but there exist a operator ST(A,B) with post condition as ~CL(B). Initial State: ON(C, A)  ONT(A)  ONT(B)  AE  CL(C)  CL(B)

Cont.. If we make sure that PU(B) precede ST(A, B) then CL(B) is achieved. So post the following constraints. ___________________Plan 1____________________ PU(A)  ST(A, B) PU(B)  ST(B, C) ____________________Plan2____________________ PU(B)  ST(A, B) ______________________________________ Note that pre cond CL(A) of PU(A) still is unachieved. Let us achieve AE preconditions of each Pick up operators before CL(A). Initial state has AE. So one PU can achieve its pre cond but other PU operator could be prevented from being executed. Assume AE is achieved as pre condition of PU(B) as its other preconditions have been achieved. So put constraint.

Cont.. Similarly, following plans are generated ___________________ Plan3___________________ PU(B)  PU(A) (pre conds of PU(A) are not still achieved.) _______________________________________ Since PU(B) makes ~AE and ST(B,C) will make AE which is precondition of PU(A), we can put the following constraint. _________________Plan4________________________ PU(B)  ST(B, C)  PU(A) ____________________________________________ Here PU(B) is said to clobber pre condition of PU(A) and ST(B, C) is said to declobber it. (removing deadlock)

Cont.. _________________ Plan 5 _________________ US(C, A)  ST(B, C) US(C, A)  PU(A) US(C, A)  PU(B) ________________________________________ Declobbering: _______________ Plan 6 _________________ US(C, A)  PD(C)  PU(B) _____________________________________

Cont.. Combine the following partial plans to generate final plan. ____________________________________________ PU(A)  ST(A, B) PU(B)  ST(B, C) _____________________________________________ PU(B)  ST(A, B) ____________________________________________ PU(B)  PU(A) (pre conds of PU(A) are not still achieved.) _____________________________________________ PU(B)  ST(B, C)  PU(A) __________________________________________ US(C, A)  ST(B, C) US(C, A)  PU(A) US(C, A)  PU(B) ____________________________________________ US(C, A)  PD(C)  PU(B) ____________________________________________ Final plan: US(C,A)  PD(C)  PU(B)  ST(B,C)  PU(A)  ST(A,B)

Learning Plans In many problems, plans may share a large number of common sequence of actions. So planner requires the ability to recall and modify or reuse the existing plans. Macro operators can be defined as sequence of operators for performing some task and saved for future use. Example: Reverse_blocks(X, Y) can be macro operator with plan – US(X, Y), PD(X), PU(Y), ST(Y, X), where X, Y are variables. The generalized plan schema is called MACROP and is stored in a data structure called Triangle table. It helps planner to build new plans efficiently by using existing plans.

Triangle Table A useful graphical mechanism to show the plan evolution as well as link the succession of operators in a triangle table. The structure of the table is staircase type which gives compact summary of the plan. Let us use the following acronyms. A(OP)  add-list of OP CC  copy content of above cell D(OP)  del-list of OP

Triangle Table – cont…

Cont.. Each column of the table is headed by one of the operators in the plan in the order of their occurrence. The table displays the preconditions of each operator. The cells below each operator OP contains predicates added by the operator. The cells left to the cell mentioned below OP contains predicates that are preconditions of OP.

Rules for forming such tables Given a plan requiring the successive use of k operators, Op1, Op2, …Opk, the table is constructed as follows: The triangle table is constructed that consists of (k+1) rows and columns. The columns are indexed by ‘j’ from left to right and rows indexed by ‘i’ from top to bottom with values 0 to k. The construction of triangle table starts with Cell(0, 0) containing the start state predicates.

Cont… Traverse the columns from top to bottom having reduction in the system state entries due to the succession of operator del-list applications. Finally when the table is complete, the union of the facts in the bottom row (n = k) represents the goal state. Let us consider macro-operator “reverse” with the sequence of operators as: US(X,Y), PD(X), PU(Y), S(Y,X) Here X and Y are variables and can be bound with actual objects.

Algorithm for T riangle Table Entries in the cells are made as follows: Cell(0,0) contains the start state In Cell(k, k), for k > 0, contains add-list of operator OP k. For each cell Cell(i, j), i > j, copy the contents of Cell(i-1, j) with del-list of operator OP j removed.

Cont..