Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making 20071 Graphplan Based on slides by: Ambite, Blyth and.

Slides:



Advertisements
Similar presentations
Causal-link Planning II José Luis Ambite. 2 CS 541 Causal Link Planning II Planning as Search State SpacePlan Space AlgorithmProgression, Regression POP.
Advertisements

Constraint Based Reasoning over Mutex Relations in Graphplan Algorithm Pavel Surynek Charles University, Prague Czech Republic.
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.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
MBD and CSP Meir Kalech Partially based on slides of Jia You and Brian Williams.
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
1 Complexity of domain-independent planning José Luis Ambite.
Planning with Constraints Graphplan & SATplan Yongmei Shi.
Action Cook Prec: CleanHands Effects: Dinner Action Wrap Prec: Quiet Effects: Present Action Carry Prec: Effects: ~Garbage AND ~CleanHands Action Dolly.
Graph-based Planning Brian C. Williams Sept. 25 th & 30 th, J/6.834J.
Planning Graphs * Based on slides by Alan Fern, Berthe Choueiry and Sungwook Yoon.
Graphplan Joe Souto CSE 497: AI Planning Sources: Ch. 6 “Fast Planning through Planning Graph Analysis”, A. Blum & M. Furst.
For Monday Finish chapter 12 Homework: –Chapter 13, exercises 8 and 15.
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.
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.
Fast Planning through Planning Graph Analysis By Jan Weber Jörg Mennicke.
AI – Week AI Planning – Plan Generation Algorithms: GraphPlan Lee McCluskey, room 2/09
Artificial Intelligence Chapter 11: Planning
Planning: Part 3 Planning Graphs COMP151 April 4, 2007.
Extending Graphplan to handle Resources Presenter: Pham Van Cuong Department of Computer Science New Mexico State University.
Constraint Satisfaction Problems
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
An Introduction to Artificial Intelligence CE Chapter 11 – Planning Ramin Halavati In which we see how an agent can take.
Classical Planning Chapter 10.
GraphPlan Alan Fern * * Based in part on slides by Daniel Weld and José Luis Ambite.
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Jonathon Doran. The Planning Domain A domain describes the objects, facts, and actions in the universe. We may have a box and a table in our universe.
Homework 1 ( Written Portion )  Max : 75  Min : 38  Avg : 57.6  Median : 58 (77%)
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
For Monday Read chapter 12, sections 1-2 Homework: –Chapter 10, exercise 3.
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
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Graphplan/ SATPlan Chapter Some material adapted from slides by Jean-Claude Latombe / Lise Getoor.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
Graphplan.
Robust Planning using Constraint Satisfaction Techniques Daniel Buettner and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
© Daniel S. Weld 1 Logistics Travel Wed class led by Mausam Week’s reading R&N ch17 Project meetings.
Graphplan: Fast Planning through Planning Graph Analysis Avrim Blum Merrick Furst Carnegie Mellon University.
Graphplan CSE 574 April 4, 2003 Dan Weld. Schedule BASICS Intro Graphplan SATplan State-space Refinement SPEEDUP EBL & DDB Heuristic Gen TEMPORAL Partial-O.
1 GraphPlan, Satplan and Markov Decision Processes Sungwook Yoon* * Based in part on slides by Alan Fern.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Chapter 6 Planning-Graph Techniques. 2 Motivation A big source of inefficiency in search algorithms is the branching factor  the number of children.
An Introduction to Artificial Intelligence CE 40417
Fast Propositional Algorithms for Planning
Planning as Satisfiability
Planning as Search State Space Plan Space Algorihtm Progression
Classical Planning via State-space search
Temporal Graphplan David E. Smith & Dan Weld.
Planning: Heuristics and CSP Planning
Class #17 – Thursday, October 27
Planning José Luis Ambite.
Graph-based Planning Slides based on material from: Prof. Maria Fox
Graphplan/ SATPlan Chapter
Planning CSE 473 AIMA, 10.3 and 11.
Planning Problems On(C, A)‏ On(A, Table)‏ On(B, Table)‏ Clear(C)‏
Class #19 – Monday, November 3
Chapter 6 Planning-Graph Techniques
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
GraphPlan Jim Blythe.
An Introduction to Planning Graph
Graph-based Planning Slides based on material from: Prof. Maria Fox
[* based in part on slides by Jim Blythe and Dan Weld]
Presentation transcript:

Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Graphplan Based on slides by: Ambite, Blyth and Weld

Automated Planning and Decision Making2 Basic Idea  Construct a graph that encodes constraints on possible plans based on smart reachability analysis (Reachable-2)  Use this “planning graph” to constrain search for a valid plan: ○If a valid plan exists, it’s a subgraph of the planning graph.  A planning graph can be built for any problem in polynomial time.

Automated Planning and Decision Making3 Properties:  Finds “shortest parallel plan”.  Sound, complete and will terminate with failure if no plan exists.

Automated Planning and Decision Making4 Planning Graph  Directed, leveled graph ○2 types of nodes: Proposition: P Action: A ○3 types of edges (between levels) Precondition: P -> A Add: A -> P Delete: A -> P  Proposition and action levels alternate.  Action level includes actions whose preconditions are satisfied in previous level plus no-op actions (to solve frame problem).

Automated Planning and Decision Making5 Planning Graph … … … Proposition Action No-Op Precondition Effect

Automated Planning and Decision Making6 Rocket Domain

Automated Planning and Decision Making7 Planning Graph Example - Rocket Problem

Automated Planning and Decision Making8 Constructing The Graphplan  Level P 1 : all literals from the initial state.  Add an action in level A i if all its preconditions are present in level P i.  Add a precondition in level P i if it is the effect of some action in level A i-1 (including no-ops).  Maintain a set of exclusion relations to eliminate incompatible propositions and actions (thus reducing the graph size). P 1 A 1 P 2 A 2 … P n-1 A n-1 P n

Automated Planning and Decision Making9 Mutual Exclusion Relations  Idea: if two actions (or literals) are mutually exclusive (mutex) at some stage, no valid plan could contain both.  Two actions are mutex if: ○Interference: one destroys the others’ effect or precondition. ○Competing needs: mutex preconditions.  Two propositions are mutex if: ○All ways of achieving them are mutex.

Automated Planning and Decision Making10 Mutual Exclusion Relations Inconsistent Effects Inconsistent Support Competing Needs Interference (prec-effect)

Automated Planning and Decision Making11 Dinner Date Example  Initial Conditions: (and (garbage) (cleanHands) (quiet))  Goal: (and (dinner) (present) (not (garbage))  Actions: ○Cook :precondition (cleanHands) :effect (dinner) ○Wrap :precondition (quiet) :effect (present) ○Carry :precondition :effect (and (not (garbage)) (not (cleanHands)) ○Dolly :precondition :effect (and (not (garbage)) (not (quiet)))

Automated Planning and Decision Making12 Dinner Date Example cleanHands Carry garb quiet ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present Dolly Cook Wrap No-Op

Automated Planning and Decision Making13 Dinner Date Example Carry garb quiet Dolly Cook Wrap No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present No-Op Carry Dolly Cook Wrap cleanHands

Automated Planning and Decision Making14 Observation 1 A1A1 p ¬r No-Op p ¬p ¬q ¬r No-Op p ¬p ¬q ¬r No-Op A1A1 A2A2 ¬q q Propositions monotonically increase (always carried forward by no-ops)

Automated Planning and Decision Making15 Observation 2 A1A1 p ¬r No-Op p ¬p ¬q ¬r No-Op p ¬p ¬q ¬r No-Op A1A1 A2A2 ¬q q Actions monotonically increase

Automated Planning and Decision Making16 Observation 3 A1A1 p ¬r No-Op p ¬q ¬r ¬q Proposition mutex relationships monotonically decrease

Automated Planning and Decision Making17 Observation 4 A1A1 p No-Op p ¬p q ¬r No-Op p ¬p q ¬r No-Op A3A3 A2A2 q Action mutex relationships monotonically decrease

Automated Planning and Decision Making18 Observation 5 Planning Graph ‘levels off’.  After some time k all levels are identical.  Because it’s a finite space, the set of literals never decreases and mutexes don’t reappear.

Automated Planning and Decision Making19 Valid Plan A valid plan is a sub-graph of the planning graph where:  Actions at the same level don’t interfere.  Each action’s preconditions are made true by the plan.  Goals are made true by some action.

Automated Planning and Decision Making20 Searching For A Solution Plan  Backward chain on the planning graph.  Achieve goals level by level.  At level k, pick a subset of non-mutex actions to achieve current goals. Their preconditions become the goals for k-1 level.  Build goal subset by picking each goal and choosing an action to add. Use one already selected if possible. Do forward checking on remaining goals (backtrack if can’t pick non-mutex action).

Automated Planning and Decision Making21 Plan Graph Search If goals are present & non-mutex:  Choose action to achieve each goal.  Add preconditions to next goal set.

Automated Planning and Decision Making22 Dinner Date Example  Initial Conditions: (and (garbage) (cleanHands) (quiet))  Goal: (and (dinner) (present) (not (garbage))  Actions: ○Cook :precondition (cleanHands) :effect (dinner) ○Wrap :precondition (quiet) :effect (present) ○Carry :precondition :effect (and (not (garbage)) (not (cleanHands)) ○Dolly :precondition :effect (and (not (garbage)) (not (quiet)))

Automated Planning and Decision Making23 Dinner Date Example cleanHands Carry garb quiet ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present Dolly Cook Wrap No-Op

Automated Planning and Decision Making24 Dinner Date Example Carry garb quiet Dolly Cook Wrap No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present No-Op Carry Dolly Cook Wrap cleanHands

Automated Planning and Decision Making25 Dinner Date Example Carry garb quiet Dolly Cook Wrap No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet dinner present No-Op garb ¬garb cleanHands ¬cleanHands quiet ¬quiet present No-Op Carry Dolly Cook Wrap cleanHands dinner No-Op

Automated Planning and Decision Making26 Graphplan Creation - Polynomial Theorem 1:  The size of the t-level PG and the time to create it are polynomial in: ○t = number of levels ○n = number of objects ○m = number of operators ○k = largest arity of actions and predicates  Max nodes proposition level: O((t+1) mn k )  Max nodes action level: O(tmn k )

Automated Planning and Decision Making27 GraphPlan algorithm  Grow the planning graph (PG) until all goals are reachable and not mutex. (If PG levels off first, fail)  Search the PG for a valid plan…  If none found, add a level to the PG and try again.

Automated Planning and Decision Making28 Termination For Unsolvable Problems  Graphplan records (memoizes) sets of unsolvable goals: ○U(i,t) = unsolvable goals at level i after stage t.  More efficient: early backtracking…  Also provides necessary and sufficient conditions for termination: ○Assume plan graph levels off at level n, stage t > n. ○If U(n, t-1) = U(n, t) then we know no plan exists.

Automated Planning and Decision Making29 In-place plan graph expansion A1A1 B3B3 C3C3 D5D5 p0p0 q2q2 r4r4 s4s Props & actions: an integer that denotes start level Mutex relations: end level ® end time

Automated Planning and Decision Making30 Perverting Graphplan ADL Gazen & Knoblock Koehler Anderson, Smith & Weld Boutilier Uncertainty Rao Graphplan Time Smith & Weld Koehler ? PGP Blum & Langford Conformant Smith & Weld Sensory/Contingent Weld, Anderson & Smith ?

Automated Planning and Decision Making31 Expressive Languages  Negated preconditions  Disjunctive preconditions  Universally quantified preconditions, effects  Conditional effects

Automated Planning and Decision Making32 Negated Preconditions  Graph expansion ○P,  P mutex. ○Action deleting P must add  P at next level.  Solution extraction

Automated Planning and Decision Making33 Disjunctive Preconditions  Convert precondition to DNF ○Disjunction of conjunctions.  Graph expansion ○Add action if any disjunct is present, non mutex.  Solution extraction ○Consider all disjuncts.

Automated Planning and Decision Making34 Universal Quantification  Graph Expansion ○Expand action with Herbrand universe replace ∀ block x P(x) with P(o 17 )  P(o 74 )  …  P(o 126 )  Solution Extraction ○No changes necessary

Automated Planning and Decision Making35 Conditional Effects

Automated Planning and Decision Making36 Full Expansion in-keys in-pay

Automated Planning and Decision Making37 Factored Expansion  Treat conditional effects as primitive ○“component” = pair  STRIPS action has one component  Consider action A ○Precond: p ○Effect: e (when q (f   g)) (when (r  s)  q)  A has three components: antecedentconsequent pe p  qf   g p  r  s qq

Automated Planning and Decision Making38 Changes to Expansion  Components C 1 and C 2 are mutex at level I if ○The antecedants of C 1 and C 2 are mutex at I-1 ○C 1, C 2 come from different action instances, and the consequent of C 1 deletes the antecedant of C 2, or vice versa. ○ ∃ C, C 1 induces C and C is mutex with C 2  Intuitively, C 1 induces C if it is impossible to execute C 1 without executing C. ○C 1 and C are parts of same action instance. ○C 1 and C aren’t mutex (antecedants not inconsistent). ○The negation of C’s antecedant can’t be satisfied at level I-1.

Automated Planning and Decision Making39 Induced Mutex ∃ C, C 1 induces C and C is mutex with C 2

Automated Planning and Decision Making40 Revised Backchaining  Confrontation ○Subgoaling on negation of something.