Top Banner
CS444-Autumn-2006 1 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann
30

CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

Dec 28, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 1 of 20

Planning as Satisfiability

Henry KautzUniversity of Rochester

in collaboration with Bart Selman and Jöerg Hoffmann

Page 2: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 2 of 20

AI Planning

• Two traditions of research in planning:– Planning as general inference (McCarthy 1969)

• Important task is modeling

– Planning as human behavior (Newell & Simon 1972)

• Important task is to develop search strategies

Page 3: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 3 of 20

Satplan• Model planning as Boolean satisfiability

– (Kautz & Selman 1992): Hard structured benchmarks for SAT solvers

– Pushing the envelope: planning, propositional logic, and stochastic search (1996)

• Can outperform best current planning systems

Satplan (satz) Graphplan (IPP)

log.a 5 sec 31 min

log.b 7 sec 13 min

log.c 9 sec > 4 hours

Page 4: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 4 of 20

Translating STRIPS• Ground action = a STRIPS operator with

constants assigned to all of its parameters• Ground fluent = a precondition or effect of a

ground actionoperator: Fly(a,b)

precondition: At(a), Fueledeffect: At(b), ~At(a), ~Fueled

constants: NY, Boston, SeattleGround actions: Fly(NY,Boston), Fly(NY,Seattle),

Fly(Boston,NY), Fly(Boston,Seattle), Fly(Seattle,NY), Fly(Seattle,Boston)

Ground fluents: Fueled, At(NY), At(Boston), At(Seattle)

Page 5: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 5 of 20

Clause Schemas

• A large set of clauses can be represented by a schema

Page 6: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 6 of 20

Satplan in 15 Seconds• Time = bounded sequence of integers• Translate planning operators to propositional

schemas that assert:

1 2

1 2

1 2

0

negates a precondition

action( ) pre( ) effect( 1)

( ) ( ) if interfering

fact( ) fact( 1) ( )

initial_state ,

o

goal_stat

f

frame

e

axioms

n

i i i

action i action i

i i action i acti

action action

on

⊃ ∧ +¬ ∨¬

¬ ∧ + ⊃ ∨ ∨L

Page 7: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 7 of 20

Example• If an action occurs at time i, then its preconditions must

hold at time i• If an action occurs at time i, then its effects must hold at

time i+1

(fly(a,b,i) at(a,i

for (1 i<K)

for (a {NY,B

))

(fly(a,b,i)

oston,Seattle})

for (b {NY,Boston,Seattl

fuel(i))

(fly(a,b,i) at(b,i+1))

(fly(a,b,i) f

e

u

} & a b

l

)

e (

⊃ ∧⊃ ∧⊃ ∧⊃¬

≤∈

∈ ≠

i+1))

Page 8: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 8 of 20

SAT Encoding

• If a fluent changes its truth value from time i to time i+1, one of the actions with the new value as an effect must have occurred at time i

( at(b,i) at(b,i+1))

for (1 i<K)

for (b {NY,Bo

exists (a {NY,Boston,Sea

st

tt

on,Seattle}

le} & a b)

)

fly(a,b,i)

)

¬ ∧∈

≤∈

≠⊃

Like “for”, but connects propositions

with OR

Page 9: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 9 of 20

Plan Graph Based Instantiation

initial state: p

action a:precondition: p

effect: p

action b:precondition: p

effect: p q

a0 a1

p0 p1 p2

b1

m0 m1

q2

= =

Page 10: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 10 of 20

International Planning Competition

• IPC-1998: Satplan (blackbox) is competitive

Page 11: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 11 of 20

International Planning Competition• IPC-2000: Satplan did poorly

Satplan

Page 12: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 12 of 20

International Planning Competition

• IPC-2002: we stayed home.

Jeb Bush

Page 13: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 13 of 20

International Planning Competition

• IPC-2004: 1st place, Optimal Planning– Best on 5 of 7 domains– 2nd best on remaining 2 domains

PROLEMA /

philosophers

Page 14: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 14 of 20

The IPC-4 Domains

• Airport: control the ground traffic [Hoffmann & Trüg] • Pipesworld: control oil product flow in a pipeline network [Liporace &

Hoffmann] • Promela: find deadlocks in communication protocols [Edelkamp]• PSR: resupply lines in a faulty electricity network [Thiebaux &

Hoffmann]• Satellite & Settlers [Fox & Long], additional Satellite versions with

time windows for sending data [Hoffmann]• UMTS: set up applications for mobile terminals [Edelkamp &

Englert]

Page 15: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 15 of 20

International Planning Competition

• IPC-2006: Tied for 1st place, Optimal Planning– Other winner, MAXPLAN, is a variant of Satplan!

CPT2 MIPS-BDD SATPLAN Maxplan FDP

Propositional Domains(1st / 2nd Places)

0 / 1 1 / 1 3 / 2 3 / 2 0 / 3

Temporal Domains(1st / 2nd Places)

2 / 0

Page 16: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 16 of 20

What Changed?

• Small change in modeling– Modest improvement from 2004 to 2006

• Significant change in SAT solvers!

Page 17: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 17 of 20

What Changed?

• In 2004, competition introduced the optimal planning track– Optimal planning is a very different beast from non-

optimal planning!– In many domains, it is almost trivial to find poor-

quality solutions by backtrack-free search!• E.g.: solutions to multi-airplane logistics planning problems

found by heuristic state-space planners typically used only a single airplane!

– See: Local Search Topology in Planning Benchmarks: A Theoretical Analysis (Hoffmann 2002)

Page 18: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 18 of 20

Why Care About Optimal Planning?

• Real users want (near)-optimal plans!– Industrial applications: assembly planning, resource

planning, logistics planning…– Difference between (near)-optimal and merely

feasible solutions can be worth millions of dollars

• Alternative: fast domain-specific optimizing algorithms – Approximation algorithms for job shop scheduling– Blocks World Tamed: Ten Thousand Blocks in Under

a Second (Slaney & Thiébaux 1995)

Page 19: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 19 of 20

Domain-Independent Feasible Planning Considered Harmful

Solution Quality?

Speed?

General optimizing planning algorithms

Best Moderate

Domain-specific optimizing planning algorithms

High Fast

Domain-independent feasible planning

? ?

Page 20: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 20 of 20

Objections

• Real-world planning cares about optimizing resources, not just make-span, and Satplan cannot handle numeric resources– We can extend Satplan to handle numeric constraints– One approach: use hybrid SAT/LP solver (Wolfman &

Weld 1999)

– Modeling as ordinary Boolean SAT is often surprisingly efficient! (Hoffmann, Kautz, Gomes, & Selman, under review)

Page 21: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 21 of 20

Projecting Variable Domains

initial state: r=5

action a:precondition: r>0

effect: r := r-1

• Resource use represented as conditional effects

a1

r=5 r=5 r=5

r=4 r=4

a0

r=4

Page 22: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 22 of 20

2002 ICAPS Benchmarks

Page 23: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 23 of 20

Large Numeric Domains

Directly encode binary arithmetic

action: aprecondition: r keffect: r := r-k

a1

r11

+

-k

r21

r31

r41

r12

r22

r32

r42

Page 24: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 24 of 20

Objections

• If speed is crucial, you still must use feasible planners– For highly constrained planning problems,

optimal planners can be faster than feasible planners!

Page 25: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 25 of 20

Constrainedness: Run Time

Page 26: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 26 of 20

Constrainedness: Percent Solved

Page 27: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 27 of 20

Further Extensions to Satplan

• Probabilistic planning– Translation to stochastic satisfiability

(Majercik & Littman 1998)– Alternative untested idea:

• Encode action “failure” as conditional resource consumption

• Can find solutions with specified probability of failure-free execution

• (Much) less general than full probabilistic planning (no fortuitous accidents), but useful in practice

Page 28: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 28 of 20

Encoding Bounded Failure Free Probabilistic Planning

plan failure free probability 0.90

action: afailure probability: 0.01

preconditions: p

effects: q

action: aprecondition: p

s log(0.89)

effect: q s := s + log(0.99)

Page 29: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 29 of 20

One More Objection!

• Satplan-like approaches cannot handle domains that are too large to fully instantiate– Solution: SAT solvers with lazy instantiation– Lazy Walksat (Singla & Domingos 2006)

• Nearly all instantiated propositions are false• Nearly all instantiated clauses are true• Modify Walksat to only keep false clauses and a

list of true propositions in memory

Page 30: CS444-Autumn-20061 of 20 Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.

CS444-Autumn-2006 30 of 20

Summary

• Satisfiability testing is a vital line of research in AI planning– Dramatic progress in SAT solvers– Recognition of distinct and important nature of

optimizing planning versus feasible planning

• SATPLAN not restricted to STRIPS any more!– Numeric constraints– Probabilistic planning– Large domains