Principles of AI Planning

Similar documents
Principles of AI Planning

Principles of AI Planning

Principles of AI Planning

Principles of AI Planning

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Foundations of Artificial Intelligence

A brief introduction to Logic. (slides from

Game Theory. 4. Algorithms. Bernhard Nebel and Robert Mattmüller. May 2nd, Albert-Ludwigs-Universität Freiburg

1 Motivation. Game Theory. 2 Linear Programming. Motivation. 4. Algorithms. Bernhard Nebel and Robert Mattmüller May 15th, 2017

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Conjunctive Normal Form and SAT

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

Propositional and Predicate Logic - II

Unified Definition of Heuristics for Classical Planning

Part 1: Propositional Logic

Solutions to Homework I (1.1)

Motivation. Game Theory 24. Mechanism Design. Setting. Preference relations contain no information about by how much one candidate is preferred.

Principles of Knowledge Representation and Reasoning

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

CS156: The Calculus of Computation

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity

Foundations of Artificial Intelligence

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Propositional Resolution

Principles of Knowledge Representation and Reasoning

Deductive Systems. Lecture - 3

2.5.2 Basic CNF/DNF Transformation

Formal Verification Methods 1: Propositional Logic

CS156: The Calculus of Computation Zohar Manna Autumn 2008

Reduced Ordered Binary Decision Diagrams

Logic: First Order Logic

Warm-Up Problem. Is the following true or false? 1/35

Exercises 1 - Solutions

Comp487/587 - Boolean Formulas

Part 1: Propositional Logic

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

B6.1 (Bounded-Cost) Plan Existence

Tecniche di Verifica. Introduction to Propositional Logic

ECE473 Lecture 15: Propositional Logic

Lecture 2 Propositional Logic & SAT

Planning and Optimization

Lecture 9: The Splitting Method for SAT

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

Solutions to Sample Problems for Midterm

Conjunctive Normal Form and SAT

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

(Yet another) decision procedure for Equality Logic

Conjunctive Normal Form and SAT

Tautologies, Contradictions, and Contingencies

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Propositional logic II.

Logic: Propositional Logic (Part I)

Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.4 Prenex normal form. Skolemization. Clausal form.

Normal Forms of Propositional Logic

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

LOGIC PROPOSITIONAL REASONING

Propositional logic. Programming and Modal Logic

Introduction to Model Theory

AMTH140 Lecture 8. Symbolic Logic

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

Substitution Theorem. Equivalences. Proposition 2.8 The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ Idempotency

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Supplementary exercises in propositional logic

Mathematical Logic Propositional Logic - Tableaux*

Propositional and Predicate Logic - V

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Summer 2012

Propositional and First Order Reasoning

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

NP and Computational Intractability

Theory of Computer Science. Theory of Computer Science. E5.1 Routing Problems. E5.2 Packing Problems. E5.3 Conclusion.

Lecture 7: Logic and Planning

Expressive Equivalence of Formalisms for Planning with Sensing

SAT, NP, NP-Completeness

Strengthening Landmark Heuristics via Hitting Sets

CS 486: Lecture 2, Thursday, Jan 22, 2009

Language of Propositional Logic

02 Propositional Logic

Deterministic planning

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Algebraic Dynamic Programming. Solving Satisfiability with ADP

Planning Graphs and Knowledge Compilation

Introduction to Intelligent Systems

Introduction to Intelligent Systems

6. Logical Inference

Try to find a good excuse!

Advanced Topics in LP and FP

Bernhard Nebel, Julien Hué, and Stefan Wölfl. June 27 & July 2/4, 2012

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

A Collection of Problems in Propositional Logic

Propositional logic. Programming and Modal Logic

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

Propositional Resolution Introduction

Decision Procedures for Satisfiability and Validity in Propositional Logic

AAA615: Formal Methods. Lecture 2 First-Order Logic

Introduction to Artificial Intelligence. Logical Agents

Logic. (Propositional Logic)

Transcription:

Principles of AI Planning 4. Normal forms Albert-Ludwigs-Universität Freiburg Bernhard Nebel and Robert Mattmüller October 31st, 2012

Similarly to s in propositional logic (DNF, CNF, NNF,... ) we can define s for effects, operators and planning tasks. This is useful because s (and proofs) then only need to deal with effects (resp. operators or tasks) in. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 2 / 24

Equivalences Definition October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 3 / 24

Equivalence of operators and effects Definition (equivalent effects) Two effects e and e over state variables A are equivalent, written e e, if for all states s over A, [e] s = [e ] s. Definition (equivalent operators) Two operators o and o over state variables A are equivalent, written o o, if they are applicable in the same states, and for all states s where they are applicable, app o (s) = app o (s). Equivalences Definition Theorem Let o = χ,e and o = χ,e be operators with χ χ and e e. Then o o. Note: The converse is not true. (Why not?) October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 5 / 24

Equivalence transformations for effects e 1 e 2 e 2 e 1 (1) (e 1 e 2 ) e 3 e 1 (e 2 e 3 ) (2) e e (3) χ e χ e if χ χ (4) e e (5) e (6) χ 1 (χ 2 e) (χ 1 χ 2 ) e (7) χ (e 1 e n ) (χ e 1 ) (χ e n ) (8) (χ 1 e) (χ 2 e) (χ 1 χ 2 ) e (9) Equivalences Definition October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 6 / 24

Normal form for effects We can define a for effects: Nesting of conditionals, as in a (b c), can be eliminated. s e within a conditional effect ϕ e can be restricted to atomic effects (a or a). Transformation to this effect only gives a small polynomial size increase. Compare: transformation to CNF or DNF may increase formula size exponentially. Equivalences Definition October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 7 / 24

Normal form for operators and effects Definition An operator χ,e is in effect (ENF) if for all occurrences of χ e in e the effect e is either a or a for some a A, and there is at most one occurrence of any atomic effect in e. Theorem For every operator there is an equivalent one in effect. Equivalences Definition Proof is constructive: we can transform any operator into effect using the equivalence transformations for effects. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 8 / 24

example (a (b (c ( d e)))) ( b e) transformed to effect is Equivalences Definition (a b) ((a c) d) (( b (a c)) e) October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 9 / 24

October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 10 / 24

: Freecell (good and bad effects) If we move a card c to a free tableau position, the good effect is that the card formerly below c is now available. The bad effect is that we lose one free tableau position. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 12 / 24

What is a good or bad effect? Question: Which operator effects are good, and which are bad? Difficult to answer in general, because it depends on context: Locking the entrance door is good if we want to keep burglars out. Locking the entrance door is bad if we want to enter. We will now consider a reformulation of planning tasks that makes the distinction between good and bad effects obvious. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 13 / 24

Definition (operators in positive ) An operator o = χ,e is in positive if it is in effect, no negation symbols appear in χ, and no negation symbols appear in any effect condition in e. Definition (planning tasks in positive ) A planning task A,I,O,γ is in positive if all operators in O are in positive and no negation symbols occur in the goal γ. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 14 / 24

: existence Theorem (positive ) Every planning task Π has an equivalent planning task Π in positive. Moreover, Π can be computed from Π in polynomial time. Note: Equivalence here means that the represented transition systems of Π and Π, limited to the states that can be reached from the initial state, are isomorphic. We prove the theorem by describing a suitable. (However, we do not prove its correctness or complexity.) October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 15 / 24

: Transformation of A,I,O,γ to positive Convert all operators o O to effect. Convert all conditions to negation (NNF). while any condition contains a negative literal a: Let a be a variable which occurs negatively in a condition. A := A {â} for some new state variable â I(â) := 1 I(a) Replace the effect a by (a â) in all operators o O. Replace the effect a by ( a â) in all operators o O. Replace a by â in all conditions. Convert all operators o O to effect (again). Here, all conditions refers to all operator preconditions, operator effect conditions and the goal. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 16 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked, bike bike-locked, bike-locked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked, bike bike-locked, bike-locked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike Identify state variable a occurring negatively in conditions. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked, bike bike-locked, bike-locked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike Introduce new variable â with complementary initial value. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked, bike bike-locked, bike-locked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike Identify effects on variable a. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked bike-unlocked, bike bike-locked, bike-locked bike-unlocked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike Introduce complementary effects for â. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-locked, home uni, bike bike-locked, bike-locked bike-unlocked, bike bike-locked, bike-locked bike-unlocked, uni, lecture ((bike bike-locked) bike) } γ = lecture bike Identify negative conditions for a. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-unlocked, home uni, bike bike-locked, bike-locked bike-unlocked, bike bike-unlocked, bike-locked bike-unlocked, uni, lecture ((bike bike-unlocked) bike) } γ = lecture bike Replace by positive condition â. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

: example (transformation to positive ) A = {home, uni, lecture, bike, bike-locked, bike-unlocked} I = {home 1,bike 1,bike-locked 1, uni 0,lecture 0,bike-unlocked 0} O = { home bike bike-unlocked, home uni, bike bike-locked, bike-locked bike-unlocked, bike bike-unlocked, bike-locked bike-unlocked, uni, lecture ((bike bike-unlocked) bike) } γ = lecture bike October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 17 / 24

Why positive is interesting In positive, good and bad effects are easy to distinguish: s that make state variables true are good (add effects). s that make state variables false are bad (delete effects). This is of high relevance for some planning techniques that we will see later in this course. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 18 / 24

operators Definition Properties October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 19 / 24

operators Definition An operator χ,e is a operator if χ is a conjunction of atoms, and e is a conjunction of atomic effects. Hence every operator is of the form a 1 a n, l 1 l m Definition Properties where a i are atoms and l j are atomic effects. Note: Sometimes we allow conjunctions of literals as preconditions. We denote this as with negative preconditions. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 21 / 24

Why is interesting operators are particularly simple, yet expressive enough to capture general planning problems. In particular, planning is no easier than general planning problems. Most s in the planning literature are only presented for operators (generalization is often, but not always, obvious). Definition Properties STanford Research Institute Planning System (Fikes & Nilsson, 1971) October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 22 / 24

Transformation to Not every operator is equivalent to a operator. However, each operator can be transformed into a set of operators whose combination is equivalent to the original operator. (How?) However, this transformation may exponentially increase the number of required operators. There are planning tasks for which such a blow-up is unavoidable. There are polynomial transformations of planning tasks to, but these do not preserve the structure of the transition system (e. g., length of shortest plans may change). Definition Properties October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 23 / 24

simplifies structure of operator effects: conditional effects contain only atomic effects; there is at most one occurrence of any atomic effect. allows to distinguish good and bad effects. The form of operators is even more restrictive than effect, forbidding complex preconditions and conditional effects. All three forms are expressive enough to capture general planning problems. Transformation to effect and positive possible with polynomial size increase. Structure preserving transformations of planning tasks to can increase the number of operators exponentially. October 31st, 2012 B. Nebel, R. Mattmüller AI Planning 24 / 24