Gabriele R¨oger and Thomas Keller
Universit¨at Basel
October 10, 2018
Planning
Classical
Tasks Progression/
Regression Complexity Heuristics
Probabilistic
MDPs Uninformed Search
Heuristic Search Monte-Carlo
Methods
With disjunctions and conditional effects, things become more tricky. How to regressa∨(b∧c) with respect tohq,d Bbi?
In this chapter, we show how to regressgeneral sets of states through general operators.
We extensively use the idea of representing sets of states as formulas.
Regressing State Variables
Key question for general regression:
Assume we are applying an operator with effecte. 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.
Assume we are in states and apply effecte to obtain successor states0.
State variablev is true ins0 if effect e makes it true, or
it remains true, i.e., it is true ins and not made false bye.
Definition (Regressing a State Variable Through an Effect) Lete be an effect of a propositional planning task,
and letv be a state variable.
Theregression ofv throughe, writtenregr(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?
Example
Lete = (bBa)∧(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))
Lemma (Correctness ofregr(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 sJeK|=v .
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).
ThensJeK|=v by the first case in the definition ofsJeK. Case 2: s |= (v∧ ¬effcond(¬v,e)).
Thens |=v ands 6|=effcond(¬v,e).
We may additionally assumes 6|=effcond(v,e) because otherwise we can apply Case 1 of this proof.
ThensJeK|=v by the third case in the definition ofsJeK. . . .
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).
ThensJeK|=v by the first case in the definition ofsJeK. Case 2: s |= (v∧ ¬effcond(¬v,e)).
Thens |=v ands 6|=effcond(¬v,e).
We may additionally assumes 6|=effcond(v,e) because otherwise we can apply Case 1 of this proof.
ThensJeK|=v by the third case in the definition ofsJeK. . . .
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).
ThensJeK|=v by the first case in the definition ofsJeK. Case 2: s |= (v∧ ¬effcond(¬v,e)).
Thens |=v ands 6|=effcond(¬v,e).
We may additionally assumes 6|=effcond(v,e) because otherwise we can apply Case 1 of this proof.
ThensJeK|=v by the third case in the definition ofsJeK. . . .
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Proof (continued).
(⇐): Proof by contraposition.
We show that ifregr(v,e) is falsein s, thenv is false insJeK. By prerequisite, s 6|=effcond(v,e)∨(v∧ ¬effcond(¬v,e)).
Hence s |=¬effcond(v,e)∧(¬v∨effcond(¬v,e)).
From the first conjunct, we get s |=¬effcond(v,e) and hence s 6|=effcond(v,e).
From the second conjunct, we gets |=¬v∨effcond(¬v,e).
Case 1: s |=¬v. Then v is false before applying e and remains false, so sJeK6|=v.
Case 2: s |=effcond(¬v,e). Then v is deleted by e and not simultaneously added, so sJeK6|=v.
Regressing Formulas Through Effects
We can now generalize regression from state variables to general formulas over state variables.
The basic idea is to replace every occurrenceof every state variable v byregr(v,e) as defined in the previous section.
The following definition makes this more formal.
Definition (Regressing a Formula Through an Effect) In a propositional planning task, lete be an effect, and letϕbe a formula over state variables.
Theregression 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).
Example
Lete = (bBa)∧(c B¬a)∧b∧ ¬d. Recall:
regr(a,e)≡b∨(a∧ ¬c) regr(b,e)≡ >
regr(c,e)≡c regr(d,e)≡ ⊥ We get:
regr((a∨d)∧(c∨d),e)≡((b∨(a∧ ¬c))∨ ⊥)∧(c∨ ⊥)
≡(b∨(a∧ ¬c))∧c
≡b∧c
Lemma (Correctness ofregr(ϕ,e))
Letϕbe a logical formula, e an effect and s a state.
Then s|=regr(ϕ,e) iff sJeK|=ϕ.
Proof.
The proof is by structural induction onϕ.
Induction hypothesis: s |=regr(ψ,e) iffsJeK|=ψ for all proper subformulasψ ofϕ.
Base caseϕ=>:
We haveregr(>,e) =>, ands |=>iff sJeK|=> is correct.
Base caseϕ=⊥:
We haveregr(⊥,e) =⊥, ands |=⊥iff sJeK|=⊥ is correct.
Base caseϕ=v:
We haves |=regr(v,e) iff sJeK|=v from the previous lemma. . . .
Proof.
The proof is by structural induction onϕ.
Induction hypothesis: s |=regr(ψ,e) iffsJeK|=ψ for all proper subformulasψ ofϕ.
Base caseϕ=>:
We haveregr(>,e) =>, ands |=>iff sJeK|=> is correct.
Base caseϕ=⊥:
We haveregr(⊥,e) =⊥, ands |=⊥iff sJeK|=⊥ is correct.
Base caseϕ=v:
We haves |=regr(v,e) iff sJeK|=v from the previous lemma. . . .
Proof.
The proof is by structural induction onϕ.
Induction hypothesis: s |=regr(ψ,e) iffsJeK|=ψ for all proper subformulasψ ofϕ.
Base caseϕ=>:
We haveregr(>,e) =>, ands |=>iff sJeK|=> is correct.
Base caseϕ=⊥:
We haveregr(⊥,e) =⊥, ands |=⊥iff sJeK|=⊥ is correct.
Base caseϕ=v:
We haves |=regr(v,e) iff sJeK|=v from the previous lemma. . . .
Proof.
The proof is by structural induction onϕ.
Induction hypothesis: s |=regr(ψ,e) iffsJeK|=ψ for all proper subformulasψ ofϕ.
Base caseϕ=>:
We haveregr(>,e) =>, ands |=>iff sJeK|=> is correct.
Base caseϕ=⊥:
We haveregr(⊥,e) =⊥, ands |=⊥iff sJeK|=⊥ is correct.
Base caseϕ=v:
We haves |=regr(v,e) iff sJeK|=v from the previous lemma. . . .
Proof.
The proof is by structural induction onϕ.
Induction hypothesis: s |=regr(ψ,e) iffsJeK|=ψ for all proper subformulasψ ofϕ.
Base caseϕ=>:
We haveregr(>,e) =>, ands |=>iff sJeK|=> is correct.
Base caseϕ=⊥:
We haveregr(⊥,e) =⊥, ands |=⊥iff sJeK|=⊥ is correct.
Base caseϕ=v:
We haves |=regr(v,e) iff sJeK|=v from the previous lemma. . . .
Proof (continued).
Inductive caseϕ=¬ψ:
s |=regr(¬ψ,e) iff s |=¬regr(ψ,e) iff s 6|=regr(ψ,e) iff sJeK6|=ψ iff sJeK|=¬ψ Inductive caseϕ=ψ∨χ:
s |=regr(ψ∨χ,e) iffs |=regr(ψ,e)∨regr(χ,e) iffs |=regr(ψ,e) ors |=regr(χ,e) iffsJeK|=ψ or sJeK|=χ
iffsJeK|=ψ∨χ Inductive caseϕ=ψ∧χ:
Like previous case, replacing “∨” by “∧”
and replacing “or” by “and”.
Proof (continued).
Inductive caseϕ=¬ψ:
s |=regr(¬ψ,e) iff s |=¬regr(ψ,e) iff s 6|=regr(ψ,e) iff sJeK6|=ψ iff sJeK|=¬ψ Inductive caseϕ=ψ∨χ:
s |=regr(ψ∨χ,e) iffs |=regr(ψ,e)∨regr(χ,e) iffs |=regr(ψ,e) ors |=regr(χ,e) iffsJeK|=ψ or sJeK|=χ
iffsJeK|=ψ∨χ Inductive caseϕ=ψ∧χ:
Like previous case, replacing “∨” by “∧”
and replacing “or” by “and”.
Proof (continued).
Inductive caseϕ=¬ψ:
s |=regr(¬ψ,e) iff s |=¬regr(ψ,e) iff s 6|=regr(ψ,e) iff sJeK6|=ψ iff sJeK|=¬ψ Inductive caseϕ=ψ∨χ:
s |=regr(ψ∨χ,e) iffs |=regr(ψ,e)∨regr(χ,e) iffs |=regr(ψ,e) ors |=regr(χ,e) iffsJeK|=ψ or sJeK|=χ
iffsJeK|=ψ∨χ Inductive caseϕ=ψ∧χ:
Like previous case, replacing “∨” by “∧”
and replacing “or” by “and”.
Regressing Formulas Through
Operators
We can now regress arbitrary formulas through arbitrary effects.
The last missing piece is a definition of regression through operators, describing exactly in which statess applying a given operator o leads to a state satisfying a given formula ϕ.
There are two requirements:
The operatoro must beapplicablein the states.
Theresulting state sJoKmustsatisfyϕ.
Definition (Regressing a Formula Through an Operator) In a propositional planning task, leto be an operator, and letϕbe a formula over state variables.
Theregression ofϕthrough o, written regr(ϕ,o), is defined as the following logical formula:
regr(ϕ,o) =pre(o)∧regr(ϕ,eff(o)).
Theorem (Correctness ofregr(ϕ,o))
Letϕbe a logical formula, o an operator and s a state.
Then s|=regr(ϕ,o) iff o is applicable in s and sJoK|=ϕ.
Reminder: regr(ϕ,o) =pre(o)∧regr(ϕ,eff(o))
Proof.
Case 1: s |=pre(o).
Theno is applicable ins and the statement we must prove simplifies to: s |=regr(ϕ,eff(o)) iffsJeK|=ϕ.
This was proved in the previous lemma.
Case 2: s 6|=pre(o).
Thens 6|=regr(ϕ,o) ando is not applicable in s.
Hence both statements are false and therefore equivalent.
Reminder: regr(ϕ,o) =pre(o)∧regr(ϕ,eff(o))
Proof.
Case 1: s |=pre(o).
Theno is applicable ins and the statement we must prove simplifies to: s |=regr(ϕ,eff(o)) iffsJeK|=ϕ.
This was proved in the previous lemma.
Case 2: s 6|=pre(o).
Thens 6|=regr(ϕ,o) ando is not applicable in s.
Hence both statements are false and therefore equivalent.
Examples: compute regression and simplify to DNF regr(b,ha,bi)
≡a∧(> ∨(b∧ ¬⊥))
≡a
regr(b∧c ∧d,ha,bi)
≡a∧(> ∨(b∧ ¬⊥))∧(⊥ ∨(c∧ ¬⊥))∧(⊥ ∨(d∧ ¬⊥))
≡a∧c∧d
regr(b∧ ¬c,ha,b∧ci)
≡a∧(> ∨(b∧ ¬⊥))∧ ¬(> ∨(c∧ ¬⊥))
≡a∧ > ∧ ⊥
≡ ⊥
Examples: compute regression and simplify to DNF regr(b,ha,c Bbi)
≡a∧(c∨(b∧ ¬⊥))
≡a∧(c∨b)
≡(a∧c)∨(a∧b)
regr(b,ha,(c Bb)∧((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)
Summary
Regressing a state variablethrough an (arbitrary) operator must consider two cases:
state variablesmade true (by add effects)
state variablesremaining true(by absence of delete effects) Regression of state variables can be generalized
to arbitrary formulas ϕby replacing each occurrence of a state variable in ϕby its regression.
Regressing a formula ϕthrough an operatorinvolves
regressingϕthrough the effect and enforcing the precondition.