Planning and Optimization - General Regression

Planning and Optimization
October 17, 2016 — B4. General Regression, Part II
Planning and Optimization
B4. General Regression, Part II
B4.1 Regressing Formulas Through Operators
Malte Helmert and Gabriele Röger
B4.2 Practical Issues
Universität Basel
B4.3 Summary
October 17, 2016
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
B4. General Regression, Part II
October 17, 2016
1 / 18
Regressing Formulas Through Operators
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
B4. General Regression, Part II
October 17, 2016
2 / 18
Regressing Formulas Through Operators
Regressing Formulas Through Operators: Idea
B4.1 Regressing Formulas Through
Operators
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 ϕ.
There are two requirements:
I
I
I
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
3 / 18
The operator o must be applicable in the state s.
The resulting state sJoK must satisfy ϕ.
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
4 / 18
B4. General Regression, Part II
Regressing Formulas Through Operators
Regressing Formulas Through Operators: Definition
B4. General Regression, Part II
Regressing Formulas Through Operators
Regressing Formulas Through Operators: Correctness (1)
Definition (Regressing a Formula Through an Operator)
Let o be an operator, and let ϕ be a formula over state variables.
Theorem (Correctness of regro (ϕ))
The regression of ϕ through o, written regro (ϕ),
is defined as the following logical formula:
Let ϕ be a logical formula, o an operator and s a state.
Then s |= regro (ϕ) iff o is applicable in s and sJoK |= ϕ.
regro (ϕ) = pre(o) ∧ regreff(o) (ϕ).
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
B4. General Regression, Part II
October 17, 2016
5 / 18
Regressing Formulas Through Operators
Regressing Formulas Through Operators: Correctness (2)
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
B4. General Regression, Part II
October 17, 2016
Regressing Formulas Through Operators
Regression Examples (1)
Examples: compute regression and simplify to DNF
Reminder: regro (ϕ) = pre(o) ∧ regreff(o) (ϕ)
I
regrha,bi (b)
≡ a ∧ (> ∨ (b ∧ ¬⊥))
≡a
Then o is applicable in s and the statement we must prove
simplifies to: s |= regreff(o) (ϕ) iff sJoK |= ϕ.
This was proved in the previous lemma.
I
regrha,bi (b ∧ c ∧ d)
≡ a ∧ (> ∨ (b ∧ ¬⊥)) ∧ (⊥ ∨ (c ∧ ¬⊥)) ∧ (⊥ ∨ (d ∧ ¬⊥))
≡a∧c ∧d
Case 2: s 6|= pre(o).
I
regrha,b∧ci (b ∧ ¬c)
≡ a ∧ (> ∨ (b ∧ ¬⊥)) ∧ ¬(> ∨ (c ∧ ¬⊥))
≡a∧>∧⊥
≡⊥
Proof.
Case 1: s |= pre(o).
Then s 6|= regro (ϕ) and o is not applicable in s.
Hence both statements are false and therefore equivalent.
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
6 / 18
October 17, 2016
7 / 18
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
8 / 18
B4. General Regression, Part II
Regressing Formulas Through Operators
B4. General Regression, Part II
Practical Issues
Regression Examples (2)
Examples: compute regression and simplify to DNF
I
I
regrha,cBbi (b)
≡ a ∧ (c ∨ (b ∧ ¬⊥))
≡ a ∧ (c ∨ b)
≡ (a ∧ c) ∨ (a ∧ b)
B4.2 Practical Issues
regrha,(cBb)∧((d∧¬c)B¬b)i (b)
≡ 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)
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
B4. General Regression, Part II
9 / 18
Practical Issues
Emptiness and Subsumption Testing
I
Test that regro (ϕ) does not represent the empty set
(which would mean that search is in a dead end).
For example, regrha,¬pi (p) ≡ a ∧ (⊥ ∨ (p ∧ ¬>)) ≡ ⊥.
I
Test that regro (ϕ) does not represent a subset of ϕ
(which would mean that the resulting search state
is worse than ϕ and can be pruned).
For example, regrhb,ci (a) ≡ a ∧ b.
October 17, 2016
B4. General Regression, Part II
10 / 18
Practical Issues
The formula regron (. . . regro2 (regro1 (ϕ))) may have size
O(|ϕ||o1 ||o2 | . . . |on−1 ||on |), i.e., the product of the sizes
of ϕ and the operators.
worst-case exponential size Ω(|ϕ|n )
Logical Simplifications
I ⊥ ∧ ϕ ≡ ⊥, > ∧ ϕ ≡ ϕ, ⊥ ∨ ϕ ≡ ϕ, > ∨ ϕ ≡ >
Both of these problems are NP-complete.
Planning and Optimization
Planning and Optimization
Formula Growth
The following two tests are useful when performing regression
searches to avoid exploring unpromising branches:
M. Helmert, G. Röger (Universität Basel)
M. Helmert, G. Röger (Universität Basel)
October 17, 2016
11 / 18
I
a ∨ ϕ ≡ a ∨ ϕ[⊥/a], ¬a ∨ ϕ ≡ ¬a ∨ ϕ[>/a],
a ∧ ϕ ≡ a ∧ ϕ[>/a], ¬a ∧ ϕ ≡ ¬a ∧ ϕ[⊥/a]
I
idempotence, absorption, commutativity, associativity, . . .
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
12 / 18
B4. General Regression, Part II
Practical Issues
Restricting Formula Growth in Search Trees
B4. General Regression, Part II
Practical Issues
Unrestricted Regression: Search Tree Example
Unrestricted regression: do not treat disjunctions specially
Goal γ = a ∧ b, initial state I = {a 7→ F, b 7→ F, c 7→ F}.
Problem very big formulas obtained by regression
¬a ∧ a
Cause disjunctivity in the (NNF) formulas
(formulas without disjunctions easily convertible
to monomials `1 ∧ · · · ∧ `n where `i are literals
and n is at most the number of state variables)
h¬a, b
i
, bi
Ba
¬c
,
b
h
(¬c ∨ a) ∧ b hb, ¬
c Ba
i
Idea split disjunctive formulas when generating search trees
h¬a
i
γ =a∧b
(¬c ∨ a) ∧ b
(¬c ∨ a) ∧ ¬a
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
B4. General Regression, Part II
13 / 18
Practical Issues
Full Splitting: Search Tree Example
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
B4. General Regression, Part II
14 / 18
Practical Issues
General Splitting Strategies
Full splitting: always split all disjunctive formulas
Alternatives:
Goal γ = a ∧ b, initial state I = {a 7→ F, b 7→ F, c 7→ F}.
(¬c ∨ a) ∧ b in DNF: (¬c ∧ b) ∨ (a ∧ b)
split into ¬c ∧ b and a ∧ b
¬a ∧ a
(duplicate of γ) a ∧ b
¬c ∧ b hb , ¬c B ai
h¬a, b i
¬c ∧ ¬a
M. Helmert, G. Röger (Universität Basel)
h¬a
, bi
h
γ =a∧b
i
¬c ∧ b
Planning and Optimization
Do nothing (unrestricted regression).
2
Always eliminate all disjunctivity (full splitting).
3
Reduce disjunctivity if formula becomes too big.
Discussion:
hb, ¬c B ai
a
cB
¬
b,
1
October 17, 2016
15 / 18
I
With unrestricted regression formulas may have sizes
that are exponential in the number of state variables.
I
With full splitting search tree can be exponentially bigger
than without splitting.
I
The third option lies between these two extremes.
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
16 / 18
B4. General Regression, Part II
Summary
B4. General Regression, Part II
Summary
Summary
I
B4.3 Summary
I
Regressing a formula ϕ through an operator involves
regressing ϕ through the effect and enforcing the precondition.
When applying regression in practice, additional
considerations come into play, including:
I
I
I
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
17 / 18
emptiness testing to prune dead-end search states
subsumption testing to prune dominated search states
logical simplifications and splitting to restrict formula growth
M. Helmert, G. Röger (Universität Basel)
Planning and Optimization
October 17, 2016
18 / 18