Partial Order Plan Execution 1 Brian C. Williams 16.412J/6.834J Sept. 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.

Slides:



Advertisements
Similar presentations
Language for planning problems
Advertisements

Chapter 5 Plan-Space Planning.
Planning II: Partial Order Planning
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Causal-link Planning II José Luis Ambite. 2 CS 541 Causal Link Planning II Planning as Search State SpacePlan Space AlgorithmProgression, Regression POP.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Classical Planning via Plan-space search COMP3431 Malcolm Ryan.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
Graph-based Planning Brian C. Williams Sept. 25 th & 30 th, J/6.834J.
Chapter 4 - Planning 4.1 State Space Planning 4.2 Partial Order Planning 4.3Planning in the Real World Part II: Methods of AI.
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.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
Planning Search vs. planning STRIPS operators Partial-order planning.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
CS 460, Session 20 1 Planning Search vs. planning STRIPS operators Partial-order planning.
Artificial Intelligence Chapter 11: Planning
Planning CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanning Supervised.
CS 561, Session Planning Search vs. planning STRIPS operators Partial-order planning.
1 Approaches to Agent Control zAgent senses world, acts to affect world zReactive Control ySet of situation-action rules yE.g. x1) if dog-is-behind-me.
Knowledge Representation II CSE 573. © Daniel S. Weld 2 Logistics Reading for Monday ??? Office Hours No Office Hour Next Monday (10/25) Bonus Office.
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
1 Logistics z1 Handout yCopies of my slides zReading yRecent Advances in AI Planning, sections 1-2.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Dynamic Bayesian Networks CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanningLearning.
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
Planning Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.
1 07. The planning problem 2  Inputs: 1. A description of the world state 2. The goal state description 3. A set of actions  Output: A sequence of actions.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
For Friday Finish Chapter 18 Homework: –Chapter 18, exercises 1-2.
For Monday Read chapter 12, sections 1-2 Homework: –Chapter 10, exercise 3.
Planning, Executing, Sensing, and Replanning for Information Gathering Presented by Hector Gonzalez (Based on slides from Craig Knoblock and L. Joskowicz)
For Friday No new reading Logic and Resolution Homework.
For Friday Finish chapter 10 No homework. Program 2 Any questions?
For Friday No reading Homework: –Chapter 11, exercise 4.
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
Planning (Chapter 10)
Lecture 3-1CS251: Intro to AI/Lisp II Planning to Learn, Learning to Plan.
Partial Order Planning 1 Brian C. Williams J/6.834J Sept 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
© Daniel S. Weld 1 Logistics PS3 Project Additional problem Reading Planning & CSP for “today” SAT plan paper review for Wed.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
Temporal Planning with Continuous Change J.Scott Penbrethy Daniel S. Weld Presented by - Parag.
Consider the task get milk, bananas, and a cordless drill.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
Planning (Chapter 10) Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 9/2017
For Wednesday Read Chapter 18, sections 1-3 Homework:
Planning (Chapter 10)
Planning Search vs. planning STRIPS operators Partial-order planning
Dana S. Nau University of Maryland 3:10 AM September 12, 2018
Planning (Chapter 10)
Dana S. Nau University of Maryland 1:50 AM September 14, 2018
Consider the task get milk, bananas, and a cordless drill
Planning Search vs. planning STRIPS operators Partial-order planning
Planning Search vs. planning STRIPS operators Partial-order planning
AI Planning.
Planning José Luis Ambite.
Graph-based Planning Slides based on material from: Prof. Maria Fox
Planning CSE 473 AIMA, 10.3 and 11.
Planning CSE 573 A handful of GENERAL SEARCH TECHNIQUES lie at the heart of practically all work in AI We will encounter the SAME PRINCIPLES again and.
© James D. Skrentny from notes by C. Dyer, et. al.
Course Outline Advanced Introduction Expert Systems Topics Problem
Causal-link planning 2 Jim Blythe.
Graph-based Planning Slides based on material from: Prof. Maria Fox
Presentation transcript:

Partial Order Plan Execution 1 Brian C. Williams J/6.834J Sept. 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig

Outline Plan execution Plan monitoring

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Execution Can perform a step when all predecessors have been executed.

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Execution Can perform a step when all predecessors have been executed.

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Can perform a step when all predecessors have been executed. Execution

Plan Execution Initialize the agenda, called Ready, with action Start Mark all actions as not executed. Loop If Ready is empty then terminate. Dequeue action a from Ready and execute When completed, mark a as executed. For each action b such that a < b or linked(a,b,p). –If every action c is marked executed, such that c < b or linked(c,b,p’) –Then queue b on Ready.

Outline Partial order planning in a nutshell Plan execution Plan monitoring

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Fail if preconditions of ready action are not satisfied. Action Monitoring

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Action Monitoring Fail if preconditions of ready action are not satisfied.

Plan Execution with Action Monitoring Initialize the agenda, called Ready, with action Start Mark all actions as not executed. Loop If Ready is empty then terminate. Dequeue action a from ready If preconditions of action are satisfied –Then execute –Else return failure When completed, mark a as executed. For each action b such that a < b or linked(a,b,p). –If every action c has been executed, such that c < b or linked(c,b,p’) –Then queue b on Ready.

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Execution Monitoring Check if precondition of remaining plan is violated. Check if causal link crossing current time is violated.

Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Execution Monitoring Check if precondition of remaining plan is violated. Check if causal link crossing current time is violated.

Plan Execution with Execution Monitoring Initialize agenda Ready with action Start Initialize agenda ActiveLinks to empty Mark all actions as not executed. Loop If Ready is empty then terminate. For each link on ActiveLinks –If the condition of link doesn’t hold, Then return failure Dequeue action a from Ready If preconditions of action are satisfied –Then execute –Else return failure …

Plan Execution with Execution Monitoring (cont). Loop … Mark a as executed. For each action c such that linked(c,a,p). –dequeue from ActiveLinks. For each action d such that linked(a,d,p). –queue on ActiveLinks. For each action b such that a < b or linked(a,b,p). –If every action c has been executed, such that c <b or linked(c,b,p’) –Then queue b on Ready.

Outline Plan execution Plan monitoring

Monitors Autonomous Agents: What is missing? Command dispatch Fault protection Attitude control Mission Goal Scenario Self-commandingSelf-diagnosingSelf-repairing RECOVERY PLANNING EXECUTION

Outline Plan execution Plan monitoring Appendix: Partial order planning in a nutshell

Simple Operator-based Planning Input –Initial state of world –Goal partial state –Operators (actions) Fn: world-state  world-state Output –Sequence of actions What assumptions are implied? Atomic time. Agent is omniscient (no sensing necessary). Agent is sole cause of change. Actions have deterministic effects. No indirect effects.  STRIPS Assumptions a a a north11 north12 W0W0 W2W2 W1W1

STRIPS Representation Effects specify how to change the set of propositions. a a north11 W0W0 W1W1 Initial state: ((block a) (block b) (block c) (on-table a) (on-table b) (clear a) (clear b) (clear c) (arm-empty)) goal (partial state): ((on a b) (on b c))) Available actions Strips operators precond: (and (agent-at 1 1) (agent-facing north)) effect: (and (agent-at 1 2) (not (agent-at 1 1))) North11

Action Schemata (:operator pick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1) (on-table ?ob1) (arm-empty)) :effect (and (not (clear ?ob1)) (not (on-table ?ob1)) (not (arm-empty)) (holding ?ob1))) Instead of defining: pickup-A and pickup-B and … Define a schema: Note: strips doesn’t allow derived effects; you must be complete! } ?var denotes a free variable

A Solution: Complete and Consistent Plan Complete Plan Consistent Plan IFF every precondition of every step is achieved A step’s precondition is achieved iff its the effect of a preceding step, no possibly intervening step undoes it. IFF there is no contradiction in the ordering constraints (I.e., never s i < s j and s j < s i.) Start Go(HWS) Go(Home) Finish Buy(Drill) Buy(Milk)Buy(Ban.) Go(SM) Have(Milk) At(Home) Have(Ban.) Have(Drill) At(SM), Sells(SM,Milk) At(SM) At(SM), Sells(SM,Ban.) At(Home) At(HWS) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.)

POP(, agenda, actions), A partial plan to expand Agenda: A queue of open conditions still to be satisfied: Actions: A set of actions that may be introduced to meet needs. a add : an action that produces the needed condition p for a need A threat : an action that might threaten a causal link from a producer to a consumer

POP(, agenda, actions) 1.Termination: If agenda is empty, return plan. 2.Goal Selection: select and remove open condition from agenda. 3.Action Selection: Choose new or existing action a add that can precede a need and whose effects include p. Link and order actions. 4.Update Agenda: If a add is new, add preconditions to agenda. 5.Threat Detection: For every action a threat that might threaten some causal link from a produce to a consume, choose a consistent ordering: a)Demotion: Add a threat < a produce b)Promotion: Add a consume < a threat 6.Recurse: on modified plan and agenda Choose is nondeterministic Select is deterministic

Start Go(HWS) Finish Buy(Drill)Buy(Milk)Buy(Ban.) Go(SM) Have(Drill) Have(Milk) Have(Ban.) at(Home) At(SM), Sells(SM,Milk)At(SM), Sells(SM,Ban.) At(Home) At(HWS) Sells(HWS,Drill) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(x) Go(Home) At(SM)