• Keine Ergebnisse gefunden

B3. General Regression

N/A
N/A
Protected

Academic year: 2022

Aktie "B3. General Regression"

Copied!
7
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Planning and Optimization

B3. General Regression

Gabriele R¨ oger and Thomas Keller

Universit¨ at Basel

October 10, 2018

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 1 / 28

Planning and Optimization

October 10, 2018 — B3. General Regression

B3.1 Regressing State Variables

B3.2 Regressing Formulas Through Effects B3.3 Regressing Formulas Through Operators B3.4 Summary

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 2 / 28

Content of this Course

Planning

Classical

Tasks Progression/

Regression Complexity Heuristics

Probabilistic

MDPs Uninformed Search

Heuristic Search Monte-Carlo

Methods

Regression for General Planning Tasks

I With disjunctions and conditional effects, things become more tricky. How to regress a ∨ (b ∧ c) with respect to hq, d B bi?

I In this chapter, we show how to regress general sets of states through general operators.

I We extensively use the idea of representing sets of states

as formulas.

(2)

B3. General Regression Regressing State Variables

B3.1 Regressing State Variables

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 5 / 28

B3. General Regression Regressing State Variables

Regressing State Variables: Motivation

Key question for general regression:

I Assume we are applying an operator with effect e.

I What must be true in the predecessor state

for state variable v to be true in the successor state?

If we can answer this question, a general definition of regression is only a small additional step.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 6 / 28

B3. General Regression Regressing State Variables

Regressing State Variables: Key Idea

Assume we are in state s and apply effect e to obtain successor state s 0 .

State variable v is true in s 0 if

I effect e makes it true, or

I it remains true, i.e., it is true in s and not made false by e.

B3. General Regression Regressing State Variables

Regressing a State Variable Through an Effect

Definition (Regressing a State Variable Through an Effect) Let e be an effect of a propositional planning task,

and let v be a state variable.

The regression of v through e, written regr(v , e), is defined as the following logical formula:

regr(v , e) = effcond(v , e ) ∨ (v ∧ ¬effcond(¬v , e )).

Question: Does this capture add-after-delete semantics correctly?

(3)

B3. General Regression Regressing State Variables

Regressing State Variables: Example

Example

Let e = (b B a) ∧ (c B ¬a) ∧ b ∧ ¬d . v regr(v , e) a b ∨ (a ∧ ¬c) b > ∨ (b ∧ ¬⊥) ≡ >

c ⊥ ∨ (c ∧ ¬⊥) ≡ c d ⊥ ∨ (d ∧ ¬>) ≡ ⊥

Reminder: regr(v , e) = effcond(v , e) ∨ (v ∧ ¬effcond(¬v , e))

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 9 / 28

B3. General Regression Regressing State Variables

Regressing State Variables: Correctness (1)

Lemma (Correctness of regr(v , e ))

In a propositional planning task, let s be a state, e be an effect and v be a state variable.

Then s | = regr(v , e) iff s J e K | = v .

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 10 / 28

B3. General Regression Regressing State Variables

Regressing State Variables: Correctness (2)

Proof.

(⇒): We know s | = regr(v , e), and hence s | = effcond(v , e) ∨ (v ∧ ¬effcond(¬v , e)).

Do a case analysis on the two disjuncts.

Case 1: s | = effcond(v , e ).

Then s J e K | = v by the first case in the definition of s J e K . Case 2: s | = (v ∧ ¬effcond(¬v , e)).

Then s | = v and s 6| = effcond(¬v , e ).

We may additionally assume s 6| = effcond(v , e ) because otherwise we can apply Case 1 of this proof.

Then s J e K | = v by the third case in the definition of s J e K . . . .

B3. General Regression Regressing State Variables

Regressing State Variables: Correctness (3)

Proof (continued).

(⇐): Proof by contraposition.

We show that if regr(v , e) is false in s , then v is false in s J e K .

I By prerequisite, s 6| = effcond(v , e ) ∨ (v ∧ ¬effcond(¬v , e )).

I Hence s | = ¬effcond(v , e) ∧ (¬v ∨ effcond(¬v , e )).

I From the first conjunct, we get s | = ¬effcond(v , e) and hence s 6| = effcond(v , e).

I From the second conjunct, we get s | = ¬v ∨ effcond(¬v , e).

I Case 1: s | = ¬v . Then v is false before applying e and remains false, so s J e K 6| = v .

I Case 2: s | = effcond(¬v , e). Then v is deleted by e

and not simultaneously added, so s J e K 6| = v .

(4)

B3. General Regression Regressing Formulas Through Effects

B3.2 Regressing Formulas Through Effects

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 13 / 28

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Idea

I We can now generalize regression from state variables to general formulas over state variables.

I The basic idea is to replace every occurrence of every state variable v by regr(v , e) as defined in the previous section.

I The following definition makes this more formal.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 14 / 28

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Definition

Definition (Regressing a Formula Through an Effect) In a propositional planning task, let e be an effect, and let ϕ be a formula over state variables.

The regression of ϕ through e, written regr(ϕ, e ), is defined as the following logical formula:

regr(>, e ) = >

regr(⊥, e ) = ⊥

regr(v , e ) = effcond(v , e) ∨ (v ∧ ¬effcond(¬v , e )) regr(¬ψ, e ) = ¬regr(ψ, e )

regr(ψ ∨ χ, e ) = regr(ψ, e) ∨ regr(χ, e ) regr(ψ ∧ χ, e ) = regr(ψ, e) ∧ regr(χ, e ).

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Example

Example

Let e = (b B a) ∧ (c B ¬a) ∧ b ∧ ¬d . Recall:

I regr(a, e) ≡ b ∨ (a ∧ ¬c )

I regr(b, e) ≡ >

I regr(c, e) ≡ c

I regr(d , e) ≡ ⊥ We get:

regr((a ∨ d ) ∧ (c ∨ d ), e) ≡ ((b ∨ (a ∧ ¬c )) ∨ ⊥) ∧ (c ∨ ⊥)

≡ (b ∨ (a ∧ ¬c )) ∧ c

≡ b ∧ c

(5)

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Correctness (1)

Lemma (Correctness of regr(ϕ, e ))

Let ϕ be a logical formula, e an effect and s a state.

Then s | = regr(ϕ, e) iff s J e K | = ϕ.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 17 / 28

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Correctness (2)

Proof.

The proof is by structural induction on ϕ.

Induction hypothesis: s | = regr(ψ, e ) iff s J e K | = ψ for all proper subformulas ψ of ϕ.

Base case ϕ = >:

We have regr(>, e) = >, and s | = > iff s J e K | = > is correct.

Base case ϕ = ⊥:

We have regr(⊥, e) = ⊥, and s | = ⊥ iff s J e K | = ⊥ is correct.

Base case ϕ = v :

We have s | = regr(v , e ) iff s J e K | = v from the previous lemma. . . .

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 18 / 28

B3. General Regression Regressing Formulas Through Effects

Regressing Formulas Through Effects: Correctness (3)

Proof (continued).

Inductive case ϕ = ¬ψ:

s | = regr(¬ψ, e ) iff s | = ¬regr(ψ, e) iff s 6| = regr(ψ, e) iff s J e K 6| = ψ iff s J e K | = ¬ψ Inductive case ϕ = ψ ∨ χ:

s | = regr(ψ ∨ χ, e) iff s | = regr(ψ, e ) ∨ regr(χ, e) iff s | = regr(ψ, e ) or s | = regr(χ, e) iff s J e K | = ψ or s J e K | = χ

iff s J e K | = ψ ∨ χ Inductive case ϕ = ψ ∧ χ:

Like previous case, replacing “∨” by “∧”

and replacing “or” by “and”.

B3. General Regression Regressing Formulas Through Operators

B3.3 Regressing Formulas Through

Operators

(6)

B3. General Regression Regressing Formulas Through Operators

Regressing Formulas Through Operators: Idea

I We can now regress arbitrary formulas through arbitrary effects.

I 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 ϕ.

I There are two requirements:

I

The operator o must be applicable in the state s.

I

The resulting state s J o K must satisfy ϕ.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 21 / 28

B3. General Regression Regressing Formulas Through Operators

Regressing Formulas Through Operators: Definition

Definition (Regressing a Formula Through an Operator) In a propositional planning task, let o be an operator, and let ϕ be a formula over state variables.

The regression of ϕ through o, written regr(ϕ, o), is defined as the following logical formula:

regr(ϕ, o) = pre(o) ∧ regr(ϕ, eff(o)).

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 22 / 28

B3. General Regression Regressing Formulas Through Operators

Regressing Formulas Through Operators: Correctness (1)

Theorem (Correctness of regr(ϕ, o))

Let ϕ be a logical formula, o an operator and s a state.

Then s | = regr(ϕ, o) iff o is applicable in s and s J o K | = ϕ.

B3. General Regression Regressing Formulas Through Operators

Regressing Formulas Through Operators: Correctness (2)

Reminder: regr(ϕ, o) = pre(o) ∧ regr(ϕ, eff(o)) Proof.

Case 1: s | = pre(o ).

Then o is applicable in s and the statement we must prove simplifies to: s | = regr(ϕ, eff(o)) iff s J e K | = ϕ.

This was proved in the previous lemma.

Case 2: s 6| = pre(o ).

Then s 6| = regr(ϕ, o) and o is not applicable in s.

Hence both statements are false and therefore equivalent.

(7)

B3. General Regression Regressing Formulas Through Operators

Regression Examples (1)

Examples: compute regression and simplify to DNF

I regr(b, ha, bi)

≡ a ∧ (> ∨ (b ∧ ¬⊥))

≡ a

I regr(b ∧ c ∧ d , ha, bi)

≡ a ∧ (> ∨ (b ∧ ¬⊥)) ∧ (⊥ ∨ (c ∧ ¬⊥)) ∧ (⊥ ∨ (d ∧ ¬⊥))

≡ a ∧ c ∧ d

I regr(b ∧ ¬c , ha, b ∧ c i)

≡ a ∧ (> ∨ (b ∧ ¬⊥)) ∧ ¬(> ∨ (c ∧ ¬⊥))

≡ a ∧ > ∧ ⊥

≡ ⊥

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 25 / 28

B3. General Regression Regressing Formulas Through Operators

Regression Examples (2)

Examples: compute regression and simplify to DNF

I regr(b, ha, c B bi)

≡ a ∧ (c ∨ (b ∧ ¬⊥))

≡ a ∧ (c ∨ b)

≡ (a ∧ c) ∨ (a ∧ b)

I regr(b, ha, (c B b) ∧ ((d ∧ ¬c ) B ¬b)i)

≡ a ∧ (c ∨ (b ∧ ¬(d ∧ ¬c )))

≡ a ∧ (c ∨ (b ∧ (¬d ∨ c )))

≡ a ∧ (c ∨ (b ∧ ¬d ) ∨ (b ∧ c ))

≡ a ∧ (c ∨ (b ∧ ¬d ))

≡ (a ∧ c) ∨ (a ∧ b ∧ ¬d )

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization October 10, 2018 26 / 28

B3. General Regression Summary

B3.4 Summary

B3. General Regression Summary

Summary

I Regressing a state variable through an (arbitrary) operator must consider two cases:

I

state variables made true (by add effects)

I

state variables remaining true (by absence of delete effects)

I Regression of state variables can be generalized to arbitrary formulas ϕ by replacing each occurrence of a state variable in ϕ by its regression.

I Regressing a formula ϕ through an operator involves

regressing ϕ through the effect and enforcing the precondition.

Referenzen

ÄHNLICHE DOKUMENTE

In Abschnitt 5 der heutigen Vorlesung formulierten wir den Satz ¨uber die Unabh ¨angigkeit von Zv’en mit Dichten. X

Let ϕ(S, R, x) be a first-order formula over the signature ¯ τ ∪ {R, S} such that R and S occur only positively (i.e. in the scope of an even number of negations) in ϕ and such that

[r]

Wenn gefragt wird, ob man eine nominale Ausgangs-Variable ins Modell einbeziehen soll oder nicht, muss man f¨ur den ganzen Block der entsprechenden Indikator-Variablen pr¨ufen, ob

Fachbereich Mathematik und Informatik Wintersemester 2007/08 Universit¨ at

[r]

[r]

Auf diesem Projektzettel werden wesentlich selbstadjungierte Fortsetzungen des Laplace- Operators untersucht.