• Keine Ergebnisse gefunden

Planning and Optimization A5. Equivalent Operators and Normal Forms Malte Helmert and Thomas Keller

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization A5. Equivalent Operators and Normal Forms Malte Helmert and Thomas Keller"

Copied!
23
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

A5. Equivalent Operators and Normal Forms

Malte Helmert and Thomas Keller

Universit¨at Basel

September 25, 2019

(2)

Content of this Course

Planning

Classical

Foundations Logic Heuristics Constraints

Probabilistic

Explicit MDPs Factored MDPs

(3)

Reminder & Motivation

(4)

Reminder: Syntax of Effects

Definition (Effect)

Effectsover state variablesV are inductively defined as follows:

Ifv ∈V is a propositional state variable, then v and¬v are effects (atomic effect).

Ifv ∈V is a finite-domain state variable andd ∈dom(v), then v :=d is an effect (atomic effect).

Ife1, . . . ,en are effects, then (e1∧ · · · ∧en) is an effect (conjunctive effect).

The special case withn = 0 is theempty effect >.

Ifχ is a formula overV ande is an effect, then (χBe)is an effect (conditional effect).

Arbitrary nesting of conjunctive and conditional effects!

Can we make our life easier?

(5)

Reminder: Semantics of Effects

effcond(e,e0): condition that must be true in the current state for the effect e0 to trigger the atomic effecte add-after-delete semantics (propositional tasks):

if an operator with effect e is applied in state s

and we have boths |=effcond(v,e) ands |=effcond(¬v,e), then s0(v) =T in the resulting states0.

consistency semantics(finite-domain tasks):

applying an operator with effecte in a state s where both s |=effcond(v :=d,e) ands |=effcond(v :=d0,e) for values d 6=d0 is forbidden

tested via theconsistency condition consist(e) These are very subtle details!

Can we make our life easier?

(6)

Motivation

Similarly to normal forms in propositional logic (DNF, CNF, NNF), we can definenormal forms for effects, operators

and planning tasks.

Among other things, we consider normal forms that avoid complicated nesting and subtleties of conflicts.

This is useful because algorithms (and proofs) then only need to deal with effects, operators and tasks in normal form.

(7)

Notation: Applying Effects and Operator Sequences

Existing notation:

We already writesJoKfor the resulting state after applying operator o in states.

New extended notation:

If we want to consider an effect e without a precondition, we write sJeKforsJh>,eiK.

For a sequenceπ =ho1, . . . ,oni of operators that are consecutively applicable in s, we write sJπKfor sJo1KJo2K. . .JonK.

(8)

Equivalence Transformations

(9)

Equivalence of Operators and Effects: Definition

Definition (Equivalent Effects)

Two effectse ande0 over state variables V areequivalent, writtene ≡e0, ifsJeK=sJe0Kfor all states s.

For consistency semantics, this includes the requirement thatsJeKis defined iffsJe0Kis.

Definition (Equivalent Operators)

Two operatorso ando0 over state variablesV are equivalent, writteno ≡o0, ifcost(o) =cost(o0) and for all statess,s0 overV, o induces the transitions −→o s0 iff o0 induces the transition s o

0

−→s0.

(10)

Equivalence of Operators and Effects: Theorem

Theorem

Let o and o0 be operators with pre(o)≡pre(o0), eff(o)≡eff(o0) and cost(o) =cost(o0). Then o≡o0.

Note: The converse is not true. (Why not?)

(11)

Equivalence Transformations for Effects

e1e2 e2e1 (1)

(e1∧ · · · ∧en)(e10 ∧ · · · ∧em0) e1∧ · · · ∧ene10 ∧ · · · ∧em0 (2)

> ∧e e (3)

χBe χ0 Be ifχχ0 (4)

>Be e (5)

Be ≡ > (6)

χ1B2Be) 1χ2)Be (7) χB(e1∧ · · · ∧en) Be1)∧ · · · ∧Ben) (8) 1Be)2Be) 1χ2)Be (9)

(12)

Conflict-Free Operators

(13)

Conflict-Freeness: Motivation

The add-after-delete semantics makes effects like (aBc)∧(bB¬c) somewhat unintuitive to interpret.

What happens in states where a∧b is true?

Similarly, it may be unintuitive that an effect like (u= aBw:= a)∧(v= bBw:= b)

introduces an applicability condition “through the back door”

It would be nicer if

effcond(e,e0) always were the condition

under which the atomic effecteactually materializes (because of add-after-delete, it is not)

pre(o) always fully described the applicability ofo (because of the consistency condition, is does not)

introduce normal form where “complicated cases” never arise

(14)

Reminder & Motivation Equivalence Transformations Conflict-Free Operators Flat Effects Summary

Conflict-Free Effects and Operators

Definition (Conflict-Free)

Aneffect e overpropositional state variablesV is calledconflict-free ifeffcond(v,e)∧effcond(¬v,e) is unsatisfiable for allv ∈V.

Aneffect e overfinite-domainstate variablesV

is calledconflict-free ifeffcond(v :=d,e)∧effcond(v :=d0,e) is unsatisfiable for allv ∈V andd,d0 ∈dom(v) with d 6=d0. Anoperator o is calledconflict-free if eff(o) is conflict-free.

Note: This fixes both of our issues.

In particular, observe thatconsist(o)≡ > for conflict-freeo.

(15)

Making Operators Conflict-Free

In general, testing whether an operator is conflict-free is a coNP-complete problem. (Why?)

However, we do not necessarily need such a test.

Instead, we can producean equivalent conflict-free operator in polynomial time.

Algorithm: given operatoro,

replace all atomic effects¬v by (¬effcond(v,eff(o))B¬v) replace all atomic effectsv:=d by (consist(o)Bv:=d) replacepre(o) withpre(o)consist(o) in the FDR case The resulting operatoro0 is conflict-free and o ≡o0. (Why?)

(16)

Flat Effects

(17)

Flat Effects: Motivation

CNF and DNF limit the nesting of connectives in propositional logic.

For example, a CNF formula is

a conjunction of 0 or more subformulas,

each of which is a disjunction of 0 or more subformulas, each of which is a literal.

Similarly, we can define a normal form that limits the nesting of effects.

This is useful because we then do not have to consider arbitrarily structured effects, e.g., when representing them in a planning algorithm.

(18)

Flat Effect

Definition (Flat Effect) An effecte is flatif it is:

a conjunctive effect

whose conjuncts are conditional effects whose subeffects are atomic effects, and no atomic effect occurs ine multiple times.

An operatoro isflatif eff(o) is flat.

Note: non-conjunctive effects can be considered as conjunctive effects with 1 conjunct

(19)

Flat Effect: Example

Example

Consider the effect

c∧(aB(¬b∧(c B(b∧ ¬d∧ ¬a))))∧(¬bB¬a) An equivalent flat (and conflict-free) effect is

(>Bc)∧ ((a∧ ¬c)B¬b)∧

((a∧c)Bb)∧ ((a∧c)B¬d)∧ ((¬b∨(a∧c))B¬a)

Note: for simplicity, we often write(>Be)as e, i.e., omit trivial effect conditions. We still consider such effects to be flat.

(20)

Producing Flat Operators

Theorem

For every operator, an equivalent flat operator and an equivalent flat, conflict-free operator can be computed in polynomial time.

(21)

Producing Flat Operators: Proof

Proof Sketch.

LetE be the set of atomic effects over variables V. Every effecte0 over variables V is equivalent to V

e∈E(effcond(e,e0)Be), which is a flat effect.

(Conjuncts of the form (χBe) where χ≡ ⊥ can be omitted to simplify the effect.)

To compute a flat operator equivalent to operatoro, replaceeff(o) by an equivalent flat effect.

To compute an equivalent conflict-free and flat operator, first compute a conflict-free operatoro0 equivalent too, then replaceeff(o0) by an equivalent flat effect.

(Why not do these in the opposite order?)

(22)

Summary

(23)

Summary

Equivalences can be used to simplify operators and effects.

In conflict-free operators, the “complicated case”

of operator semantics does not arise.

For flatoperators, the only permitted nesting is atomic effects within conditional effects within

conjunctive effects, and all atomic effects must be distinct.

For flat, conflict-free operators, it is easy to determine thecondition under which a givenliteral is made true by applying the operator in a given state.

Every operator can be transformedinto an equivalent flat and conflict-freeone inpolynomial time.

Referenzen

ÄHNLICHE DOKUMENTE

Adding more constraints can only remove feasible solutions Fewer feasible solutions can only increase objective value Higher objective value means better informed heuristic Are

in terms of different state variables (Boolean or finite domain) individual state variables induce atomic propositions.. a state is a valuation of state variables n Boolean

A propositional planning task is in positive normal form if it is positive and all operator effects are flat.... Positive Normal

If we have ¬v in G for some group G in the cover, we can reformulate the task to use an “opposite” variable ˆ v instead, as in the conversion to positive normal form (Chapter

decision problem analogue of satisficing planning Definition (Bounded-Cost Plan Existence). Bounded-cost plan existence ( BCPlanEx ) is the following

FF (Hoffmann & Nebel, 2001) problem class: satisficing algorithm class: explicit search search direction: forward search. search algorithm: enforced hill-climbing heuristic:

forward search from initial state to goal based on progression backward search from goal to initial state based on regression bidirectional search.. In this chapter we look

Propositional planning tasks compactly represent transition systems and are suitable as inputs for planning algorithms. They are based on concepts from propositional logic, enhanced