+ All Categories
Home > Documents > Classical Planning Content - cvut.cz · Automated planning research classical planning mostly...

Classical Planning Content - cvut.cz · Automated planning research classical planning mostly...

Date post: 14-Oct-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
34
Classical Planning Radek Maˇ ık CVUT FEL, K13132 16. dubna 2014 Radek Maˇ ık ([email protected]) Classical Planning 16. dubna 2014 1 / 77 Content 1 Concept of AI Planning Definition Conceptual Model Methodology of Planners 2 Representation STRIPS PDDL 3 Planning Methods Logics and Searching State Space Plan Space Planning Graphs Radek Maˇ ık ([email protected]) Classical Planning 16. dubna 2014 2 / 77
Transcript
Page 1: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Classical Planning

Radek Marık

CVUT FEL, K13132

16. dubna 2014

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 1 / 77

Content

1 Concept of AI PlanningDefinitionConceptual ModelMethodology of Planners

2 RepresentationSTRIPSPDDL

3 Planning MethodsLogics and SearchingState SpacePlan SpacePlanning Graphs

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 2 / 77

Page 2: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Definition

Concept of Plan [Nau09]

Plan

many definitions and aspects ....

A scheme, program, or method worked out beforehand for theaccomplishment of an objective.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 4 / 77

Concept of AI Planning Definition

Plan Definition [Nau09, Pec10]

Planning

Reasoning about about hypothetical interaction among the agent andthe environment with respect to a given task.

Motivation of the planning process is to reason about possible courseof actions that will change the environment in order to reach the goal(task)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 5 / 77

Page 3: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Definition

Planning and Scheduling [Nau09]

Scheduling . . . assigns in time resources to separate processes,

Planning . . . considers possible interaction among components ofplan.

Planning

Given: the initial state, goal state, operators.

Find a sequence of operators that will reach the goal state from theinitial state

Select appropriate actions, arrange the actions and consider thecausalities

Scheduling

Given: resources, actions and constraints.

Form an appropriate schedule that meets the constraints

Arrange the actions, assign resources and satisfy the constrains.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 6 / 77

Concept of AI Planning Definition

Real Applications - Space Exploration [Nau09]

Projects

Autonomous planning, scheduling, control

NASA: JPL and Ames.

Remote Agent Experiment (REX)

Deep Space 1.

Mars Exploration Rover (MER)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 7 / 77

Page 4: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Conceptual Model

Conceptual Model of Planning I [Nau09]

Environment

State transition system

Σ = (S ,A,E , γ)

S = {states}A = {actions}E = {exogenous events}γ ={state-transition function}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 9 / 77

Concept of AI Planning Conceptual Model

The Dock-Worker Robots (DWR) Domain [Wic11]

Planning procedure illustration

harbour with several locations(docks),

docked ships,

storage areas for containers,

parking areas for

trains,trucks

Goal:

cranes to load and unloadships.robot carts to movecontainers around

Port of Hamburg

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 10 / 77

Page 5: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Conceptual Model

State Transition System Example [Nau09]

State Trainsition System

Σ = (S ,A,E , γ)

S = {states}A = {actions}E = {exogenous events}γ = S × (A ∪ E )→ 2S

System Instance

S = {s0, s1, . . . , s5}A = {move1,move2, put,take, load , unload}E = {}γ = {see arrows}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 11 / 77

Concept of AI Planning Conceptual Model

Planning Task [Nau09]

Planning problem

System description Σ

Initial state or set ofstates

Initial state = s0

Objective

Goal state,set of goal states,set of tasks,“trajectory” of states,objective functionGoal state = s5

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 12 / 77

Page 6: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Conceptual Model

Plan [Nau09]

Classical plan

a sequence of actions

< take,move1, load ,move2 >

Policy:

partial function from S into A

{(s0, take), (s1,move1),(s3, load), (s4,move2)}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 13 / 77

Concept of AI Planning Methodology of Planners

Types of Planners [Nau09]

Domain-specific

Made or tuned for a specific domain

Won’t work well (if at all) in any other domain

Most successful real-world planning systems work this way

Domain-independent

Works in any planning domain, in principle,

Uses no domain-specific knowledge except the definitions of the basicactions

In practice, not feasible to develop domain-independent planners thatwork in every possible domain,

Make simplifying assumptions to restrict the set of domains

Classical planningHistorical focus of most automated-planning research

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 15 / 77

Page 7: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Methodology of Planners

Restrictive Assumptions [Nau09]

A0: Finite systemfinitely many states, actions, events

A1: Fully observablethe controller always Σ’s current state

A2: Deterministiceach action has only one outcome

A3: Static (no exogenous events)no changes but the controller’s actions

A4: Attainment goalsexistency a set of goal states Sg

A5: Sequential plansa plan is a linearly ordered sequence of actions < a0, a1, . . . , an >

A6: Implicit timeno time durations; linear sequence of instantaneous states

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

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 16 / 77

Concept of AI Planning Methodology of Planners

Classical Planning [Nau09]

Requires all 8 restrictive assumptions

Offline generation of action sequences for a deterministic, static, finitesystem, with complete knowledge, attainment goals, and implicit time.

Reduces to the following problem:

Given (Σ, s0,Sg )Find a sequence of actions π =< a0, a1, . . . , an >, that produces asequence of state transitions < s0, s1, . . . , sn > such that sn ∈ Sg .

This is just path-searching in a graph

Nodes = statesEdges = actions

Is this trivial?

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 17 / 77

Page 8: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Concept of AI Planning Methodology of Planners

Classical Planning - example [Nau09]

Cargo Transportation by Planes

10 airports

50 aircrafts

200 pieces of cargo

number of states 1050 × (50 + 10)200 ≈ 10405

minimum number of actions 50 × 9 = 450all cargo located on airpots with no planes

maximum number of actions 50200 × 9 ≈ 10340

all cargo and aircrafts in one airport

Reality

The number of particles in the universe is about 1087

Automated planning research

classical planning mostly

dozens (hundreds) of different aglorithms

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 18 / 77

Representation STRIPS

Classical Representatons [Wic11]

Planning as Theorem Provingworld state is a set of propositionsactions contains applicability conditions as a set of formulas and effectsin a form of formulas added or removed if a given action is applied,

STRIPS representationsimilar to the propositional representationliterals of the first order are used instead of propositions

a representation using state variablesstate is k-tuple of state variables {x1, . . . , xk}action is a partial function over states

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 20 / 77

Page 9: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation STRIPS

Factored State Representation

World State Representation

atomic . . . state is a single indivisible entity

factored . . . state is a collection of variables

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 21 / 77

Representation STRIPS

STRIPS - state representation [Wic11]

Let L be a first-order language

with finitely many predicate symbols,with finitely many constant symbols,and no function symbols.

A state in a STRIPS planning domain is a set of ground atoms ofL:

(ground) atom p holds in state s ⇔ p ∈ ss satisfies a set of (ground) literals g (s |= g) if

every positive literal in g is in severy negative literal in g is not in s

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 22 / 77

Page 10: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation STRIPS

STRIPS State: example [Wic11]

State in DWR Domain

state = {attached(p1, loc1),attached(p2, loc1),in(c1, p1), in(c3, p1),top(c3, p1), on(c3, c1),on(c1, pallet), in(c2, p2),top(c2, p2), on(c2, pallet),belong(crane1, loc1),empty(crane1),adjacent(loc1, loc2),adjacent(loc2, loc1),at(r1, loc2),occupied(loc2),unloaded(r1)}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 23 / 77

Representation STRIPS

STRIPS - Operator and Action Representations [Wic11]

A planning operator in a STRIPS planning domain is a tripleo = (name(o), precond(o), effects(o)),

the name of the operator name(o)is a syntactic expression of the form n(x1, . . . , xk),where n is a (unique) symboland x1, . . . , xk are all the variables,that appear in o, and

the preconditions precond(o) and the effects effects(o) of the operatorare sets of literals.

An action in a STRIPS planning domain is a ground instance of aplanning operator.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 24 / 77

Page 11: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation STRIPS

STRIPS Operator: example [Wic11]

move(r , l ,m)

robot r moves from location l to neighboring location mprecond: adjacent(l ,m), at(r , l),¬occupied(m)effects: at(r ,m), occupied(m),¬occupied(l),¬at(r , l)

load(k, l , c , r)

crane k in location l loads container c on robot rprecond: belong(k , l), holding(k , c), at(r , l), unloaded(r)effects: empty(k),¬holding(k , c), loaded(r , c),¬unloaded(r)

put(k , l , c , d , p)

crane k in location l puts container c onto d in pile pprecond: belong(k , l), attached(p, l), holding(k , c), top(d , p)effects:¬holding(k , c), empty(k), in(c , p), top(c , p), on(c , d),¬top(d , p)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 25 / 77

Representation STRIPS

Applicability and State Transitions [Wic11]

Let L be a set of literals

L+ is the set of atoms that are positive literals in L,L− is the set of all atoms whose negations are in L

Let a be an action and s a state.

Then a is applicable in s ⇔:

precond+(a) ⊆ s; andprecond−(a) ∩ s == {}

The state transition function γ for an applicable action a in state s isdefined as:

γ(s, a) = (s − effects−(a)) ∪ effects+(a)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 26 / 77

Page 12: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation STRIPS

STRIPS: Planning Domain [Wic11]

Let L be a function-free first-order language.

STRIPS planning domain on L is a restricted state-transitionsystem Σ = (S ,A, γ) such that:

S is a set of STRIPS states, i.e. sets of ground atoms,A is a set of ground instances of some STRIPSplanning operators Oγ : S × A→ S where

γ(s, a) = (s − effects−(a)) ∪ effects+(a) if a is applicable in sγ(s, a) = undefined otherwise

S is closed under γ

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 27 / 77

Representation STRIPS

STRIPS: Planning Problem [Wic11]

A STRIPS planning problem is a triple P = (Σ, si , g) where:

Σ = (S ,A, γ) is a STRIPS planning domain on some first-orderlanguage Lsi ∈ S is the initial stateg is a set of ground literals describing the goalsuch that the set of goal states isSg = {s ∈ S |s |= g}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 28 / 77

Page 13: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation STRIPS

STRIPS Planning Problem: DWR Example [Wic11]

DWR planning problem

Σ: STRIPS planning domain DWR

si : any states0 = {attached(pile, loc1),

in(cont, pile), top(cont, pile),on(cont, pallet), belong(crane, loc1),empty(crane), adjacent(loc1, loc2),adjacent(loc2, loc1),at(robot, loc2),occupied(loc2),unloaded(robot)}

g ⊂ Lg = {¬unloaded(robot),

at(robot, loc2)}tj. Sg = {s5}

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 29 / 77

Representation PDDL

Overview of PDDL [Wic11]

Planning Domain Definition Language (PDDL)

http://cs-www.cs.yale.edu/homes/dvm/

language features (verze 1.x):

basic STRIPS-style actionsvarious extensions as explicit requirements

used to define:planning domains:

requirements,types,predicates,possible actions.

planning problems:

objects,rigid and fluent relations,initial situation,goal description.

the current version is 3.xRadek Marık ([email protected]) Classical Planning 16. dubna 2014 31 / 77

Page 14: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation PDDL

Monkey Planning Domain

(define (domain MONKEY)

(:requirements :strips :typing)

(:types monkey box location fruit)

(:predicates

(isClear ?b - box) (onBox ?m - monkey ?b - box)

(onFloor ?m - monkey) (atM ?m - monkey ?loc - location)

(atB ?b - box ?loc - location) (atF ?f - fruit ?loc - location)

(hasFruit ?m - monkey ?fruit))

(:action GOTO

:parameters (?m - monkey ?loc1 ?loc2 - location)

:precondition (and (onFloor ?m) (atM ?m ?loc1))

:effect (and (atM ?m ?loc2) (not (atM ?m ?loc1))))

(:action PUSH

:parameters (?m - monkey ?b - box ?loc1 ?loc2 - location)

:precondition (and (onFloor ?m) (atM ?m ?loc1) (atB ?b ?loc1) (isClear ?b))

:effect (and (atM ?m ?loc2) (atB ?b ?loc2)

(not (atM ?m ?loc1))

(not (atB ?b ?loc1))))

(:action CLIMB

:parameters (?m - monkey ?b - box ?loc1 - location)

:precondition (and (onFloor ?m) (atM ?m ?loc1) (atB ?b ?loc1) (isClear ?b))

:effect (and (onBox ?m ?b) (not (isClear ?b)) (not (onFloor ?m))) )

(:action GRAB-FRUIT

:parameters (?m - monkey ?b - box ?f - fruit ?loc1 - location)

:precondition (and (onBox ?m ?b) (atB ?b ?loc1) (atF ?f ?loc1))

:effect (and (hasFruit ?m ?f))))

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 32 / 77

Representation PDDL

Monkey Planning Problem

(define (problem MONKEY1)

(:domain MONKEY)

(:objects monkeyJudy - monkey

bananas - fruit

boxA - box

locX locY locZ - location)

(:init (and

(onFloor monkeyJudy)

(atM monkeyJudy locX)

(atB boxA locY)

(atF bananas locZ)

(isClear boxA)

)

)

(:goal (and (hasFruit monkeyJudy bananas))

)

)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 33 / 77

Page 15: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Representation PDDL

Monkey Planning Problem Solution

Begin plan

1 (goto monkeyjudy locx locy)

2 (push monkeyjudy boxa locy locz)

3 (climb monkeyjudy boxa locz)

4 (grab-fruit monkeyjudy boxa bananas locz)

End plan

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 34 / 77

Planning Methods Logics and Searching

STRIPS Representation - Example

initial state: start

goal: writeValue(a, 3)

action:

startPlan: PAR []

PRE [start]

ADD [declared(server, a), declared(server, b)]

DEL [start]

connectServer: PAR [A]

PRE [declared(server, A)]

ADD [bound(server,A)]

DEL [declared(server, A)]

writing: PAR [a, 3]

PRE [bound(server,a)]

ADD [writeValue(a, 3)]

DEL []

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 36 / 77

Page 16: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods Logics and Searching

Example Result

goal: writeValue(a,3);

result sequence (plan):1 start2 connectServer(a)3 writing(a, 3)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 37 / 77

Planning Methods Logics and Searching

Planning - depth-first search through logical formulea

% Depth first search

% ==================

depthFirstSearch(AnsPath) :-

initialState(Init),

depthFirst([Init], AnsPath).

depthFirst([S|_], [S]) :-

finalState(S), !.

depthFirst([S|Path], [S|AnsPath]) :-

extend([S|Path], S1),

depthFirst([S1, S |Path], AnsPath).

extend([S|Path], S1) :-

nextState(S, S1),

not(memberState(S1, [S|Path])).

memberState(S, Path) :-

member(S,Path).Radek Marık ([email protected]) Classical Planning 16. dubna 2014 38 / 77

Page 17: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods Logics and Searching

Planning - a problem specification in Prolog

% Farmer, Wolf, Goat, Cabbage

% ===========================

initialState([n,n,n,n]).

finalState([s,s,s,s]).

nextState(S, S1) :- move(S, S1), safe(S1).

move([F, W, G, C], [F1, W, G, C]) :- cross(F, F1).

move([F, F, G, C], [F1, F1, G, C]) :- cross(F, F1).

move([F, W, F, C], [F1, W, F1, C]) :- cross(F, F1).

move([F, W, G, F], [F1, W, G, F1]) :- cross(F, F1).

safe([F, W, G, C]) :- F=G, !; F=W, F=C.

cross(n,s).

cross(s,n).

%-------

t1(AnsPath) :- depthFirstSearch(AnsPath).Radek Marık ([email protected]) Classical Planning 16. dubna 2014 39 / 77

Planning Methods State Space

State-Transition Graph Example [Wic11]

Game of Missionaries and Cannibals

move 3 cannibals and 3 missionaries across the river

Whenever the number of cannibals is higher than the number ofmissionaries somewhere, the missionaries are cooked and eaten.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 41 / 77

Page 18: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Preliminaries [Nau09, Wic11]

Propositional logics

Hill-climbing searching

A∗, but a suitable heuristics was missing for decades

Idea:

use of standard searching algorithms

breadth-first,depth-first,A∗

etc.

a planning problem task

searching space is a subspace of state spacenodes represent states of the environmentedges correspond to state transitionsa path through the state space determines a plan

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 42 / 77

Planning Methods State Space

Planning in State Space - an example [Wic11]

nodes: closed atoms

edges: actions (i.e. closed instances of operators)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 43 / 77

Page 19: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Forward State-Space Search Algorithm [Wic11]

1 Forward-search(O, s0, g)1 s ← s0

2 π ← the empty plan3 loop

1 if s |= g then return π2 E ← {a|a is a ground instance ∈ O

and precond(a) is satisfied in s}3 if E == ∅ then return FAILURE4 a non-deterministic choice of action a ∈ E5 s ← γ(s, a)6 π ← π.a

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 44 / 77

Planning Methods State Space

State-Space Searching Example 1 [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 45 / 77

Page 20: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

State-Space Searching Example 2 [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 46 / 77

Planning Methods State Space

State-Space Searching Example 3 [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 47 / 77

Page 21: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

State-Space Searching Example 4 [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 48 / 77

Planning Methods State Space

State-Space Searching Example 5 [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 49 / 77

Page 22: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Relevant Actions [Nau09, Wic11]

Let P = (Σ, si , g) be a STRIPS planning problem.

An action a is relevant for g ifa causes that at least one of literals of g is satisfied

g ∩ effects(a) 6= ∅a does not make any of g ’s literals false

g + ∩ effects−(a) = ∅∧

g− ∩ effects+(a) = ∅The Regression Set of goal g for a relevant action a ∈ A is:

γ−1(g , a) = (g − effects(a)) ∪ precond(a)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 50 / 77

Planning Methods State Space

Backward Search [Wic11]

1 Backward-search(O, s0, g)1 π ← the empty plan2 loop

1 if s0 |= g then return π2 A← {a|a is a ground instance of an operator ∈ O

and γ−1(g , a) is defined }3 if A == ∅ then return FAILURE4 nondeterministically choose an action a ∈ A5 π ← a.π6 g ← γ−1(s, a)

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 51 / 77

Page 23: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Sussman Anomaly

an interaction of subgoals so that their solutions must be interleavedto satisfied them all together

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 52 / 77

Planning Methods State Space

Sussman Anomaly - a Block World Example I [Nau09]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 53 / 77

Page 24: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Sussman Anomaly - a Block World Example II [Nau09]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 54 / 77

Planning Methods State Space

Sussman Anomaly - a Block World Example III [Nau09]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 55 / 77

Page 25: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods State Space

Sussman Anomaly - a Block World Example IV [Nau09]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 56 / 77

Planning Methods Plan Space

State-Space vs. Plan-Space Search [Wic11]

state-space search

search through graph of nodes representing world states

plan-space search

search through graph of partial plans

nodes: partially specified plans

arcs: plan refinement operations

solutions: partial-order plans

temporal ordering of actionsrationale: what the action achieves in the plansubset of variable bindings

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 58 / 77

Page 26: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods Plan Space

Plan-Space Planning - constraints [Nau09]

ordering constraints

action α must be performed before β (α ≺ β)

binding constraints

inequality constraints, i.e. v1 6= v2 or v1 6= cequality constraints and substitutions, i.e. v1 = v2 or v1 = c

causal links

use action α to create condition p required by action β

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 59 / 77

Planning Methods Planning Graphs

GRAPHPLAN planner

1997plans are represented as a planning graph,

the idea is very similar to dynamic programming or network flowsolutions

All plans are constructed concurrently.graph extending (forward run)plan searching (backward run)

The planner maintains a mutually exclusive relation (mutex) betweennodes representing applied actions and state propositions.

The cycling issue is removed.Action schemas with parameters cannot be used.

It create a huge space of propositions.

There are many supporting strategies speeding up planningsignificantly.

The implementations are capable to create plans with more then50-100 action calls in minutes.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 61 / 77

Page 27: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Planning Methods Planning Graphs

GraphPlan - Planning Graph

������������������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

��������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������

������������������������������������

������������������������������������

������������������������������������

������������������������������������

������������������������������������������������������

������������������������������������������������������

���������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������������������������������������������������������������

���������������������������������������������

������������������������������������������������������������������������

������������������������������������������������������

������������������������������������������������������

���������������������������������������������������������������������������������������������������

���������������������������������������������������������������������������������������������������

������������������

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 62 / 77

Planning Methods Planning Graphs

Implementations of planners

Initial attempts

STRIPS [1971] . . . , the first planner, regressive planning throughaction preconditions

State/Plan space

WARPLAN [1973] . . . a linear planner, Sussman anomaly solved usingaction shifting

PWEAK, TWEAK [1987], UCPOP [1992] . . . a partial order planner

Planning graphs

GRAPHPLAN[1997] . . . a breakthrough graphplan planner

Blackbox [1998] . . . combines GRAPHPLAN and SATPLAN

FF [2000] . . . a planning graph heuristics with a very fast forward andlocal search

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 63 / 77

Page 28: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Conclusions Summary

Summary

What is AI planningreaching a goal or a task problem solution using a sequence of actionchanging the environment,classical planning as a search for a sequence of actions in state spacethat transforms the initial state to a goal state.

RepresentationsSTRIPS specifies modifications of the world through changes ofsatisfied closed atoms,PDDL defines a language format that enable to record STRIPSplanning domain and STRIPS planning problem

Planning Methodscreation of a plan as a searching method throughworld state/plan/graphplan space

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 64 / 77

Prıloha

4 PrılohaPDDL Specification

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 65 / 77

Page 29: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

PDDL Domains [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 67 / 77

Prıloha PDDL Specification

PDDL Types [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 68 / 77

Page 30: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

PDDL Example: DWR Types [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 69 / 77

Prıloha PDDL Specification

PDDL Example: Predicates [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 70 / 77

Page 31: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

PDDL Action [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 71 / 77

Prıloha PDDL Specification

PDDL Goal Specification [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 72 / 77

Page 32: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

PDDL Effects [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 73 / 77

Prıloha PDDL Specification

PDDL Example: Operator [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 74 / 77

Page 33: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

PDDL Problem [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 75 / 77

Prıloha PDDL Specification

PDDL Problem: DWR example [Wic11]

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 76 / 77

Page 34: Classical Planning Content - cvut.cz · Automated planning research classical planning mostly dozens (hundreds) of di erent aglorithms Radek Ma r k (marikr@fel.cvut.cz) Classical

Prıloha PDDL Specification

References I

Dana Nau.

CMSC 722, ai planning (fall 2009), lecture notes.http://www.cs.umd.edu/class/fall2009/cmsc722/, 2009.

Michal Pechoucek.

A4m33pah, lecture notes.http://cw.felk.cvut.cz/doku.php/courses/a4m33pah/prednasky, February 2010.

Gerhard Wickler.

A4m33pah, lecture notes.http://cw.felk.cvut.cz/doku.php/courses/a4m33pah/prednasky, February 2011.

Radek Marık ([email protected]) Classical Planning 16. dubna 2014 77 / 77


Recommended