• Keine Ergebnisse gefunden

Planning and Optimization A7. Invariants, Mutexes and Task Reformulation Malte Helmert and Thomas Keller

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization A7. Invariants, Mutexes and Task Reformulation Malte Helmert and Thomas Keller"

Copied!
23
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

A7. Invariants, Mutexes and Task Reformulation

Malte Helmert and Thomas Keller

Universit¨at Basel

September 30, 2019

(2)

Invariants Mutexes Reformulation Summary

Content of this Course

Planning

Classical

Foundations Logic Heuristics Constraints

Probabilistic

Explicit MDPs Factored MDPs

(3)

Invariants

(4)

Invariants Mutexes Reformulation Summary

Invariants

When we as humans reason about planning tasks,

we implicitly make use of “obvious” properties of these tasks.

Example: we are never in two places at the same time We can represent such properties as formulasϕ that are true in all reachable states.

Example: ϕ=¬(at-uniat-home)

Such formulas are called invariants of the task.

(5)

Invariants: Definition

Definition (Invariant)

Aninvariant of a planning task Π with state variables V

is a formulaϕ overV with s |=ϕfor all reachable statess of Π.

(6)

Invariants Mutexes Reformulation Summary

Computing Invariants

How does anautomated planner come up with invariants?

Theoretically, testing if a formula ϕis an invariant is as hard as planning itself.

proof idea: a planning task is unsolvable iff the negation of its goal is an invariant

Still, many practical invariant synthesis algorithms exist.

To remain efficient (= polynomial-time), these algorithms only compute a subsetof all useful invariants.

sound, but notcomplete

Empirically, they tend to at least find the “obvious”

invariants of a planning task.

(7)

Invariant Synthesis Algorithms

Most algorithms for generating invariants are based on thegenerate-test-repairapproach:

Generate: Suggest some invariant candidates, e.g., by enumerating all possible formulas ϕof a certain size.

Test: Try to prove that ϕis indeed an invariant.

Usually done inductively:

1 Test thatinitial statesatisfiesϕ.

2 Test that ifϕis true in the current state, it remains true after applying a single operator.

Repair: If invariant test fails, replace candidateϕ

by a weakerformula, ideally exploitingwhy the proof failed.

(8)

Invariants Mutexes Reformulation Summary

Invariant Synthesis: References

We will not cover invariant synthesis algorithms in this course.

Literature on invariant synthesis:

DISCOPLAN (Gerevini & Schubert, 1998) TIM (Fox & Long, 1998)

Edelkamp & Helmert’s algorithm (1999) Bonet & Geffner’s algorithm (2001) Rintanen’s algorithm (2008)

(9)

Exploiting Invariants

Invariants have many uses in planning:

Regression search:

Prune subgoals that violate (are inconsistent with) invariants.

Planning as satisfiability:

Add invariantsto a SAT encoding of a planning task to get tighter constraints.

Proving unsolvability:

Ifϕis an invariant such that ϕ∧γ is unsatisfiable, the planning task with goalγ is unsolvable.

Finite-Domain Reformulation:

Derive amore compact FDR representation (equivalent, but with fewer states) from a given propositional planning task.

We now discuss the last point because it connects

to our discussion of propositional vs. FDR planning tasks.

(10)

Invariants Mutexes Reformulation Summary

Mutexes

(11)

Reminder: Blocks World (Propositional Variables)

Example

s(A-on-B) =F s(A-on-C) =F s(A-on-table) =T s(B-on-A) =T s(B-on-C) =F s(B-on-table) =F s(C-on-A) =F s(C-on-B) =F s(C-on-table) =T

A B

C

29 = 512 states

(12)

Invariants Mutexes Reformulation Summary

Reminder: Blocks World (Finite-Domain Variables)

Example

Use three finite-domain state variables:

below-a: {b,c,table}

below-b: {a,c,table}

below-c: {a,b,table}

s(below-a) = table s(below-b) = a s(below-c) = table

33 = 27 states

A B

C

(13)

Task Reformulation

Common modeling languages (like PDDL) often give us propositional tasks.

More compact FDR tasks are often desirable.

Can we do an automatic reformulation?

(14)

Invariants Mutexes Reformulation Summary

Mutexes

Invariants that take the form ofbinary clauses are called mutexes because they express that certain variable assignments

cannot be simultaneously true (aremutually exclusive).

Example (Blocks World)

The invariant¬A-on-B∨ ¬A-on-Cstates that A-on-Band A-on-Care mutex.

We say that aset of literalsis a mutex group if every subset of two literals is a mutex.

Example (Blocks World)

{A-on-B,A-on-C,A-on-table} is a mutex group.

(15)

Encoding Mutex Groups as Finite-Domain Variables

LetG ={`1, . . . , `n} be a mutex group over n different propositional state variablesVG ={v1, . . . ,vn}.

Then a singlefinite-domainstate variablevG with

dom(vG) ={`1, . . . , `n,none} can replace then variables VG: s(vG) =`i represents situations where (exactly)`i is true s(vG) = none represents situations where all `i are false Note: We can omit the “none” value if `1∨ · · · ∨`nis an invariant.

(16)

Invariants Mutexes Reformulation Summary

Mutex Covers

Definition (Mutex Cover)

Amutex coverfor a propositional planning task Π

is a set of mutex groups{G1, . . . ,Gn} where each variable of Π occurs in exactly one groupGi.

A mutex cover ispositive if all literals in all groups are positive.

Note: always exists (use trivial group{v} ifv otherwise uncovered)

(17)

Positive Mutex Covers

In the following, we stick topositive mutex covers for simplicity.

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 A6).

(18)

Invariants Mutexes Reformulation Summary

Reformulation

(19)

Mutex-Based Reformulation of Propositional Tasks

Given aconflict-free propositional planning task Π with positive mutex cover{G1, . . . ,Gn}:

In all conditionswhere variable v ∈Gi occurs, replacev with vGi =v.

In all effects e where variablev ∈Gi occurs, Replace allatomic add effects v withvGi :=v Replace allatomic delete effects ¬v with (vGi =v∧ ¬W

v0∈Gi\{v}effcond(v0,e))BvGi := none This results in an FDR planning task Π0 that is equivalent to Π (without proof).

Note: the conditional effects can often be simplified away to an unconditional or empty effect.

(20)

Invariants Mutexes Reformulation Summary

And Back?

It can also be useful to reformulate an FDR task into a propositional task.

For example, we might want positive normal form, which requires a propositional task.

Key idea: each variable/value combinationv =d becomes a separate propositional state variable hv,di

(21)

Converting FDR Tasks into Propositional Tasks

Definition (Induced Propositional Planning Task)

Let Π =hV,I,O, γibe a conflict-free FDR planning task.

Theinduced propositional planning taskΠ0

is the propositional planning task Π0 =hV0,I0,O0, γ0i, where V0 ={hv,di |v ∈V,d ∈dom(v)}

I0(hv,di) =Tiff I(v) =d

O0 andγ0 are obtained from O andγ by

replacing each atomic formulav =d by the propositionhv,di replacing each atomic effectv :=d by the effect

hv,di ∧V

d0∈dom(v)\{d}¬hv,d0i.

Notes:

Again, simplifications are often possible to avoid introducing so many delete effects.

SAS+ tasks induce STRIPS tasks

(22)

Invariants Mutexes Reformulation Summary

Summary

(23)

Summary

Invariants are common properties of all reachable states, expressed as formulas.

Mutexes are invariants that express that certain literals are mutually exclusive.

Mutex coversprovide a way to express the information in a set of propositional state variables in a (potentially much smaller) set of finite-domain state variables.

Using mutex covers, we can reformulate propositional tasks as more compact FDR tasks.

Conversely, we can reformulate FDR tasksas propositional tasks by introducing propositions for each variable/value pair.

Referenzen

ÄHNLICHE DOKUMENTE

Same algorithm can be used for disjunctive action landmarks, where we also have a minimal saturated cost function. Definition (MSCF for Disjunctive

Same algorithm can be used for disjunctive action landmarks, where we also have a minimal saturated cost function. Definition (MSCF for Disjunctive

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

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

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