automated planning dr. héctor muñoz-avila. what is planning? classical definition domain...

20
Automated Planning Dr. Héctor Muñoz-Avila

Upload: annice-patrick

Post on 13-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Automated Planning

Dr. Héctor Muñoz-Avila

What is Planning? Classical Definition

Domain Independent: symbolic descriptions of the problems and the domain. The plan generation algorithm remains the same

Domain Specific: The plan generation algorithm depends on the particular domain

Advantage: - opportunity to have clear semanticsDisadvantage: - symbolic description requirement

Advantage: - can be very efficientDisadvantage: - lack of clear semantics - knowledge-engineering for adaptation

Planning: finding a sequence of actions to achieve a goal

Domain-configurable Planning

•Domain independent planning algorithm•Add domain-specific search control

•Examples:SHOPTLPlan

Domain-configurable Planning

•Domain independent planning algorithm•Add domain-specific search control

•Examples:SHOPTLPlan

Classical Assumptions (I)

• A0: Finite system finitely many states,

actions, and events• A1: Fully observable

the controller alwaysknows what state is in

• A2: Deterministiceach action or event has

only one possible outcome• A3: Static

No exogenous events: no changes except those performed by the controller

Plan adaptation

Classical Assumptions (II)

A4: Attainment goalsa set of goal states Sg

A5: Sequential plansa plan is a linearly

ordered sequence of actions (a1, a2, … an)

A6 :Implicit timeno time durations linear sequence of instantaneous states

A7: Off-line planning planner doesn’t know the execution status

Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

Plan space planning

TLPlan

HTN planning

Plan Representation• Classical representation

Predicates, variables, constants Most of our systems used it

• Set-theoretic representation Predicates and constants (no variables!) Useful in algorithms that manipulate ground atoms directly

• Used in internal representations: planning graphs (Chapter 6), satisfiability (Chapters 7)

• State-variable representation Keeps track of the value of each variable: loc(truck) = l1

Expressive Power

• Any problem that can be represented in one representation can also be represented in the other two

• Can convert in linear time and space, except when converting to set-theoretic (where we get an exponential blowup)

Classicalrepresentation

State-variablerepresentation

Set-theoreticrepresentation

trivial

P(x1,…,xn)becomes

fP(x1,…,xn)=1

write all ofthe groundinstances

f(x1,…,xn)=ybecomes

Pf(x1,…,xn,y)

Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

Classical Planning

State-Space Planning

AC

B A B C A CB

CBA

BA

C

BAC

B CA

CAB

ACB

BCA

A BC

AB

C

ABC

• State space•V: set of states•E: set of transitions (s, (s,a))

• But: computed graph is a subset of state space

• Search modes:• Forward •Backward

•Sussman Anomaly

•Generally thought to be slow

•But: Fastforward, TLPlan, SHOP are state-space planners•How come?

Plan-Space Planning

Initial plan

complete plan for

goals

• Plan space•V: set of plans•E: plan refinement transitions

• As before: computed graph is a subset of plan space

• Least commitment:•Does not commit on action ordering

ThreatsOpen conditions

•Solves the Sussman anomaly

•Also thought to be slow•But: VHPOP

Plan Adaptation• Transformational analogy: transforms an input plan

• Derivational analogy: reuses the derivational trace that led to a planTherefore requires more knowledge to be provided

• Both forms of adaptation have been developed for state-space, plan-space, hierarchical (HTN) planning

• All can be subsumed in the Universal Classical Planning framework

• Interesting: some authors have proposed using planning graphs during adaptation (is this derivational? Transformational?)

Neo-Classical Planning

Planning Graphs

Move(B,C,table)

Move(A,table,B)

Move(B,C,A)

Clear(B)

On(B, C)

Clear(A)

On(A, table)

On(C,table)

P0

B CA

BC

A

BC A

BC A Clear(C)

On(B, table)

On(B, C)

On(A, B)

On(A,table)

Clear(B)

On(B, A)

Clear(A)

On(C,table)

A1 P1 • Planning graphs encode an inclusive disjunction of actions

•Since some actions in a disjunction may interfere with one another (mutex), it keeps track of incompatible propositions

•Solution extracted via backward chaining in the planning graph

Must consider mutex

•Can improve performance

•More crucially: used for defining heuristics (FF,…)

Planning as Satisfiability• Encodes the planning problem as a logical formula• For example:

The initial state is represented as: Applicability of Actions as:

• Davis-Putnam procedure: finds truth assignments that make the formula true

• Blackbox: encodes the planning graph rather than the planning problemTrial and error process

Heuristics in Planning

AC

B A B C A CB

CBA

BA

C

BAC

B CA

CAB

ACB

BCA

A BC

AB

C

ABC

• State space•V: set of states•E: set of transitions (s, (s,a))

• (s,G): estimates how far is s from achieving G

• This estimate is made by constructing the goal graph…

•…on a relaxation of the problem: domain with no negative effects

•A greedy strategy is selected (pick the one with highest value) after performing breadth-first search

Domain-configurable Planning

Search Control Rules in Planning

AC

B A B C A CB

CBA

BA

C

BAC

B CA

CAB

ACB

BCA

A BC

AB

C

ABC

• State space•V: set of states•E: set of transitions (s, (s,a))

• Uses temporal logic to prune potential actions / states

υ (until), □ (always), ◊ (eventually), ○ (next), GOAL

•Example rule: “Don’t move container if position is consistent with goal”

•Formula progress(Φ,si) is true in si+1 iff Φ is true in si.

Reasoning with Time in Planning

• Extends search control rules representation as in TLPlanAfter all this representation is based on temporal logics

• Example:(def-adl-operator (drive ?t ?l ?l’)

(pre (?t) (truck ?t) (?l) (loc ?l) (?l’) (loc ?l’) (at ?t ?l)) (del (at ?t ?l)) (delayed-effect (/ (dist ?l ?l’) (speed ?t) (add (at ?t ?l’))))

• It associates a time stamp with every stateTransformations between states with same time stamp

are instantaneousCrucial: each state has an associated event queue (future

updates)

Hierarchical Planning

Non-primitive task

precond

method instance

s0 precond effects precond effectss1 s2

primitive taskprimitive task

operator instance operator instance

Non-primitive task

Order in which subtasks are

fulfilled

• Distinguishes between primitive and non-primitive tasks

•Primitive tasks: concrete actions (instances of operators)

•Compound task: high-level goals (decomposed by methods)

•Operators: standard STRIPS knowledge

•Methods: domain-configurable constructs

Final Summary

• Classical PlanningState-spacePlan-SpacePlan adaptation

• Neo Classical planningPlanning graphsPlanning as SatisfiabilityHeuristics in Planning

Domain-configurable planners•Search control rules•Reasoning with time•Hierarchical Planning

Complexity of Planning