chapter 2 deliberation with deterministic models
play

Chapter 2 Deliberation with Deterministic Models 2.1: - PowerPoint PPT Presentation

Last update: April 1, 2020 Chapter 2 Deliberation with Deterministic Models 2.1: State-Variable Representation Automated Planning 2.2: Forward Search and Acting 2.6: Planning and Acting Malik Ghallab, Dana Nau and Paolo Traverso Dana S.


  1. Last update: April 1, 2020 Chapter 2 Deliberation with Deterministic Models 2.1: State-Variable Representation Automated Planning 2.2: Forward Search and Acting 2.6: Planning and Acting Malik Ghallab, Dana Nau and Paolo Traverso Dana S. Nau http://www.laas.fr/planning University of Maryland Nau – Lecture slides for Automated Planning and Acting Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License 1

  2. Motivation and Outline ● How to model a complex environment? Outline ▸ Generally need simplifying assumptions 2.1 State-variable representation ▸ state variables, states, actions, ● Classical planning plans • Finite, static world, just one actor • No concurrent actions, no explicit time 2.2 Forward state-space search • Determinism, no uncertainty ▸ Sequence of states and actions ⟨ s 0 , a 1 , s 1 , a 2 , s 2 , … ⟩ 2.6 Incorporating planning into an actor 2.3 Heuristic functions ● Avoids many complications 2.4 Backward search ● Most real-world environments don’t satisfy the assumptions ⇒ Errors in prediction 2.5 Plan-space search ● OK if they’re infrequent and don’t have severe consequences Nau – Lecture slides for Automated Planning and Acting 2

  3. Domain Model ● plan : State-transition system or classical planning domain : ▸ a sequence of actions π = ⟨ a 1 , …, a n ⟩ ● Σ = ( S,A, γ,cost) or ( S,A, γ) ● π is applicable in s 0 if the actions are applicable in the order given ▸ S - finite set of states γ( s 0 , a 1 ) = s 1 ▸ A - finite set of actions γ( s 1 , a 2 ) = s 2 ▸ γ: S × A → S … - prediction (or state-transition ) function γ( s n –1 , a n ) = s n • partial function ▸ In this case define γ( s 0 , π ) = s n ▸ defined only when a is applicable in s • Domain( a ) = { s ∈ S | a is applicable in s } ● Classical planning problem : = { s ∈ S | γ( s,a ) is defined} ▸ P = (Σ, s 0 , S g ) • Range( a ) = {γ( s , a ) | s ∈ Domain( a )} ▸ planning domain, initial state, set of goal states ▸ cost: S × A → R + or cost: A → R + ● Solution for P : • optional; default is cost( a ) ≡ 1 ▸ a plan π such that that γ( s 0 , π ) ∈ S g • money, time, something else Nau – Lecture slides for Automated Planning and Acting 3

  4. Representing Σ y ● If S and A are small enough loc 2 4 loc 0 ▸ Give each state and action a name loc 6 ▸ For each s and a , store γ( s,a ) in a lookup table loc 1 3 loc 3 2 ● In larger domains, don’t represent all states loc 7 loc 4 loc 5 1 explicitly loc 8 loc 9 ▸ Language for describing properties of states x 0 1 2 3 4 5 6 ▸ Language for describing how each action changes those properties ▸ Start with initial state … a 1 s 1 = γ( s 0 ,a 1 ) ▸ Use actions to produce other states s 0 a 1 ′ … s 1 ′ = γ( s 0 ,a 1 ′) Nau – Lecture slides for Automated Planning and Acting 4

  5. Domain-Specific Representation ● Made to order for a specific environment ● State: arbitrary data structure ● Action: (head, preconditions, effects, cost) ▸ head : name and parameter list • Get actions by instantiating the parameters ▸ preconditions : • Computational tests to predict whether an action can be performed • Should be necessary/sufficient for the action to run without error ▸ effects : • Procedures that modify the current state ▸ cost : procedure that returns a number • Can be omitted, default is cost ≡ 1 Nau – Lecture slides for Automated Planning and Acting 5

  6. Example ● Drilling holes in a metal workpiece ● Name and parameters: ▸ A state ▸ drill-hole ( machine, drill-bit, workpiece, geometry, machining-tolerances ) • annotated geometric model of the workpiece ● Preconditions • capabilities and status of ▸ Capabilities : can the machine and drill bit drilling machine and drill bit produce a hole with the desired geometry and ▸ Several actions machining tolerances? • put workpiece onto the drilling machine ▸ Current state : Is the drill bit installed? Is the • clamp it workpiece clamped onto the table? Etc. • load a drill bit ● Effects • drill ▸ annotated geometric model of modified workpiece ● Cost ▸ estimate of time or monetary cost Nau – Lecture slides for Automated Planning and Acting 6

  7. Discussion ● Advantage of domain-specific representation: ● State-variable representation ▸ use whatever works best for that particular ▸ Simple formats for describing states and domain actions ▸ Limited representational capability ● Disadvantage: ▸ for each new domain, need new • But easy to compute, easy to reason representation and deliberation algorithms about ▸ Domain-independent search algorithms and ● Alternative: domain-independent representation heuristic functions that can be used in all state-variable planning problems ▸ Try to create a “standard format” that can be used for many different planning domains ▸ Deliberation algorithms that work for anything in this format Nau – Lecture slides for Automated Planning and Acting 7

  8. State-Variable Representation ● E : environment that we want to represent ● B : set of symbols called objects ▸ names for objects in E , mathematical constants, … d3 ● Example r1 ▸ B = Robots ∪ Containers ∪ Locs ∪ { nil } c1 c2 d1 d2 • Robots = { r1 } • Containers = { c1, c2 } • Locs = { d1, d2, d3 } ● B only needs to include objects that matter at the current level of abstraction ● Can omit lots of details ▸ physical characteristics of robots, containers, loading docks, roads, … Nau – Lecture slides for Automated Planning and Acting 8

  9. Properties of Objects ● Define ways to represent properties of objects ● Terminology from first-order logic: ▸ Two kinds of properties: rigid and varying ▸ ground : fully instantiated, no variable symbols ▸ atom ≡ atomic formula ≡ positive literal ● Rigid property: stays the same in every state ≡ predicate symbol with list of arguments ▸ Two equivalent notations: ▸ negative literal ≡ negated atom ≡ atom with • A mathematical relation a negation sign in front of it adjacent = {( d1,d2 ), ( d2,d1 ), ( d1,d3 ), ( d3,d1 )} • A set of ground atoms adjacent(d1,d2), adjacent(d2,d1), d3 adjacent(d1,d3), adjacent(d3,d1) r1 c1 c2 d1 d2 Nau – Lecture slides for Automated Planning and Acting 9

  10. Varying Properties ● Varying property (or fluent ): may differ in different states ▸ Represent it using a state variable that we can assign a value to d3 r1 ● Set of state variables c1 c2 d1 d2 X = { loc(r1) , loc(c1) , loc(c2) , cargo(r1) } ● Each state variable x ∈ X has a range = {all values that can be assigned to x } ▸ Range( loc ( r1 )) = Locs Instead of “domain”, to avoid confusion ▸ Range( loc ( c1 )) = Range( loc ( c2) ) = Robots ∪ Locs with planning domains ▸ Range( cargo ( r1 )) = Containers ∪ { nil } Nau – Lecture slides for Automated Planning and Acting 10

  11. States as Functions ● Represent each state as a variable-assignment function ▸ Function that maps each x ∈ X to a value in Range( x ) d3 s 1 (loc(r1)) = d1 , s 1 (cargo(r1)) = nil , r1 s 1 (loc(c1)) = d1 , s 1 (loc(c2)) = d2 c1 c2 d1 d2 ● Mathematically, a function is a set of ordered pairs s 1 = { (loc(r1), d1), (cargo(r1), nil), (loc(c1), d1) , (loc(c2), d2) } ● Write it as a set of ground positive literals (or ground atoms ): s 1 = { loc(r1) = d1, cargo(r1) = nil, loc(c1) = d1, loc(c2)=d2 } Nau – Lecture slides for Automated Planning and Acting 11

  12. Action Templates d3 ● Action template: a parameterized set of actions r1 α = (head(α), pre(α), eff(α), cost(α)) c1 c2 d1 d2 ● head( α ): name, parameters move ( r,l,m ) pre: loc ( r )= l , adjacent ( l,m ) Each parameter has a range ⊆ B eff: loc ( r ) ← m ● pre( α ): precondition literals take( r,l,c ) rel ( t 1 ,…, t k ), var ( t 1 ,…, t k ) = t 0 , pre: cargo ( r )= nil, loc ( r )= l , loc ( c )= l ¬ rel ( t 1 ,…, t k ), ¬ var ( t 1 ,…, t k ) = t 0 eff: cargo ( r ) ← c , loc ( c ) ← r ▸ Each t i is a parameter or an element of B put( r,l,c ) ● eff( α ): effect literals pre: loc ( r )= l , loc ( c )= r var ( t 1 ,…, t k ) ← t 0 eff: cargo ( r ) ← nil , loc ( c ) ← l ● cost( α ): a number Range( r ) = Robots = { r1 } ▸ Optional, default is 1 Range( l ) = Range( m ) = Locs = { d1,d2,d3 } Range( c ) = Containers = { c1,c2 } Nau – Lecture slides for Automated Planning and Acting 12

  13. Actions ● A = set of action templates ● Action: ground instance of an α ∈ A ▸ replace each parameter with something in its range move ( r,l,m ) pre: loc ( r )= l , adjacent ( l, m ) ● A = {all actions we can get from A } eff: loc ( r ) ← m = {all ground instances of members of A } take( r,l,c ) pre: cargo ( r )= nil, loc ( r )= l , loc (c)= l move(r1,d1,d2) eff: cargo( r ) ← c , loc( c) ← r pre: loc(r1) = d1 , adjacent(d1,d2) eff: loc(r1) ← d2 put( r,l,c ) d3 pre: loc ( r )= l , loc ( c )= r r1 eff: cargo( r ) ← nil , loc( c) ← l c1 c2 d1 d2 Range( r ) = Robots = { r1 } Range( l ) = Range( m ) = Locs = { d1,d2,d3 } Range( c ) = Containers = { c1,c2 } Nau – Lecture slides for Automated Planning and Acting 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend