Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Automated Planning PLG Group Universidad Carlos III de Madrid AI. 2008-09 Automated Planning 1
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Indice Introduction 1 Classical planning 2 Neoclassical planning 3 Heuristics 4 Heuristic planning Hierarchical Task Networks Control knowledge Machine learning Planning in the real world 5 Automated Planning 2
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Indice Introduction 1 Classical planning 2 Neoclassical planning 3 Heuristics 4 Heuristic planning Hierarchical Task Networks Control knowledge Machine learning Planning in the real world 5 Automated Planning 3
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Indice Introduction 1 Classical planning 2 Neoclassical planning 3 Heuristics 4 Heuristic planning Hierarchical Task Networks Control knowledge Machine learning Planning in the real world 5 Automated Planning 4
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Indice Introduction 1 Classical planning 2 Neoclassical planning 3 Heuristics 4 Heuristic planning Hierarchical Task Networks Control knowledge Machine learning Planning in the real world 5 Automated Planning 5
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Heuristic planning Types of heuristics Domain-independent : they can be safely used in any domain, tipically for the selection of descendants Domain-dependent : especially devised for a given domain, they are usually employed for all the other steps Real planners do consist of a mixture of both! Domain-independence ensures soundness Domain-dependence improves the performance General idea : to automatically define domain-independent heuristic functions as opposed to ad-hoc domain-dependent functions as in the N -puzzle or the Sokoban domains. Automated Planning 6
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Hierarchical Planning Hierarchical planners implement heuristics that guide the branching process As in Classical Planning, every state is represented with a set of literals In contrast with Classical Planning: Instead of aiming at satisfying a set of goal literals G , it aims at planning the set of actions that perform an activity or task Tasks are decomposed in subtasks according to the definition of various methods There are two types: Simple Task Networks (STNs): the decomposition is applied after meeting some preconditions according to a hierarchy Hierarchical Task Networks (HTNs): the decomposition is applied when some constraints are met Automated Planning 7
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Types of hierarchical planning Searching by iteratively considering increasingly detailed abstraction levels in preconditions: ABSTRIPS [Sacerdoti, 1974], ALPINE [Knoblock, 1994] Iteratively refining operators: NOAH [Sacerdoti, 1977], MOLGEN [Stefik, 1981b, Stefik, 1981a] Preprogramming how to divide each oeprator: O - PLAN [Currie and Tate, 1991], SHOP 2 [Nau et al. , 2003] Automated Planning 8
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Simple Task Networks (STNs) A STN is a directed acyclic graph w = ( U , E ) where: Each node u ∈ U is associated with a task : Instantiated or not: in case it has or not free variables Primitive or not: in case it might be decomposed further Each arc e ∈ E stands for an relation of order between two tasks: u ≺ v iff there is a path from u to v Automated Planning 9
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Simple Task Networks. STN s B invertir−pila (B) C quitar (B,C) dejar (B) invertir−sobre−pila (C,B) C poner (C,B) levantar(C) B Automated Planning 10
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks STN methods A method is a tuple m = ( name ( m ) , task ( m ) , precond ( m ) , network ( m )) where: name ( m ) is the name of the method task ( m ) is a non-primitive task precond ( m ) are the preconditions of the method network ( m ) are the subtasks of the method A STN planning task is a tuple P = ( s 0 , w , O , M ) where: s 0 is the initial state w is a hierarchy of tasks D = ( O , M ) is the planning domain — operators and methods Automated Planning 11
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks An example (I) method: iniciar-inversi´ on (b1, b2) task: invertir-pila (b1) preconds: libre (b1), encima (b1, b2) subtasks: quitar (b1, b2), dejar (b1), invertir-sobre-pila (b2, b1) method: invertir (b1, b2, b3) task: invertir-sobre-pila (b1, b2) preconds: libre (b1), libre (b2), encima (b1, b3) subtasks: quitar (b1, b3), poner (b1, b2), invertir-sobre-pila (b3, b1) method: finalizar-inversi´ on (b1, b2) task: invertir-sobre-pila (b1, b2) preconds: libre (b1), libre (b2), en-mesa (b1) subtasks: levantar (b1), poner (b1, b2) Automated Planning 12
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Example STN (cont.) A invertir−pila (A) B iniciar−inversion (A,B) C quitar (A,B) dejar (A) invertir−sobre−pila (B,A) invertir (B,A,C) B quitar (B,C) poner (B,A) invertir−sobre−pila (C,B) A C finalizar−inversion (C,B) B levantar (C) poner (C,B) A C C B A Automated Planning 13
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Resolution A plan π = � a 1 , . . . , a n � solves a planning problem P = ( s 0 , w , O , M ) iff: w = ∅ and π = ∅ Given a non-primitive task u ∈ w , π is said to be a solution of P if a 1 is applicable in s 0 and π = � a 2 , . . . , a n � is a solution of P ′ = ( γ ( s 0 , a 1 ) , w − u , O , M ) Given a non-primitive task u ∈ w , π is a solution of P if there exists a hierarchy w ′ which can be reached with a method m in such a way that π is a solution of ( s 0 , w ′ , O , M ) Hierarchical models traverse states explicitly They do generate sequential plans However, it is possible to derive from them plans either in total order or partial order Automated Planning 14
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Hierarchical Task Networks (HTNs) An HTN is defined as w = ( U , C ) where C is a set of constraints: of precedence : u ≺ v before-constraint : before ( U ′ , l ) states that in every plan π which is a solution of P , l shall be true before U ′ after-constraint : after ( U ′ , l ) specifies that in every plan π which is a solution of P , l shall be true after U ′ between-constraint : between ( U ′ , U ′′ , l ) requires that l must be true just after U ′ and shall be true in all the states in between until U ′′ Thus, HTN methods are described as follows: m = ( name ( m ) , task ( m ) , precond ( m ) , network ( m )) Automated Planning 15
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks An example method: iniciar-inversion (b1, b2) task: invertir-pila (b1) subtasks: u 1 = quitar (b1, b2), u 2 = dejar (b1), u 3 = invertir-sobre-pila (b2, b1) constraints: u 1 ≺ u 2 , u 2 ≺ u 3 , before ( { u 1 } , libre (b1)) , before ( { u 1 } , encima (b1,b2)) , before ( { u 1 } , brazo-libre) , before ( { u 3 } , libre (b1)) method: invertir (b1, b2, b3) task: invertir-sobre-pila (b1, b2) subtasks: u 1 = quitar (b1, b3), u 2 = poner (b1, b2), u 3 = invertir-sobre-pila (b3, b1) constraints: u 1 ≺ u 2 , u 2 ≺ u 3 , before ( { u 3 } , libre (b1)) before ( { u 1 } , encima (b1,b3)) , before ( { u 1 } , brazo-libre) , before ( { u 3 } , libre (b1)) method: finalizar-inversion (b1, b2) task: invertir-sobre-pila (b1, b2) subtasks: u 1 = levantar (b1), u 2 = poner (b1, b2) constraints: u 1 ≺ u 2 Automated Planning 16
Introduction Classical planning Neoclassical planning Heuristics Planning in the real world Hierarchical Task Networks Example of domain theory (actions) (defdomain logistics ((:operator (!load-truck ?obj ?truck ?loc) ((obj-at ?obj ?loc) (:protection (truck-at ?truck ?loc))) ((in-truck ?obj ?truck))) (:operator (!unload-truck ?obj ?truck ?loc) ((in-truck ?obj ?truck) (:protection (truck-at ?truck ?loc))) ((obj-at ?obj ?loc))) . . . )) Automated Planning 17
Recommend
More recommend