• Keine Ergebnisse gefunden

Planning and Optimization A5. Equivalent Operators and Normal Forms for Effects Gabriele R¨oger and Thomas Keller

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization A5. Equivalent Operators and Normal Forms for Effects Gabriele R¨oger and Thomas Keller"

Copied!
22
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

A5. Equivalent Operators and Normal Forms for Effects

Gabriele R¨oger and Thomas Keller

Universit¨at Basel

October 3, 2018

(2)

Content of this Course

Planning

Classical

Tasks Progression/

Regression Complexity Heuristics

Probabilistic

MDPs Uninformed Search

Heuristic Search Monte-Carlo

Methods

(3)

Reminder & Motivation

(4)

Syntax of Effects

Definition (Effect)

Effectsover state variablesV are inductively defined as follows:

Ifv ∈V is a state variable, thenv and ¬v are effects (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 logical formula and e is an effect, then (χBe)is an effect (conditional effect).

Arbitrary nesting of conjunctive and conditional effects

(5)

Semantics of Effects

effcond(`,e): condition that must be true in the current state for the effect e to lead to the atomic effect`

add-after-delete semantics: if operator o with effecte is applicable in state s, the successor state sJoKis defined as:

sJoK(v) =





T ifs |=effcond(v,e)

F ifs |=effcond(¬v,e)∧ ¬effcond(v,e) s(v) ifs 6|=effcond(v,e)∨effcond(¬v,e) New notation

If we do not want to consider a precondition, we also writesJeKforsJh>,eiK.

For a sequenceπ=ho1, . . . ,oniof operators that are consecutively applicable ins, we writesJπKforsJo1KJo2K. . .JonK.

(6)

Semantics of Effects

effcond(`,e): condition that must be true in the current state for the effect e to lead to the atomic effect`

add-after-delete semantics: if operator o with effecte is applicable in state s, the successor state sJoKis defined as:

sJoK(v) =





T ifs |=effcond(v,e)

F ifs |=effcond(¬v,e)∧ ¬effcond(v,e) s(v) ifs 6|=effcond(v,e)∨effcond(¬v,e) New notation

If we do not want to consider a precondition, we also writesJeKforsJh>,eiK.

For a sequenceπ=ho1, . . . ,oniof operators that are consecutively applicable ins, we writesJπKforsJo1KJo2K. . .JonK.

(7)

Motivation

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

and propositional planning tasks.

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

(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.

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 Effects

(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?

It would be nicer ifeffcond(¬v,e) were always the condition under which e makesv false (but because of add-after-delete, it is not).

introduce a normal form where the “complicated case”

of add-after-delete semantics never arises

(14)

Conflict-Free Effects

Definition (Conflict-Free)

Aneffect e is called conflict-freeif effcond(v,e)∧effcond(¬v,e) is unsatisfiable for all state variablesv.

Anoperator o is calledconflict-free if eff(o) is conflict-free.

(15)

Testing if Effects are Conflict-Free

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

However, we do not usually need such a test. Instead, we can producean equivalent conflict-free effect in polynomial time.

Algorithm: given effecte, replace each atomic effect of the form ¬v by (¬effcond(v,e)B¬v).

The resulting effect e0 is conflict-free ande ≡e0. (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 will often write (>B`) as `, i.e., omit trivial effect conditions. We will still consider such effects to be in normal form.

(20)

Producing Flat Effects

Theorem

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

Proof Sketch.

Every effecte over variables V is equivalent to V

v∈V(effcond(v,e)Bv)∧V

v∈V(effcond(¬v,e)B¬v), which is a flat effect.

For conflict-free and flat, useeffcond(¬v,e)∧ ¬effcond(v,e) instead ofeffcond(¬v,e).

In both cases, conjuncts of the form (χB`) whereχ≡ ⊥ can be omitted to simplify the effect.

(21)

Summary

(22)

Summary

Effect equivalences can be used to simplify operator effects.

In conflict-free effects, the “complicated case” in the add-after-delete semantics of operators does not arise.

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

conjunctive effects, and all atomic effects must be distinct.

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

Every effect can be transformedinto an equivalent flat and conflict-freeeffect in polynomial time.

Referenzen

ÄHNLICHE DOKUMENTE

PDDL: Planning Domain Definition Language PDDL is the standard language used in practice to describe planning tasks. descriptions in (restricted) predicate logic instead

intuition: the closer h is to true cost to goal, the more efficient the search using h.. Heuristics A ∗ Search

For this purpose, we will use propositional logic, which allows expressing information about 2 n states as logical formulas over n state variables... Reminder:

The last missing piece is a definition of regression through operators, describing exactly in which states s applying a given operator o leads to a state satisfying a given formula

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

Planning tasks in positive normal form without delete effects are called relaxed planning tasks. Plans for relaxed planning tasks are called

Coming up with good abstractions automatically is the main research challenge when applying abstraction heuristics

Formally, pattern database heuristics are abstraction heuristics induced by a particular class of abstractions called projections.