Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Hierarchical Task Network Planning - Automated Planning - Lecture Slides, Slides of Computer Science

These are the lecture Slides of Automated Planning which includes Domain-Independent Planners, Abstract Search Procedure, Planning Algorithms, Current Set of Solutions, Unpromising Members, Loop Detection, Constraint Violation etc. Key important points are: Hierarchical Task Network Planning, Planning Domain, Vehicles and Routes, Domain-Independent Planner, Control Rules, Problem Reduction, Simple Task Network Planning, States and Operators

Typology: Slides

2012/2013

Uploaded on 03/21/2013

dharmpaal
dharmpaal 🇮🇳

3.9

(10)

87 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 11
Hierarchical Task Network Planning
Lecture slides for
Automated Planning: Theory and Practice
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Hierarchical Task Network Planning - Automated Planning - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Chapter 11

Hierarchical Task Network Planning

Lecture slides for

Automated Planning: Theory and Practice

Motivation

• We may already have an idea how to go about

solving problems in a planning domain

• Example: travel to a destination that’s far away:

– Domain-independent planner:

  • many combinations of vehicles and routes

– Experienced human: small number of “recipes”

e.g., flying:

1. buy ticket from local airport to remote airport
2. travel to local airport
3. fly to remote airport
4. travel to final destination

• How to enable planning systems to make use of

such recipes?

HTN Planning

  • Problem reduction
    • Tasks (activities) rather than goals
    • Methods to decompose tasks into subtasks
    • Enforce constraints
      • E.g., taxi not good for long distances
    • Backtrack if necessary

travel(UMD, LAAS)

get-ticket(IAD, TLS)

travel(UMD, IAD)

fly(BWI, Toulouse) travel(TLS, LAAS) get-taxi ride(TLS,Toulouse) pay-driver

go-to-travel-web-site find-flights(IAD,TLS) buy-ticket(IAD,TLS)

get-taxi ride(UMD, IAD) pay-driver

Task:

Method: taxi-travel( x,y )

get-taxi ride( x , y ) pay-driver

get-ticket(BWI, TLS) go-to-travel-web-site find-flights(BWI,TLS) BACKTRACK

travel( x,y )

Method: air-travel( x,y )

travel(a( y ), y )

get-ticket(a( x ),a( y ))

travel( x ,a( x ))

fly(a( x ),a( y ))

HTN Planning

• HTN planners may be domain-specific

– e.g., see Chapters 20 (robotics) and 23 (bridge)

• Or they may be domain-configurable

– Domain-independent planning engine

– Domain description that defines not only the

operators, but also the methods

– Problem description

  • domain description, initial state, initial task network

Task:

Method: taxi-travel( x,y )

get-taxi ride( x , y ) pay-driver

travel( x,y )

Method: air-travel( x,y )

travel(a( y ), y )

get-ticket(a( x ),a( y ))

travel( x ,a( x ))

fly(a( x ),a( y ))

Methods

  • Totally ordered method: a 4-tuple

m = (name( m ), task( m ), precond( m ), subtasks( m ))

  • name( m ): an expression of the form n ( x 1 ,…, xn )
    • x 1 ,…, xn are parameters - variable symbols
  • task( m ): a nonprimitive task
  • precond( m ): preconditions (literals)
  • subtasks( m ): a sequence

of tasks 〈 t 1 , …, t k 〉

air-travel( x,y )

task: travel( x,y )

precond : long-distance( x,y )

subtasks : 〈buy-ticket( a ( x ) , a ( y )), travel( x,a ( x )), fly( a ( x ) , a ( y )),

travel( a ( y ) ,y )〉

travel( x,y )

buy-ticket (a( x ), a( y )) travel ( x , a( x )) fly (a( x ), a( y )) travel (a( y ), y )

long-distance( x,y )

air-travel( x,y )

Methods (Continued)

  • Partially ordered method: a 4-tuple

m = (name( m ), task( m ), precond( m ), subtasks( m ))

  • name( m ): an expression of the form n ( x 1 ,…, xn )
    • x 1 ,…, xn are parameters - variable symbols
  • task( m ): a nonprimitive task
  • precond( m ): preconditions (literals)
  • subtasks( m ): a partially ordered

set of tasks { t 1 , …, t k }

air-travel( x,y )

task: travel( x,y )

precond : long-distance( x,y )

network : u 1 =buy-ticket( a ( x ) ,a ( y )), u 2 = travel( x,a ( x )), u 3 = fly( a ( x ) , a ( y ))

u 4 = travel( a ( y ) ,y ), {( u 1 , u 3 ), ( u 2 , u 3 ), ( u 3 , u 4 )}

travel( x,y )

buy-ticket (a( x ), a( y )) travel ( x , a( x )) fly (a( x ), a( y )) travel (a( y ), y )

long-distance( x,y )

air-travel( x,y )

Example

  • Suppose we want to move three stacks of containers

in a way that preserves the order of the containers

Example (continued)

• A way to move each stack:

– first move the

containers

from p to an

intermediate

pile r

– then move

them from

r to q

Partial-Order

Formulation

Solving Total-Order STN Planning

Problems

state s ; task list T=( t 1 ,t 2 ,…) action a

state γ( s,a ) ; task list T=(t 2 , …)

task list T=( u 1 ,…,u (^) k ,t 2 ,…)

task list T=( t 1 ,t 2 ,…) method instance m

Comparison to

Forward and Backward Search

• Like a backward search,

TFD is goal-directed

– Goals

correspond

to tasks

• Like a forward search, it generates actions

in the same order in which they’ll be executed

• Whenever we want to plan the next task

– we’ve already planned everything that comes

s 0 s 1 s 2 …

task t m …

task t (^) n

op 1 op 2 Si–1 op (^) i

task t (^0)

Docsity.com

Limitation of Ordered-Task Planning

• TFD requires totally ordered

methods

• Can’t interleave subtasks of

different tasks

• Sometimes this makes things

awkward

– Need to write methods that

reason globally instead of locally

get(p) get(q)

get-both(p,q)

goto(b)

pickup(p) pickup(q)

get-both(p,q)

pickup-both(p,q)

walk(a,b)

goto(a)

walk(b,a)

walk(a,b) pickup(p) walk(b,a) walk(a,b) pickup(p) walk(b,a)

Docsity.com

π={ a 1 …, a (^) k , a }; w' ={t 2 , t 3 , …}

w ={ t 1 ,t 2 ,…} method instance m

w' ={ t 11 ,…,t (^) 1k ,t 2 ,…}

π={ a 1 ,…, a (^) k }; w ={ t 1 ,t 2 , t 3 …} operator instance a

Algorithm for Partial-Order STNs

π={ a 1 …, a (^) k , a }; w' ={t 2 , t 3 , …}

π={ a 1 ,…, a (^) k }; w ={ t 1 ,t 2 , t 3 …} operator instance a

Algorithm for Partial-Order STNs

  • Intuitively, w is a partially ordered set of tasks { t 1 , t 2 , …}
    • But w may contain a task more than once
      • e.g., travel from UMD to LAAS twice
    • The mathematical definition of a set doesn’t allow this
  • Define w as a partially ordered set of task nodes { u 1 , u 2 , …}
    • Each task node u corresponds to a task t (^) u
  • In my explanations, I’ll talk about t and ignore u

w ={ t 1 ,t 2 ,…} method instance m

w' ={ t 11 ,…,t (^) 1k ,t 2 ,…}