Application: Planning as Satisfiability (SATPlan) (Pre Lecture)

Similar documents
Situation Calculus. Dr. Neil T. Dantam. Spring CSCI-498/598 RPM, Colorado School of Mines

Propositional Calculus

Complexity (Pre Lecture)

Chapter 7 Propositional Satisfiability Techniques

Chapter 7 Propositional Satisfiability Techniques

Tutorial 1: Modern SMT Solvers and Verification

Planning as Satisfiability

Pushdown Automata (Pre Lecture)

Introduction on Situational Calculus

Lecture 1: Logical Foundations

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

Example: Robot Tasks. What is planning? Background: Situation Calculus. Issues in Planning I

Part of this work we present an extension for Language PP and we show how this

Lecture 9: The Splitting Method for SAT

Foundations of Artificial Intelligence

Satisfiability Modulo Theories

Foundations of Artificial Intelligence

Fast Planning by Search in Domain Transition Graph

Principles of AI Planning

In which we see how an agent can take advantage of the structure of a problem to construct complex plans of action.

Logical Agents. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Principles of AI Planning

A Novel Transition Based Encoding Scheme for Planning as Satisfiability

CS 4700: Foundations of Artificial Intelligence

Lecture 7: Logic and Planning

Planning: situation calculus

Optimal Metric Planning with State Sets in Automata Representation

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Predicate Calculus lecture 1

Mathematical Logic Part Three

Structure and. Inference in. Classical Planning

On Moving Objects in Dynamic Domains

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 43

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

Context-Free Languages (Pre Lecture)

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Propositional and Predicate Logic. jean/gbooks/logic.html

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Logical Agents. Santa Clara University

Incremental Deterministic Planning

Reasoning about State Constraints in the Situation Calculus

Inference in first-order logic. Production systems.

Logic & Logic Agents Chapter 7 (& background)

Propositional Reasoning

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35

Planning Graphs and Propositional Clause-Learning

Introduction to Arti Intelligence

Lecture Notes on SAT Solvers & DPLL

Fact-Alternating Mutex Groups for Classical Planning (Extended Abstract)

Artificial Intelligence

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

An instance of SAT is defined as (X, S)

CS:4420 Artificial Intelligence

Deliberative Agents Knowledge Representation I. Deliberative Agents

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Knowledge-based systems

Formal Verification Methods 1: Propositional Logic

From SAT To SMT: Part 1. Vijay Ganesh MIT

Logic reasoning systems

Solving SAT Modulo Theories

Introduction to Artificial Intelligence. Logical Agents

Satisifiability and Probabilistic Satisifiability

Discretization of Temporal Models with Application to Planning with SMT

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Dieter Fox, Henry Kautz )

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

Lecture 10: Feb. 11, 2015

Logical Agents. Outline

Set 9: Planning Classical Planning Systems Chapter 10 R&N. ICS 271 Fall 2017

Regular Expressions (Pre Lecture)

Predicate Logic: Sematics Part 1

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin

CS 4700: Artificial Intelligence

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

An Introduction to SAT Solving

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2)

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Logical Agents. Chapter 7

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Lecture 9: Search 8. Victor R. Lesser. CMPSCI 683 Fall 2010

First Order Logic (FOL)

Intelligent Agents. Pınar Yolum Utrecht University

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Logic. proof and truth syntacs and semantics. Peter Antal

A Heuristic Search Approach to Planning with Temporally Extended Preferences

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Logical Agents. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Integer vs. constraint programming. IP vs. CP: Language

Today s Lecture. Lecture 4: Formal SE. Some Important Points. Formal Software Engineering. Introduction to Formal Software Engineering

Principles of AI Planning

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Foundations of Artificial Intelligence

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

CSCI-495 Artificial Intelligence. Lecture 17

Transcription:

Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2018 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 1 / 44

Outline Introduction to Planning Planning Domains First Order Logic Planning Domain Description Language Planning Algorithms Naïve Search Heuristic Search Constraint-Based Planning Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 2 / 44

Why? Foreshadows/applies the Cook-Levin Theorem Directly connects SAT with transition systems (languages and automata) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 3 / 44

Introduction to Planning Outline Introduction to Planning Planning Domains First Order Logic Planning Domain Description Language Planning Algorithms Naïve Search Heuristic Search Constraint-Based Planning Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 4 / 44

Introduction to Planning A Planning Problem Illustration Start Goal Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 5 / 44

Introduction to Planning Planning Problem Definition State Space: Q = f 0 f 1... f m, for each fluent (state variable) f i Actions: U = {a 0,..., a n } Transitions: δ : Q U Q, where for δ(q 0, a) = q 1, Start: q 0 Q is the initial state Goal: G Q is the set of goal states Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 6 / 44

Introduction to Planning Planning vs. DFA Planning Domain DFA State Space: Q = f 0 f 1... f m Actions: U = {a 0,..., a n } Transitions: δ : Q U Q Start: q 0 Q is the initial state Goal: G Q is the set of goal states Q is a finite set call the states Σ is a finite set call the alphabet δ : Q Σ Q is the transition function q 0 Q is the start state F Q is the set of accept states What s different? Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 7 / 44

Planning Domains Outline Introduction to Planning Planning Domains First Order Logic Planning Domain Description Language Planning Algorithms Naïve Search Heuristic Search Constraint-Based Planning Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 8 / 44

Planning Domains First Order Logic First Order Logic aka Predicate Calculus Propositional Logic plus... Objects: instead of just Boolean values, Finite set of values Enumerated type Predicates: Function from objects to Booleans P : O... O B Functions: Function from objects to objects F : O... O O Quantifiers: express properties on collections Universal: all items have the property Existential: at least one item has the property Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 9 / 44

Planning Domains First Order Logic Logical Predicate Boolean-valued function N-ary arguments f : O... O B Examples: English Logic x is happy happy (x) The suitcase contains a bomb. contains (suitcase, bomb) x is less than y. less (x, y) Formal way of stating facts. Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 10 / 44

Planning Domains First Order Logic Exercise: Logical Predicates Material Properties Objects: {wood, glass, steel} Predicates: Statements: transparent (?x) flammable (?x) denser (?x,?y) transparent (wood) = transparent (glass) = transparent (steel) = flammable (wood) = flammable (glass) = flammable (steel) = denser (wood, glass) = denser (glass, wood) = denser (glass, steel) = Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 11 / 44

Planning Domains First Order Logic Grammar for First Order Logic (excluding quantifiers) Sentence AtomicSentence Sentence Connective Sentence [(] Sentence [)] [ ] Sentence AtomicSentence Predicate [(] TermList [)] Connective [ ] [ ] [ = ] [ ] TermList Term Term [,] TermList Term Constant Variable Predicate [A] [B]... Constant [a] [b]... Variable [?x] [?y]... Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 12 / 44

Planning Domains First Order Logic First-Order Logic Description Constants: A, B, C C Predicates: on (?x,?y) clear (?x) ontable (?x) B A State: clear (B) clear (C) ontable (B) ontable (A) on (C, A) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 13 / 44

Planning Domains First Order Logic First Order vs. Propositional Logic Every sentence in first-order logic can be converted into an equivalent sentence in propositional logic (modulo functions) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 14 / 44

Planning Domains First Order Logic Example: Reduction to Propositional Logic (Grounding) Objects: {glass, steel} Predicates: Propositions: transparent (?x) denser (?x,?y) FOL predicate proposition {}}{{}}{ transparent (glass) transparent-glass transparent (steel) transparent-steel denser (glass, steel) denser-glass-steel denser (glass, glass) denser-glass-glass denser (steel, glass) denser-steel-glass denser (steel, steel) denser-steel-steel Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 15 / 44

Planning Domains First Order Logic Exercise: Grounding Constants: A, B, C Predicate: clear (?x), ontable (?x), and on (?x,?y) Propositions: Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 16 / 44

Planning Domains Planning Domain Description Language A Planning Problem Start B Start C A Goal A B C Goal ontable (b) on (c, a) ontable (a) handempty () ontable (c) on (b, c) on (a, b) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 17 / 44

Planning Domains Planning Domain Description Language Example: Actions / Operators Name: pickup-up Parameters:?x Precondition: clear (?x) ontable (?x) handempty () Effect: ontable (?x) clear (?x) handempty () holding (?x) B B C A pick-up (B) C A ontable (B) ontable (A) on (C, A) clear (B) clear (C) handempty () ontable (B) handempty () clear (B) holding (B) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 18 / 44

Planning Domains Planning Domain Description Language Exercise: Actions / Operators Name: unstack Parameters:?x,?y Precondition: on (?x,?y) clear (?x) handempty () Effect: holding (?x) clear (?y) clear (?x) handempty () on (?x,?y) C B C A unstack (C, A) B A ontable (B) ontable (A) on (C, A) clear (B) clear (C) handempty () Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 19 / 44

Planning Domains Planning Domain Description Language Task Language pick-up (B) B C A...... B B C A put-down (B) unstack (C, A) pick-up (B) A C stack (C, A) B C A put-down (C) pick-up (C) B A C put-down (B)... Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 20 / 44

Planning Domains Planning Domain Description Language Planning Domain Definition Language (PDDL) PDDL: S-Expression based format for planning domains Operators File: Defines the predicates and actions Facts File: Defines the objects (constants), start state, and goal Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 21 / 44

Planning Domains Planning Domain Description Language Planning Domain Definition Language Operators ( d e f i n e ( domain b l o c k s ) ( : p r e d i c a t e s ( on? x? y ) ( o n t a b l e? x ) ( c l e a r? x ) ( handempty ) ( h o l d i n g? x ) ) ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) ( : a c t i o n s t a c k : parameters (? x? y ) : p r e c o n d i t i o n ( and ( h o l d i n g? x ) ( c l e a r? y ) ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( not ( c l e a r? y ) ) ( c l e a r? x ) ( handempty ) ( on? x? y ) ) ) ( : a c t i o n u n s t a c k : parameters (? x? y ) : p r e c o n d i t i o n ( and ( on? x? y ) ( c l e a r? x ) ( handempty ) ) : e f f e c t ( and ( h o l d i n g? x ) ( c l e a r? y ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( not ( on? x? y ) ) ) ) ) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 22 / 44

Planning Domains Planning Domain Description Language Planning Domain Definition Language Facts Start ( d e f i n e ( problem sussman anomaly ) ( : domain b l o c k s ) ( : o b j e c t s a b c ) ( : i n i t ( on c a ) ( o n t a b l e a ) ( o n t a b l e b ) ( c l e a r c ) ( c l e a r b ) ( handempty ) ) ( : g o a l ( and ( on b c ) ( on a b ) ) ) ) C B A Goal A B C Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 23 / 44

Planning Algorithms Outline Introduction to Planning Planning Domains First Order Logic Planning Domain Description Language Planning Algorithms Naïve Search Heuristic Search Constraint-Based Planning Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 24 / 44

Planning Algorithms Naïve Search Explicit Automaton Construction 54A (MOVE B C G) (MOVE B G C) 64E start (MOVE C A B) (MOVE C B A) (MOVE C G B) (MOVE C A G) (MOVE C B G) (MOVE C G A) 124F (MOVE A G C) A4D 122B (MOVE A C G) (MOVE A G C) (MOVE B G A) (MOVE B A G) 10AA (MOVE A B C) A29 (MOVE A C G) (MOVE A C B) (MOVE A B G) 121D (MOVE C G A) (MOVE A G B) (MOVE C A G) 61C C B A Start A B C Goal (MOVE B C G) (MOVE B G C) (MOVE B A G) (MOVE A G B) (MOVE B C A) 114B (MOVE A B G) 1119 (MOVE B G A) 10CE (MOVE B A C) (MOVE C B G) (MOVE C G B) 8CC Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 25 / 44

Planning Algorithms Naïve Search Breadth-First Search q 1 q 0 q 1,1 q 1,2... q 1,n q 2... q n Is it complete? (always solves/terminates) Is it optimal? (finds best solution) Issues with BFS? Search Queue: q 2,1, q 2,2,..., q 2,m2, q 3,1, q 3,2,..., q 3,m3,..., q n,1, q n,2,..., q n,mn q 1,1,1, q 1,1,2,... Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 26 / 44

Planning Algorithms Heuristic Search A* Search q 0 q 1 q 2... q n Low Cost High Cost Priority Queue q i q j... q l Need: heuristic cost-to-go Is it optimal? Admissible heuristic: Never over-estimate cost A* vs. Djikstra s Algorithm: Djikstra: Exact cost-to-state A*: Exact cost-to-state plus heuristic cost-to-go Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 27 / 44

Planning Algorithms Heuristic Search Greedy Heuristic Search Give up on optimality Greedy Search: Expand best node according to (non-admissible) heuristic Pro: easier / faster non-admissable heuristic Con: No longer optimal Fast Forward (FF): Hoffmann, Jörg, and Bernhard Nebel. The FF planning system: Fast plan generation through heuristic search. Journal of Artificial Intelligence Research (2001). Fast Downward (FD): M. Helmert, The fast downward planning system. Journal of Artificial Intelligence Research (2006). Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 28 / 44

Planning Algorithms Constraint-Based Planning Satisfiability Given: A Boolean formula: Variables P = p 1... p n Formula φ : B n B Find: Is φ(p) satisfiable? P, (φ(p) = 1) What is P? Solution: Davis-Putnam-Logeman-Loveland (DPLL) Backtracking Search Modern DPLL solvers are effective. Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 29 / 44

Planning Algorithms Constraint-Based Planning Planning as Boolean Satisfiability 1. Ground first-order logic domain (PDDL) to propositional logic 2. Encode planning problem as Boolean formula: Unroll for fixed steps, n. One Boolean variable per state/action per step 3. If SAT: return action variable assignments 4. Else: increment n and repeat Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 30 / 44

Planning Algorithms Constraint-Based Planning Example: State Variable Unrolling First-Order Logic Objects: A, B, C Predicate: ontable (?x) Propositional Logic ontable-a ontable-b ontable-c Unrolled For n = 3: ontable-a-0 ontable-b-0 ontable-c-0 ontable-a-1 ontable-b-1 ontable-c-1 ontable-a-2 ontable-b-2 ontable-c-2 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 31 / 44

Planning Algorithms Constraint-Based Planning Example: Action Variable Unrolling First-Order Logic Objects: A, B, C Predicate: pick-up (?x) Propositional Logic pick-up-a pick-up-b pick-up-c Unrolled For n = 3: pick-up-a-0 pick-up-b-0 pick-up-c-0 pick-up-a-1 pick-up-b-1 pick-up-c-1 pick-up-a-2 pick-up-b-2 pick-up-c-2 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 32 / 44

Planning Algorithms Constraint-Based Planning Exercise: Unrolling First-Order Logic Objects: A, B Predicate: on (?x,?y) Action: stack (?x,?y) Grounding Unrolled Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 33 / 44

Planning Algorithms Constraint-Based Planning SATPlan Start and Goal Start: State state holds at step 0 Goal: Goal expression holds at step n Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 34 / 44

Planning Algorithms Constraint-Based Planning Example: Start and Goal PDDL Facts ( d e f i n e ( problem sussman anomaly ) ( : domain b l o c k s ) ( : o b j e c t s a b c ) ( : i n i t ( on c a ) ( o n t a b l e a ) ( o n t a b l e b ) ( c l e a r c ) ( c l e a r b ) ( handempty ) ) ( : g o a l ( and ( on b c ) ( on a b ) ) ) ) Start State on-c-a-0 ontable-a-0 ontable-b-0 clear-c-0 clear-b-0 handempty-0 on-a-a-0 on-a-b-0 on-a-c-0... Goal Unroll for n = 4 on-a-b-4 on-b-c-4 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 35 / 44

Planning Algorithms Constraint-Based Planning Exercise: Start and Goal PDDL Facts ( d e f i n e ( problem sussman anomaly alt ) ( : domain b l o c k s ) ( : o b j e c t s a b c ) ( : i n i t ( o n t a b l e c ) ( o n t a b l e a ) ( on b a ) ( c l e a r c ) ( c l e a r b ) ( handempty ) ) ( : g o a l ( and ( on c b ) ( on b a ) ) ) ) Start State Goal Unroll for n = 4: Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 36 / 44

Planning Algorithms Constraint-Based Planning SATPlan Transition Function Operator Encoding: Selected operator s preconditions and effects must hold: precondition at step k effect at step k+1 {}}{{}}{ o [k] i = pre(o i ) [k] eff(o i ) [k+1] Operator Exclusion: One operator per step: o i [k] = ( o 0 [k] o (i 1) [k] o (i+1) [k] o m [k] ) Frame Axioms: Each proposition p is unchanged unless set by an effect: operators changing p {}}{ ( p [k] = p [k+1]) (o ) [k] [k] j... o l Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 37 / 44

Planning Algorithms Constraint-Based Planning Example: Operator Encoding pick-up-a-0 pick-up-a-0 ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) pick-up-a-0 = ( clear-a-0 ontable-a-0 handempty-0 ontable-a-1 clear-a-1 handempty-1 ) holding-a-1 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 38 / 44

Planning Algorithms Constraint-Based Planning Example: Operator Exclusion pick-up-a-0 ( d e f i n e ( domain b l o c k s ) ( : p r e d i c a t e s ( o n t a b l e? x ) ( c l e a r? x ) ( handempty ) ( h o l d i n g? x ) ) ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) ) o i [k] = ( o 0 [k] o (i 1) [k] o (i+1) [k] o m [k] ) pick-up-a-0 = ( pick-up-b-0 pick-up-c-0 put-down-a-0 put-down-b-0 put-down-c-0) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 39 / 44

Planning Algorithms Constraint-Based Planning Example: Frame Axioms ontable-a-0 ( d e f i n e ( domain b l o c k s ) ( : p r e d i c a t e s ( o n t a b l e? x ) ( c l e a r? x ) ( handempty ) ( h o l d i n g? x ) ) ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) ) ( p [k] = p [k+1]) (o j [k]... o l [k] ) (ontable-a-0 = ontable-a-1) pick-up-a-0 put-down-a-0 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 40 / 44

Planning Algorithms Constraint-Based Planning Exercise: Transition Function (1/3) Operator Encoding for put-down-b-1 put-down-b-1 ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 41 / 44

Planning Algorithms Constraint-Based Planning Exercise: Transition Function (2/3) Operator Exclusion for put-down-b-1 ( d e f i n e ( domain b l o c k s ) ( : p r e d i c a t e s ( o n t a b l e? x ) ( c l e a r? x ) ( handempty ) ( h o l d i n g? x ) ) ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) ) o i [k] = ( o 0 [k] o (i 1) [k] o (i+1) [k] o m [k] ) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 42 / 44

Planning Algorithms Constraint-Based Planning Exercise: Transition Function (3/3) Frame Axioms for holding-b-0 ( d e f i n e ( domain b l o c k s ) ( : p r e d i c a t e s ( o n t a b l e? x ) ( c l e a r? x ) ( handempty ) ( h o l d i n g? x ) ) ( : a c t i o n pick up : parameters (? x ) : p r e c o n d i t i o n ( and ( c l e a r? x ) ( o n t a b l e? x ) ( handempty ) ) : e f f e c t ( and ( not ( o n t a b l e? x ) ) ( not ( c l e a r? x ) ) ( not ( handempty ) ) ( h o l d i n g? x ) ) ) ( : a c t i o n put down : parameters (? x ) : p r e c o n d i t i o n ( h o l d i n g? x ) : e f f e c t ( and ( not ( h o l d i n g? x ) ) ( c l e a r? x ) ( handempty ) ( o n t a b l e? x ) ) ) ) ( p [k] = p [k+1]) (o j [k]... o l [k] ) Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 43 / 44

Planning Algorithms Constraint-Based Planning SATPlan Extensions and Implementations Operator Exclusion: Relax this constraint: o i [k] = ( o 0 [k] o (i 1) [k] o (i+1) [k] o m [k] ) Blackbox: H. Kautz and B. Selman. Unifying SAT-based and graph-based planning. International Joint Conference on Artificial Intelligence 1999. Madagascar: J. Rintanen. Madagascar: Scalable planning with SAT. 8th International Planning Competition. 2014. TMKit: N. Dantam, Z. Kingston, S. Chaudhuri, and L. Kavraki. An Incremental Constraint-Based Framework for Task and Motion Planning. International Journal of Robotics Research. 2018 Dantam (Mines CSCI-561) Application: Planning as Satisfiability (SATPlan) (Pre Lecture) Fall 2018 44 / 44