280 likes | 394 Vues
This text explores the fundamentals of automated planning, highlighting the distinctions between domain-independent and domain-specific planning approaches. It defines planning as a sequence of actions to achieve a goal and discusses classical planning's assumptions, such as symbolic information and the success of actions. The content reviews planning tasks such as military and game planning, while also addressing challenges in classical planning. Additionally, the role of state transition systems and observations in the planning process is analyzed, providing insights into the principles and complexities of automated planning.
E N D
Automated Planning Dr. Héctor Muñoz-Avila • Source: • Ch. 1 • Appendix B.3 • Dana Nau’s slides • My own
What is Planning? Classical Definition • Planning: finding a sequence of actions to achieve a goal • 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 semantics Disadvantage: - symbolic description requirement Advantage: - can be very efficient Disadvantage: - lack of clear semantics - knowledge-engineering for adaptation
Classical Planning • Classical planning makes a number of assumptions: • Symbolic information (i.e., non numerical) • Actions always succeed • The “Strips” assumption: only changes that takes place are those indicated by the operators • Next slide enumerates all assumptions • Despite these (admittedly unrealistic) assumptions some work-around can be made (and have been made!) to apply the principles of classical planning to games • “Hot” research topic: to removes some of these assumptions
State & Goals • Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) • Goals: (on C Table) (on B C) (on A B) (clear A) A Initial state Goals C B A B C (Ke Xu)
No block on top of ?x No block on top of ?y nor ?x transformation On table General-Purpose Planning: Operators Operator: (Unstack ?x) • Preconditions: (on ?x ?y) (clear ?x) • Effects: • Add: (on ?x table) (clear ?y) • Delete: (on ?x ?y) ?x ?y ?y ?x … …
Classical Planning can be Hard C A B C A B C B A B A C B A C B A B C C B A B A C A C A A B C B C C B A A B C (Michael Moll)
Conceptual Model1. Environment System State transition system = (S,A,E,) Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
s1 s0 put take location 2 location 1 location 2 location 1 move1 move2 move1 move2 s3 s2 put take location 2 location 2 location 1 location 1 load unload s4 s5 move2 move1 location 2 location 2 location 1 location 1 State Transition System = (S,A,E,) • S = {states} • A = {actions} • E = {exogenous events} • State-transition function: S x (AE) 2S • S = {s0, …, s5} • A = {move1, move2, put, take, load, unload} • E = {} • : see the arrows The Dock Worker Robots (DWR) domain Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
s3 location 2 location 1 Conceptual Model2. Controller Given observation o in O, produces action a in A Controller Observation function h: SO State transition system = (S,A,E,) Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
s3 location 2 location 1 Conceptual Model2. Controller Complete observability: h(s) = s Given observation o in O, produces action a in A Controller Observation function h: SO Given state s, produces action a State transition system = (S,A,E,) Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Planning problem Planning problem Planning problem Conceptual Model3. Planner’s Input Planner Depends on whether planning is online or offline Given observation o in O, produces action a in A Observation function h: SO State transition system = (S,A,E,) Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
s1 s0 put take location 2 location 1 location 2 location 1 move1 move2 move1 move2 s3 s2 put take location 2 location 2 location 1 location 1 load unload s4 s5 move2 move1 location 2 location 2 location 1 location 1 PlanningProblem • Description of • Initial state or set of states • Initial state = s0 • Objective • Goal state, set of goal states, set of tasks, “trajectory” of states, objective function, … • Goal state = s5 The Dock Worker Robots (DWR) domain Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Planning problem Planning problem Planning problem Conceptual Model4. Planner’s Output Planner Instructions tothe controller Depends on whether planning is online or offline Given observation o in O, produces action a in A Observation function h(s) = s State transition system = (S,A,E,) 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 Assumptions (I) • A0: Finite system • finitely many states,actions, and events • A1: Fully observable • the controller alwaysknows what state is in • A2: Deterministic • each action or event hasonly one possible outcome • A3: Static • No exogenous events: no changes except those performed by the controller 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 Assumptions (II) A4: Attainment goals • a set of goal states Sg A5: Sequential plans • a plan is a linearlyordered sequence of actions (a1, a2, … an) A6 :Implicit time • no 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/
This is Nice but How About Actual Deployed Applications? • We briefly discuss three deployed applications: • Fear: application of a “classical” planner • Bridge: application of a “new-classical” planner • MRB: planning + execution • We will discuss these again in detail later in the semester
Detailed Discussion of Topics • See web page
Math Background: Logic Source: Appendix B.3
Introduction to Logic • A logic is a formal system of representing knowledge • A logic has: • Syntax – indicates the valid expressions • Semantics – provides meaning to the expressions • Inference mechanism – draw conclusions from a set of statements
Example: propositional Logic • Definition. A propositonal formula is defined recursively as follows: • A symbol form a predefined list P is a proposition • If 1 and 2, are propositions then: • (1 2) • (1 2) • (1 2) are also propositions • If is a proposition then ¬() is a proposition Example. (a) (¬a ¬b c d) (¬c ¬d) (¬d) Semantics. Truth tables Inference mechanism. Modus ponens
Predicate Logic • Definition. A term is defined as follows: • A constant is a term • A variable is a term • If t1, …, tn are terms and f is a function symbols then f(t1,…,tn) is a term • Definition. If t1, …, tn are terms and p is a symbol for an n-ary predicate then p(t1, …, tn ) are predicates
Predicate Logic: Formulas • Definition. An atomic formula is defined recursively as follows: • An atom is an atomic formula • If 1 and 2, are atomic formulas then: • (1 2) • (1 2) • (1 2) are also atomic formulas • If is a atomic formula then ¬() is an atomic formula • If is a atomic formula and x is a variable then: • x() is an atomic formula • x() is an atomic formula Example: x (likes(Mephistus,x) evilThing(x)) How do we say that Mephistus likes only evil things?
Predicate Logic: Semantics • (1 2) • (1 2) • (1 2) • ¬() • x() • x()
Predicate Logic: Literals and Clauses • Definition. A literal is an atomic formula consisting of a single atom and no quantifiers • likes(Mephistus,x) • ¬ evilThing(x) • Definition. A clause is a disjunction of literals • likes(Mephistus,x) ¬ evilThing(x)
Resolution: Inference Mechanism for Predicate Logic • Substitution, • Unification • Most general unifier • Resolution: Given two clauses: • L = l1 l2 … ln • M = m1 m2 … mn If there is and li and mk such that: • li = a and mk = ¬a’ and • There is a most general unifier for a and a’ Then: (L – li) (M – mk) is a resolvent of L and M • Idea behind the resolution procedure