1 the lpsat engine and its application to metric planning steve wolfman university of washington...

25
1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

Upload: wesley-allen

Post on 02-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

1

The LPSAT Engine and its Application to Metric Planning

Steve Wolfman

University of Washington CS&E

Advisor: Dan Weld

Page 2: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

2

Background: Planning Problem

• Given– Domain: a set of actions– Problem: an initial state and a set of goal states

• Produce a list of actions which leads from the initial state to the goal

• Metric planners reason about real-valued variables

(mappings from preconditions to effects)

(mappings from preconditions to effects)

(usually a partially specified state)

(usually a partially specified state)

Page 3: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

3

Metric Planning• Metric planning

– Incorporate metric quantities; e.g. y 2 + x– Important for modeling expendable resources

• Fast back end metric solver will help– Shown effective with SAT solvers for planning

[Kautz&Selman]– Compile from planning to simple intermediate

language– Solve problems in simple language

Steve Wolfman:

Note MAJSAT success

Steve Wolfman:

Note MAJSAT success

Page 4: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

4

Sample Metric Planning Problem

Ship RedVines from one location to another– Fuel used by moving– Maximum fuel level in truck– Maximum load for truck– Limited amount of available RedVines

Page 5: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

5

Contributions• Architecture

– Intermediate language with metric values– Efficient propositional logic + metric constraints

solver– Proof of concept in metric planning domain

• System– LCNF intermediate language– LPSAT solver– Metric planning compiler/decoder

extended SAT solver to work with metric constraints and Cassowary.

Extended Cassowary to discover minimal conflict sets.

Designed LCNF language. Designed minimal conflict set discovery technique.

Wrote LiPSyNC’s translator from planning to LCNF and the decoder from LCNF solution to plan.

extended SAT solver to work with metric constraints and Cassowary.

Extended Cassowary to discover minimal conflict sets.

Designed LCNF language. Designed minimal conflict set discovery technique.

Wrote LiPSyNC’s translator from planning to LCNF and the decoder from LCNF solution to plan.

Page 6: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

6

Outline

• Motivation

• Planning System

• LCNF

• LPSAT

• Experimental Results

• Conclusions

planningcompiler

LPSATsolver

planningdecoder

input planning language

LCNF intermediate language

value assignment

solution plan

Page 7: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

7

Metric Planning Compiler/Decoder

• Compiler– inputs planning problems in LPDDL– accepts constraints over operators +, -, *, and – outputs LCNF problem and mapping tables

• Decoder– inputs solution to LCNF problem and mapping

tables– outputs plan with instantiated metric values

So non-linear OK, so farSo non-linear OK, so far

Extension of McDermott’s PDDL

Extension of McDermott’s PDDL

(truth assignment and constraint variable values)

(truth assignment and constraint variable values)

Page 8: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

8

Sample Metric Planning DomainAction: MOVE-TRUCK(load) preconditions: load 45 ; max. avail. RedVines fuel 7 + load / 2 ; min. required fuel fuel 15 ; fuel capacity load 30 ; load capacity

effects: (deliver) if (load = 45) then ; good-trip moves (good-trip) ; all the RedVines

Steve Wolfman:

I will use this as a running example

Steve Wolfman:

I will use this as a running example

Page 9: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

9

Sample Metric Planning Problem

Problem: Too-Big initial conditions: not (deliver) not (good-trip)

goal conditions: (deliver) (good-trip)

Mention unsolvable for goals deliver _and_ good-trip

Mention unsolvable for goals deliver _and_ good-trip

Page 10: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

10

LCNF Language

CNF formula with triggered constraints– Boolean variable triggers one (or no) constraint– Constraint triggered iff its trigger variable’s

truth assignment is true– Truth/real-value assignment is a solution iff

• CNF formula is satisfied• All triggered constraints are satisfied

Page 11: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

11

Sample Problem in LCNF

good-trip1

deliver1

move-truck0 max-load

move-truck0 max-fuel

move-truck0 min-fuel

move-truck0 deliver1

(move-truck0 all-loaded)

good-trip1

...

max-load:

load 30max-fuel:

fuel 15min-fuel:

fuel 7 + load/2all-loaded:

load = 45

...

CNF formula Constraint triggers

Variable names and, in particular, trigger names added for clarity

Variable names and, in particular, trigger names added for clarity

That’s the front end of the system; the back end simply reads off which actions are assigned true and what the constraint vars values are

That’s the front end of the system; the back end simply reads off which actions are assigned true and what the constraint vars values are

Set aside for later use!Set aside for later use!

Page 12: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

12

LPSAT

• Inputs LCNF subset– Supports operators +, -, *, and – Restricts constraints to linear (in)equalities

• Outputs truth/real-value assignment or reports failure– Sound– Complete– Satisficing

As opposed to optimizing

As opposed to optimizing

Page 13: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

13

LPSAT Architecture

SatisfiabilitySolver

Linear Programming

System

new/revoked constraints

consistency info,real variable values

input problem

solution

Page 14: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

14

LPSAT DesignSAT controller calls LP black box• SAT solver based on RelSAT [Bayardo&Schrag]

– Systematic solver– Sound and complete– Gradual changes to constraint set– Learning/backjumping based on conflict sets

• LP system is Cassowary [Badros&Borning]– supports linear constraints over real variables– fast updates to constraint set

Explores all possible truth assignments without repeating any

Explores all possible truth assignments without repeating any

Page 15: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

15

LPSAT Algorithm: RedefinitionsImportant changes to RelSAT concepts

satisfied = statement is empty

and active constraint set is consistent

inconsistent = clause in statement is empty

or active constraint set is inconsistent

pure literal = any literal whose negation

never appears in statement

except positive trigger variables

Page 16: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

16

LPSAT Algorithm

Procedure LPSAT(φ: LCNF problem)If φ is satisfied, return YES

Else if φ is inconsistent, return NO

Else if there is a unit clause {} or pure literal in φ, return LPSAT(φ|)

Else choose a variable in φ. If LPSAT(φ|), return YES

Else, return LPSAT(φ|)

Put on other projector

Put on other projector

Page 17: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

17

Modifications to RelSAT

• Altered to support trigger variables– Constraints tied to variables– Pure literal rule modified

• Incorporated constraints in solution– Constraint consistency checked after each add– Real values reported in final solution

• Added trigger-aware heuristic function

Page 18: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

18

Modifications to Cassowary

Support RelSAT learning/backjumping

• Global conflict set discovery– Reports entire set of active constraints– Correct but conservative

• Minimal conflict set discovery– Set of constraints reported is inconsistent– Every proper subset of the set is consistent– Correct and almost optimal

Implemented in Cassowary frameworkLinear in # of constraints + # of variablesDetermines most constraining conflict set

Implemented in Cassowary frameworkLinear in # of constraints + # of variablesDetermines most constraining conflict set

Minimal, not minimumMinimal, not minimum

Explain why smaller is better!

Explain why smaller is better!

Page 19: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

19

Sample Problem Conflict Setsfuel

load

load 30

fuel 15

load = 45

fuel 7+load/2

Solution region without load = 45 constraint

Page 20: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

20

Experimental Results

• Tested against Zeno planner– Many times faster than Zeno– Solved problems Zeno could not solve

• Tested conflict set discovery techniques– Without learning/backjumping (slow)– With global conflict sets (faster)– With minimal conflict sets (fastest)

Under resource bounds (memory)

Under resource bounds (memory)

Page 21: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

21

Learning Speedup

0.01

0.1

1

10

100

1000

10000

easy-1 easy-2 easy-3 easy-4 log-a log-b log-c

Metric Logistics Problems

tim

e (s

)

No learning Global Conflict Sets Minimal Conflict Sets

Conflict Set Discovery Results

The domain is a metric version of Kautz and Selman’s logistics domain. Log-c is difficult in the original domain even for modern planners

The domain is a metric version of Kautz and Selman’s logistics domain. Log-c is difficult in the original domain even for modern planners

Page 22: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

22

Contributions

• Created LCNF intermediate language

• Implemented LPSAT, an LCNF solver– Solves LCNF with linear constraints– Incorporates new technique for finding conflict

sets in incremental Simplex

• Implemented a full metric planning system– Compiler translates metric planning to LCNF– Decoder translates LCNF solutions to plans

Page 23: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

23

Conclusions

• Enhanced satisfiability solvers are effective for solving metric planning problems

• Effective heuristics for combined solution processes must use information from both processes

• The translate/solve/decode architecture of SAT-based planning can be profitably extended to more complex solvers

Page 24: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

24

Future Work: Compiler/Decoder• Optimize current compiler

– Speed– Encoding quality

• Use metric IPP [Koehler] to compile metric planning problems to LCNF

• Compiler/decoders for new domains– Scheduling– Temporal planning– Analog circuit verification

Page 25: 1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld

25

Future Work: LPSAT/LCNF

• Implement LPSAT with a stochastic SAT solver

• Decompose nonlinearities in LCNF

• Construct an LCNF solver with native support for nonlinear constraints

• Investigate other combinations of solution processes