Alternative Representations Propositions and State-Variables.

Slides:



Advertisements
Similar presentations
REVIEW : Planning To make your thinking more concrete, use a real problem to ground your discussion. –Develop a plan for a person who is getting out of.
Advertisements

Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Hierarchical Task Networks Planning to perform tasks rather than to achieve goals.
Scheduling Planning with Actions that Require Resources.
Hierarchical Task Network (HTN) Planning Hai Hoang 4/17/2007.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Constraint Based Reasoning over Mutex Relations in Graphplan Algorithm Pavel Surynek Charles University, Prague Czech Republic.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
SAT-Based Planning Using Propositional SAT- Solvers to Search for Plans.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
The Graphplan Planner Searching the Planning Graph.
The Situation Calculus and the Frame Problem Using Theorem Proving to Generate Plans.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning Introduction and Overview. Automated Planning: Introduction and Overview 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
State-Space Search and the STRIPS Planner Searching for a Path through a Graph of Nodes Representing World States.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Classical Planning Chapter 10.
Planning: Wrap up CSP Planning. Logic: Intro CPSC 322 – Planning 3 Textbook §8.4, §5.1 March 2, 2011.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Complexity of Classical Planning Megan Smith Lehigh University CSE 497, Spring 2007.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning Introduction and Overview. Automated Planning: Introduction and Overview 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso.
State-Space Search and the STRIPS Planner Searching for a Path through a Graph of Nodes Representing World States.
Pattern-directed inference systems
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Temporal Planning Planning with Temporal and Concurrent Actions.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1.6. DEFINITIONS  An equation is a statement that two expressions are equal.  Usually contains 1 or more variables  A variable is a symbol that represents.
CPSC 322, Lecture 19Slide 1 (finish Planning) Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt – 5.2) Oct,
1 Chapter 3 Complexity of Classical Planning. 2 Review: Classical Representation Function-free first-order language L Statement of a classical planning.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Consider the task get milk, bananas, and a cordless drill.
Syntax of First-Order Predicate Calculus (FOPC): 1. Alphabet Countable set of predicate symbols, each with specified arity  0. Countable set of function.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CLASSICAL PLANNING. Outline  The challenges in planning with standard search algorithm  Representing Plans – the PDDL language  Planning as state -
Deterministic Finite-State Machine (or Deterministic Finite Automaton) A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of: S: a finite set of states Σ:
Introduction to Logic for Artificial Intelligence Lecture 2
Searching for a Solution Plan in a Graph of Partial Plans
Planning as model checking, (OBDDs)
Planning: Forward Planning and CSP Planning
Consider the task get milk, bananas, and a cordless drill
Planning: Heuristics and CSP Planning
Class #17 – Thursday, October 27
Applications of Propositional Logic
Graphplan/ SATPlan Chapter
Warning I estimate 3 weeks of intensive reading for you to understand your assigned topic These are not self contained and you will need to understand.
Planning CSE 573 A handful of GENERAL SEARCH TECHNIQUES lie at the heart of practically all work in AI We will encounter the SAME PRINCIPLES again and.
Dana S. Nau University of Maryland 9:01 AM December 6, 2018
Planning: Heuristics and CSP Planning
Class #19 – Monday, November 3
Graphplan/ SATPlan Chapter
Chapter 2 Representations for Classical Planning
Graphplan/ SATPlan Chapter
Using Propositional SAT-Solvers to Search for Plans
Representations & Reasoning Systems (RRS) (2.2)
Hierarchical Task Networks
Propositional Satisfiability
Presentation transcript:

Alternative Representations Propositions and State-Variables

Alternative Representations 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning – Theory and Practice, chapter 2. Elsevier/Morgan Kaufmann, 2004.

Alternative Representations 3 Classical Representations propositional representation world state is set of propositions action consists of precondition propositions, propositions to be added and removed STRIPS representation like propositional representation, but first-order literals instead of propositions state-variable representation state is tuple of state variables {x 1,…,x n } action is partial function over states

Alternative Representations 4 Classical Planning task: find solution for planning problem planning problem initial state atoms (relations, objects) planning domain operators (name, preconditions, effects) goal solution (plan)

Alternative Representations 5 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness

Alternative Representations 6 Knowledge Engineering What types of objects do we need to represent? example: cranes, robots, containers, … note: objects usually only defined in problem What relations hold between these objects? example: at(robot, location), empty(crane), … static vs. fluent relations

Alternative Representations 7 Representing World States STRIPSpropositionalstate-variable stateset of atoms atom first-order atom proposition state-variable expression relationsyesnofunctions objects/typesyes/maybeno/noyes/maybe static relationsyesnot necessaryno

Alternative Representations 8 DWR Example: STRIPS States state = {attached(p1,loc1), attached(p2,loc1), in(c1,p1),in(c3,p1), top(c3,p1), on(c3,c1), on(c1,pallet), in(c2,p2), top(c2,p2), on(c2,pallet), belong(crane1,loc1), empty(crane1), adjacent(loc1,loc2), adjacent(loc2, loc1), at(r1,loc2), occupied(loc2), unloaded(r1)} loc1 loc2 pallet crane1 r1 pallet c2 c1 p2 p1 c3

Alternative Representations 9 DWR Example: Propositional States L={onpallet,onrobot,holding,at1,at2} S={s 0,…,s 5 } s 0 ={onpallet,at2} s 1 ={holding,at2} s 2 ={onpallet,at1} s 3 ={holding,at1} s 4 ={onrobot,at1} s 5 ={onrobot,at2} s0s0 location1location2 pallet cont. crane robot

Alternative Representations 10 State Variables some relations are functions example: at(r1,loc1): relates robot r1 to location loc1 in some state truth value changes from state to state will only be true for exactly one location l in each state idea: represent such relations using state- variable functions mapping states into objects example: functional representation: rloc:robots × S → locations

Alternative Representations 11 DWR Example: State-Variable State Descriptions simplified: no cranes, no piles state-variable functions: rloc: robots×S → locations rolad: robots×S→containers ∪ {nil} cpos: containers×S → locations ∪ robots sample state-variable state descriptions: {rloc(r1)=loc1, rload(r1)=nil, cpos(c1)=loc1, cpos(c2)=loc2, cpos(c3)=loc2} {rloc(r1)=loc1, rload(r1)=c1, cpos(c1)=r1, cpos(c2)=loc2, cpos(c3)=loc2}

Alternative Representations 12 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness

Alternative Representations 13 Knowledge Engineering What types of actions are there? example: move robots, load containers, … For each action type, and each relation, what must (not) hold for the action to be applicable? preconditions For each action type, and each relation, what relations will (no longer) hold due to the action? effects (must be consistent) For each action type, what objects are involved in performing the action? any object mentioned in the preconditions and effects preconditions should mention all objects

Alternative Representations 14 Representing Operators STRIPSpropositionalstate-variable namen(x 1,…,x k )namen(x 1,…,x k ) preconditions (set of) first-order literals propositions state-variable expressions applicability precond + (a) ⊆ s ⋀ precond - ( a )⋂ s ={} precond(a) ⊆ s effects (set of) first-order literals propositional literals xs←vxs←v γ(s,a)γ(s,a) (s – effects - (a)) ∪ effects + (a) {x s =c | x ∈ X} where x s ← c ∈ effects(a) or x s =c ∈ s otherwise

Alternative Representations 15 DWR Example: STRIPS Operators move(r,l,m) precond: adjacent(l,m), at(r,l), ¬ occupied(m) effects: at(r,m), occupied(m), ¬ occupied(l), ¬ at(r,l) load(k,l,c,r) precond: belong(k,l), holding(k,c), at(r,l), unloaded(r) effects: empty(k), ¬holding(k,c), loaded(r,c), ¬unloaded(r) put(k,l,c,d,p) precond: belong(k,l), attached(p,l), holding(k,c), top(d,p) effects: ¬holding(k,c), empty(k), in(c,p), top(c,p), on(c,d), ¬top(d,p)

Alternative Representations 16 DWR Example: Propositional Actions a precond(a)effects - (a)effects + (a) take{onpallet} {holding} put{holding} {onpallet} load{holding,at1}{holding}{onrobot} unload{onrobot,at1}{onrobot}{holding} move1{at2} {at1} move2{at1} {at2}

Alternative Representations 17 DWR Example: State-Variable Operators move(r,l,m) precond: rloc(r)=l, adjacent(l,m) effects: rloc(r) ← m load(r,c,l) precond: rloc(r)=l, cpos(c)=l, rload(r)=nil effects: cpos(c) ← r, rload(r) ← c unload( r,c,l ) precond: rloc(r)=l, rload(r)=c effects: rload(r) ← nil, cpos(c) ← l

Alternative Representations 18 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness

Alternative Representations 19 Representing Planning Problems STRIPSpropositional state- variable initial stateworld state in respective representation domain domain (set of operators) in respective representation goal same as preconditions in respective representation

Alternative Representations 20 DWR Example: STRIPS Planning Problem Σ: STRIPS planning domain for DWR domain s i : any state example: s 0 = {attached(pile,loc1), in(cont,pile), top(cont,pile), on(cont,pallet), belong(crane,loc1), empty(crane), adjacent(loc1,loc2), adjacent(loc2,loc1), at(robot,loc2), occupied(loc2), unloaded(robot)} g: any subset of L example: g = { ¬ unloaded(robot), at(robot,loc2) }, i.e. S g ={s 5 } s0s0 loc1loc2 pallet cont. crane robot s5s5 location1location2 pallet crane robot cont.

Alternative Representations 21 DWR Example: Propositional Planning Problem Σ: propositional planning domain for DWR domain s i : any state example: initial state = s 0 ∈S g: any subset of L example: g={onrobot,at2}, i.e. S g ={s 5 }

Alternative Representations 22 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness

Alternative Representations 23 Classical Plans and Solutions (all Representations) A plan is any sequence of actions π= 〈 a 1,…, a k 〉, where k≥0. The extended state transition function for plans is defined as follows: γ(s,π)=s if k=0 (π is empty) γ(s,π)=γ(γ(s,a 1 ), 〈 a 2,…, a k 〉) if k>0 and a 1 applicable in s γ(s,π)=undefined otherwise Let P =(Σ,s i,g) be a planning problem. A plan π is a solution for P if γ(s i,π) satisfies g.

Alternative Representations 24 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness

Alternative Representations 25 Grounding a STRIPS Planning Problem Let P=(O,s i,g) be the statement of a STRIPS planning problem and C the set of all the constant symbols that are mentioned in s i. Let ground(O) be the set of all possible instantiations of operators in O with constant symbols from C consistently replacing variables in preconditions and effects. Then P’=(ground(O),s i,g) is a statement of a STRIPS planning problem and P’ has the same solutions as P.

Alternative Representations 26 Translation: Propositional Representation to Ground STRIPS Let P=(A,s i,g) be a statement of a propositional planning problem. In the actions A: replace every action (precond(a), effects - (a), effects + (a)) with an operator o with some unique name(o), precond(o) = precond(a), and effects(o) = effects + (a) ∪ {¬p | p ∈ effects - (a)}.

Alternative Representations 27 Translation: Ground STRIPS to Propositional Representation Let P=(O,s i,g) be a ground statement of a classical planning problem. In the operators O, in the initial state s i, and in the goal g replace every atom P(v 1,…,v n ) with a propositional atom Pv 1,…,v n. In every operator o: for all ¬p in precond(o), replace ¬p with p’, if p in effects(o), add ¬p’ to effects(o), if ¬p in effects(o), add p’ to effects(o). In the goal replace ¬p with p’. For every operator o create an action (precond(o), effects - (a), effects + (a)).

Alternative Representations 28 Translation: STRIPS to State- Variable Representation Let P=(O,s i,g) be a statement of a classical planning problem. In the operators O, in the initial state s i, and in the goal g: replace every positive literal p(t 1,…,t n ) with a state- variable expression p(t 1,…,t n )=1 or p(t 1,…,t n ) ← 1 in the operators’ effects, and replace every negative literal ¬ p(t 1,…,t n ) with a state- variable expression p(t 1,…,t n )=0 or p(t 1,…,t n ) ← 0 in the operators’ effects.

Alternative Representations 29 Translation: State-Variable to STRIPS Representation Let P=(O,s i,g) be a statement of a state- variable planning problem. In the operators’ preconditions, in the initial state s i, and in the goal g: replace every state-variable expression p(t 1,…,t n )=v with an atom p(t 1,…,t n,v), and in the operators’ effects: replace every state-variable assignment p(t 1,…,t n ) ← v with a pair of literals p(t 1,…,t n,v), ¬ p(t 1,…,t n,w), and add p(t 1,…,t n,w) to the respective operators preconditions.

Alternative Representations 30 Overview World States Domains and Operators Planning Problems Plans and Solutions Expressiveness