http://helios.hud.ac.uk/planform object transition sequences: a new form of abstraction for htn...

23
http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University of Huddersfield, UK

Post on 19-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

http://helios.hud.ac.uk/planform

Object Transition Sequences: A New Form of Abstraction for HTN

Planners

Lee McCluskey

Computing Science Dept,

The University of Huddersfield, UK

Page 2: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Contents

• Research Aims

• Background: the domain modelling language OCLh

• The HTN Planning Algorithm EMS

Page 3: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Problems

• In applications involving non-toy domain models, traditional htn/Strips domain modelling languages seem to lead to – trouble in building and reasoning with models and planners– models which are hard to validate

• There have been various recent advances in planning (e.g. advance in expression by UCPOP, in efficiency by Graphplan) but not much effort in harnessing domain STRUCTURE.

Page 4: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

General Aims

Our general work on “object-centred planning” is aimed at:

• Making domain model building easier• making domain models clearer• making the algorithms simpler to understand

At the heart is a simple, tool-supported hierarchical language called OCLh which can be used in conjunction with a design method.

Page 5: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Specific Aims

• Introduce a new HTN algorithm called EMS (Expand - Make - Sound)

• EMS based on the use of “transition sequences”

• Transition sequences based on OCLh

Page 6: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

OCLh: States and Objects

Truck; t-1; at(city-1), moveable, busy(pk-2)

S-2 ; j-2 ; ss-2

S-3 ; j-3 ; ss-3

......................

STATE = list of object descriptions

SORT; OB-ID; SUBSTATE

objectdescriptions

Page 7: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

OCLh: Sort Hierarchy

truck ; t-1; at(t-1,city1-cl1) & moveable(t-1) & busy(t-1,pk-2)

Truck; T; moveable(T) & busy(T,package) or moveable(T) or out-of-service(T)

vehicle; V; at(V,location)

Page 8: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

OBJECT and CLASS Expressions

truck ; t-1; at(t-1,city1-cl1) & moveable(t-1) & busy(t-1,pk-2)

vehicle ; V; at(V,C) & busy(V,P) &

in-city(C,city1)

truck ; T; at(T,C) & moveable(T) & busy(T,P)

Objectdescription

Class expression:must include fullhierarchicalcomponents

Object expression:satisfied by at least one substate

Page 9: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

OCLh: ACTIONS and TRANSITIONS

Train ; t-1; at(city1-ts1), in-service, attached(c-2) Car ; c-2; at(city1-ts1), attached(t-1), busy, ..

......................

State-1

Train ; t-1; at(city2-ts1), in-service, attached(c-2)

Car ; c-2; at(city2-ts1), attached(t-1), busy, ..

State-2

......................

Page 10: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

GUARDED TRANSITION SEQUENCES

• TRANSITION:

OBJECT EXPRESSION => CLASS EXPRESSION

• GUARDED TRANSITION SEQUENCE:

(SORT,OBJ-PARAM,PRE,[oe-1 => ce-1, ... ,oe-N => ce-N], POST)

• SOUND GUARDED TRANSITION SEQUENCE:

For any object description that satisfies the precondition, the transition sequence will result in an object that satisfies the post-condition.

Page 11: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Example

(truck,T,

[at(T,C),movable(T),available(T)] [

[movable(T),available(T)] =>

[movable(T),busy(T,pk-2)],

[at(T,C),movable(T)] => [at(T,city3-cl1)],

[at(T,city3-cl1),movable(T)] =>

[at(T,city3-cl1), movable(T),busy(T,pk-2)],

[at(T,city3-cl1),movable(T)] =>

[at(T,city1-cl1)],

[at(T,city1-cl1), movable(T),busy(T,pk-2)] =>

[at(T,city1-cl1), movable(T),available(T)]

], [at(T,city1-cl1), movable(T),available(T)] )

Page 12: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Hierarchical OperatorsGENERAL FORM

(ID, PRE, TRANSITIONS, STATICS, TEMPS, DECOMPOSITION)

EXAMPLE:

(carry-direct(P,O,D),

[ ],

[ (package, P,

[at(P,O), waiting(P), certified(P)] =>

[at(P,D), waiting(P), certified(P)] )]

[is-of-sort(P,package), is-of-sort(V,truck),

in-city(O,CY), in-city(D,CY) ],

[before(1,3), before(2,3), before(3,4), before(4,5)],

[commission(V,P), achieve((truck,V,[at(V,O)])),

load-package(P,V,O), move(V,O,D,R1),

unload-package(P,V,D) ]

)

Page 13: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Summary: an OCLh Domain Model

DOMAIN MODEL = OBJECTS; SORT HIERARCHY;CLASS EXPRESSIONS;ATOMIC INVARIANTS;GENERAL INVARIANTS;PRIMITIVE OPERATORS;HIERARCHICAL OPERATORS

Page 14: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

The EMS Algorithm: Input and Output

( [ achieve(ss(traincar,traincar1,[at(traincar1,city1-ts1)])), transport(pk-5-z,city3-cl1-z,city2-cl1), achieve(ss(package,pk-5,[at(pk-5,X),delivered(pk-5)] )) ], [before(1,3)], [serves(X,city3-x)])

- INPUT TASK: ( BODY, TEMPS, STATICS)

- EXAMPLE TASK:

OUTPUT: a solution - a partially ordered/instantiated set of primitive ops

Page 15: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: Search Space

PARTIAL PLAN = (NETWORKS, STATICS)

NETWORKS is TREE STRUCTURED:

ROOT NETWORK

NODE NETWORK NODE NETWORK

LEAF NETWORKLEAF NETWORK

LEAF NETWORK

Page 16: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: Operation

• Network = (Id, Pre, Post, Steps, Temps)

• Each non-root Network comes from a Step in its parent Network

• A Network is SOUND if all its guarded transition sequences are sound, where – Pre and Post contain the guards– all sequences are those that satisfy Temps

Page 17: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: Operation

• Outline Algorithm:– 1. Construct and store an initial partial plan using initial state

and task as usual– 2. Choose a partial plan P; If all networks in P are sound and

contain primitive operators, go to 6.– 3. If all networks in P are sound, expand leaf networks by

replacing hierarchical ops with their expansions– 4. If some networks in P are not sound, make them sound by

manipulating their pre- and post-conditions; if this introduces new objects into the guards, these must be ‘passed-up’

– 5. Go to 2– 6. Extract a solution from P’s network leaves

Page 18: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: Example Network

A0P0B0

B5P1

N2 P2

A5P3

A1B1

N3 A2 A3 N4 A4

EXPANSION OF STEP N3:

A1B1

A6V1B2

N5A7V2B3

V3 N6V4 A2

SOUND NETWORK:

Page 19: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: Network Made Sound

A0P0B0V7

B5P1

N2 P2

A5P3B6V6

A1B1V0

N3 A2B4V5

A3 N4 A4

NETWORK MADE SOUND:

A1B1V0

A6V1B2

N5A7V2B3

V3 N6V4 A2

B4V5

Page 20: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS uses another form of abstraction..

• The EMS Algorithm draws on the LINK between:

Operator Structure,

Substate Class Structure, and

Transition Sequences

Page 21: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

EMS: EVALUATION

• Theoretical– current algorithm proved sound– current algorithm not complete

• Empirical– tried out on Translog-derived domains of varying complexity

(results in paper)

Page 22: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Conclusions• The main innovation in the EMS algorithm -

– sound algorithm with the potential of application to complex applications

– object transitions correspond, in general, to the sequential parts of a plan. This allows the pre and post-conditions of transitions in a network to be efficiently computed, and these conditions can be used as guards in reasoning within higher-level networks.

– the sort-abstraction technique means that we only consider transitions of a related sort when reasoning about soundness.

– reasoning about the soundness of transition sequences is essential done locally - at no time does EMS have to consider the soundness of the whole plan at a global level.

Page 23: Http://helios.hud.ac.uk/planform Object Transition Sequences: A New Form of Abstraction for HTN Planners Lee McCluskey Computing Science Dept, The University

Future Work

• EMS is new and requires a great deal of development. One development would be to make it very generic so that it could be (automatically) configured to various domains.

• Through the PLANFORM project we will be applying EMS to some complex ‘real’ applications