Planning as Satisfiability with Blackbox - PowerPoint PPT Presentation

About This Presentation
Title:

Planning as Satisfiability with Blackbox

Description:

A disjunctive formula is a collection of one or more (positive and negative) ... eliminates in one shot all that can be eliminated and returns a smaller formula. ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 39
Provided by: cat5151
Category:

less

Transcript and Presenter's Notes

Title: Planning as Satisfiability with Blackbox


1
Planning as Satisfiabilitywith Blackbox
  • Presented By Catie Welsh
  • Sources
  • Chapter 7
  • Henry Kautz and Bart Selman (1999) Unifying
    SAT-based and Graph-based Planning, Proc.
    IJCAI-99, Stockholm
  • Henry Kautz and Bart Selman (1992) Planning as
    Satisfiability Proc. ECAI-92.

2
Introduction
  • Classical planning has often been observed as a
    form of logical deduction.
  • Planning as satisfiability offers a new solution
    to planning problems.
  • Formulates a planning problem as a propositional
    satisfiability problem.

3
Overview
  • A planning problem is encoded as a propositional
    formula.
  • A satisfiability decision procedure determines
    whether the formula is satisfiable by assigning
    truth values to the propositional variables.
  • A plan is extracted from the assignments
    determined by the satisfiability decision
    procedure.

4
Definitions
  • Model an assignment of truth values to its
    variables for which the formula evaluates to
    true.
  • Satisfiable a sentence or formula is
    satisfiable if it is true in some model
  • Satisfiability problem problem of determining
    whether a formula has a model.

5
States as Propositional Formulas
  • Use propositional formulas to represent facts
    that hold in states.
  • Ex at(r1,l1) ? loaded(r1) assuming there is a
    robot r1, and a location l1
  • A model for the above example is one that assigns
    true to the propositional variable at(r1,l1) and
    false to loaded(r1)
  • Above example still allows for at(r1, l2) to be
    true however.

6
States as Propositional Formulas (contd)
  • A propositional formula can represent sets of
    states rather than a single state.
  • Ex (at(r1,l1) ? at(r1,l2)) V (at(r1,l1) ?
    at(r1,l2)) ? loaded(r1)
  • The above example represents both the states
    where the robot is at l1 and one where it is at
    l2.
  • As opposed to STRIPS planning where a state is a
    conjunction of propositions

7
State Transitions as Propositional Formulas
  • Behavior of deterministic actions is described by
    the transition formula? S x A ? S
  • So, Figure 7.1 could be said ?(s1,
    move(r1,l1,l2)) s2
  • If s1 is represented as at(r1,l1) ? at(r1,l2)
    and s2 is represented as at(r1,l1) ? at(r1,l2),
    this does not assert that the propositional
    formulas correspond to their appropriate states.
  • This again is opposed to STRIPS planning where
    states are maintained at every step.

8
State Transitions as Propositional Formulas
(contd)
  • To assert the states for each propositional
    formula, we write it as suchat(r1,l1,s1) ?
    at(r1,l2,s1) ? at(r1,l1,s2) ? at(r1,l2,s2)
  • We can now represent that action move(r1,l1,l2)
    causes this transition move(r1,l1,l2,s1) ?
    at(r1,l1,s1) ? at(r1,l2,s1) ? at(r1,l1,s2) ?
    at(r1,l2,s2)

9
Planning Problems as Propositional Formulas
  • Encoding a planning problem to a propositional
    formula is based on two main ideas
  • Restrict the planning problem to a problem of
    finding a plan of known length n for some fixed
    n. This is called a bounded planning problem.
  • Transform the bounded planning problem into a
    satisfiability problem. Each state and action of
    the bounded planning problem is mapped to
    propositions that describe states and actions at
    each step, from step 0 (initial state) to step n
    (goal state).

10
Planning Problems as Propositional Formulas
(contd)
  • Since planning as satisfiability can only deal
    with bounded planning problems, the algorithm is
    iteratively run for different tentative lengths
    until a plan is found. (plan length is fixed at
    2,4,8, etc)
  • Uses iterative deepening.
  • Fluents instantiation of a predicate
  • States are sets of fluents.

11
Planning Problems as Propositional Formulas
(contd)
  • Constructing formulas to encode bounded planning
    problems into satisfiability problems
  • If f is a fluent at(r1,l1), we write at(r1,l1,i)
    as fi.
  • If a is this action move(r1,l1,l2), we write
    move(r1,l1,l2,i) as ai.

12
Planning Problems as Propositional Formulas
(contd)
  • Formula is built with these five kinds of sets of
    formulas
  • (1) Initial state is encoded
  • (2) The set of goal states is encoded
  • (3) An action, when applicable, has some effects
    is encoded

13
Planning Problems as Propositional Formulas
(contd)
  • (4) An action changes only the fluents that are
    in its effects.
  • Explanatory frame axioms set of propositions
    that enumerate the set of actions that could have
    occurred in order to account for a state change.
  • (5) Complete exclusion axiom only one action
    occurs at each step.
  • The propositional formula encoding the bounded
    planning problem into a satisfiability problem is
    the conjunction of all five.
  • ((1) ? (2) ? (3) ? (4) ? (5))

14
Planning as Satisfiability
  • Once the bounded planning problem is encoded to a
    satisfiability problem, a model for the resulting
    formula can be constructed by a satisfiability
    decision procedure.
  • Two most commonly used procedures
  • Davis-Putnam
  • Stochastic procedures based on the idea of
    randomized search

15
Conjunction Normal Form
  • What is CNF?
  • A conjunctive normal form (CNF) is a Boolean
    expression consisting of one or more disjunctive
    formulas connected by an AND symbol (?). A
    disjunctive formula is a collection of one or
    more (positive and negative) literals connected
    by an OR symbol (?).
  • Example
  • (a) ? ( a ? b ? c ? d) ? (c ? d) ? (d)
  • CNF-Satisfaction Give an algorithm that receives
    as input a CNF form and returns Boolean
    assignments for each literal in form such that
    form is true
  • Example (above)
  • a ? true, b ? false, c ? true, d ?
    false

Prof. Munoz-Avila
16
Davis-Putnam Procedure
  • Sound and complete
  • Sound every input formula on which it returns a
    model is satisfiable
  • Complete returns a model on every satisfiable
    input formula.
  • Soundness and completeness only hold for bounded
    planning problems.
  • These definitions differ from the sound and
    complete we learned so far in class as the
    standard definitions for STRIPS. However, based
    on the encodings, the STRIPS definitions will
    still hold for these bounded planning problems.

17
Davis-Putnam Procedure (contd)
  • Literal propositional variable (positive
    literal) or its negation (negative literal)
  • Unit Clause clause with only one literal
  • Performs a depth-first search through the space
    of all possible assignments until it finds a
    model or explores the entire search space without
    finding any.
  • Unit-Propagate eliminates in one shot all that
    can be eliminated and returns a smaller formula.
  • For any unit clause, if the literal is positive
    (negative), Unit-Propagate sets the literal to
    true (false), and simplifies called unit
    propagation.

18
Davis-Putnam Algorithm
  • Where ? is the CNF propositional
    formula, and ? is a model.

19
Davis-Putnam Example
  • Given the following propositional formula in CNF
    ? D ? (D v A v B) ? (D v A v B) ? (D v
    A v B) ? (D v A)

20
Break
21
Stochastic Procedures
  • Unlike Davis-Putnam, stochastic procedures start
    with total assignments of all variables.
  • Randomly selects an initial total assignment
    until a model is found or all possible
    assignments are exhausted.
  • Sound and complete but of no practical use.

22
Stochastic Procedures (contd)
  • Basic idea underlying a set of incomplete
    satisfiability decision procedures.
  • Blackbox includes the local-search SAT solver
    Walksat.
  • Walksat is built off of the Iterative-Repair
    algorithm.

23
Iterative-Repair
  • Iterative repair approach iteratively modifies
    the truth assignment such that it satisfies one
    of the unsatisfied clauses selected.
  • Iterative-Repair is sound and incomplete

24
Iterative Repair (contd)
  • Example
  • Given ? D ? (D v A v B) ? (D v A v B) ?
    (D v A v B) ? (D v A)
  • Initial guess ? D,A,B
  • Have to repair clause (D v A v B).
  • Modify ? to be D, A, B.
  • Now ? satisfies the propositional formula.

25
Different Encodings
  • Encodings determine the number of propositional
    variables and the number of clauses in the
    formula that is generated.
  • Efficiency of satisfiability procedure depends on
    the number of variables and clauses.
  • Two main choices for encodings
  • Encoding of actions
  • Encoding of the frame problem

26
Operator Splitting
  • Simple Operator Splitting replace each n-ary
    action ground proposition with n unary ground
    propositions.
  • Based on the idea that since only a single action
    can occur at a given step, an m-place action can
    be represented at the conjunction of m 1-place
    actions.
  • Example Encoding the action move(a,b,c) occurs
    at time 3 as a single proposition move(a,b,c,3),
    could be written as
  • source(a,3) ? object(b,3) ? destination(c,3)

27
SATPLAN
  • First planning as satisfiability planner
  • Showed that a general propositional theorem
    prover could be competitive with some of the best
    specialized planning systems.
  • First creates a CNF wff (Conjunctive Normal Form
    Well Formed Formula), then performs a search
    that is constrained by that structure.
  • Propositional structure corresponds to fixed plan
    length, and search reveals whether or not a plan
    of that length exists.

28
Graphplan Review
P0
A1
P1
B
B
C
A
Mutex list for Move(B,C,table) -Move(A,table,B) -
Move(B,C,A)
C
A
Clear(C) On(B, table) On(B, C) On(A,
B) On(A,table) Clear(B) On(B, A) Clear(A) On(C,t
able)
Move(B,C,table)
A
Clear(B) On(B, C) Clear(A) On(A,
table) On(C,table)
Mutex list for Move(A,table,B) -Move(B,C,table) -
Move(B,C,A)
B
?
C
Move(A,table,B)
Mutex list for Move(B,C,A) -Move(B,C,table) -Move
(A,table,B)
?
?
?
?
Move(B,C,A)
B
C
A
29
Blackbox
  • Blackbox Graphplan SATPLAN
  • Converts problems specified in STRIPS notation
    into Boolean satisfiability problems, then uses
    state-of-the-art satisfiability engines to solve
    the problems.
  • Very versatile you can specify which SAT engine
    to use for particular amounts of time
  • Ex you can tell it to use Graphplan for 30
    seconds, Walksat for 2 minutes, and if still no
    solution is found, then Satz for 5 minutes.

30
Blackbox (contd)
  1. A planning problem (specified in STRIPS) is
    converted to a plan graph of length k, and
    mutexes are computed as in Graphplan.
  2. The plan graph is converted to CNF wff.
  3. The wff is simplified by a general CNF
    simplification algorithm.
  4. The wff is solved by any variety of fast SAT
    engines.
  5. If a model of the wff is found, then the model is
    converted to a plan otherwise k is incremented
    and the process repeats.

31
Blackbox (contd)
Plan Graph
Mutex computation
STRIPS
Translator
CNF
Simplifier
General Stochastic / Systematic SAT engines
Solution
CNF
32
Graphplan-based Encodings
  • Translation begins at goal-layer of the graph,
    and works backwards.
  • Example using the rocket domain
  • Load(A,R,L,i) means load A into R at Location L
    at time i
  • Move(R,L,P,i) means move R from L to P at time i.
  • Translation process
  • Initial state holds at layer 1 and goals hold at
    the highest layer.
  • Operators imply their preconditions, e.g.
    Load(A,R,L,2) ? (At(A,L,1) ? At(R,L,1)
  • Each fact at level i implies the disjunction of
    all the operators at level i-1 that have it as an
    add-effect, e.g. In(A,R,3) ? (Load(A,R,L,2) v
    Load(A,R,P,2) v Maintain(In(A,R),2))
  • Conflicting actions are mutually exclusive, e.g.
    Load(A,R,L,2) v Move(R,L,P,2)

33
Translation of Plan Graph
Act1
Pre1
Fact
Pre2
Act2
  • Fact ? Act1 ? Act2
  • Act1 ? Pre1 ? Pre2
  • Act1 ? Act2

34
P0
A1
P1

B
B
C
A
Mutex list for Move(B,C,table) -Move(A,table,B) -
Move(B,C,A)
C
A
Clear(C) On(B, table) On(B, C) On(A,
B) On(A,table) Clear(B) On(B, A) Clear(A) On(C,t
able)
Move(B,C,table)
A
Clear(B) On(B, C) Clear(A) On(A,
table) On(C,table)
Mutex list for Move(A,table,B) -Move(B,C,table) -
Move(B,C,A)
B
?
C
Move(A,table,B)
Mutex list for Move(B,C,A) -Move(B,C,table) -Move
(A,table,B)
?
?
?
?
Move(B,C,A)
B
C
A
35
Blackbox Conclusions
  • The name blackbox refers to the fact that the
    plan generator knows nothing about the SAT
    solvers, and the SAT solvers know nothing about
    plans each is a "black box" to the other.
  • Blackbox is an evolving system.
  • The general goal is to unify many different
    threads of research in planning and inference by
    using propositional satisfiability as a common
    foundation.

36
Blackbox Instructions
  • Blackbox is installed on a pc in PL 250.
  • Its the computer in the middle along the back
    wall.
  • To run blackbox
  • Open a command prompt
  • cd to C\Blackbox
  • Type gtblackbox o domain.pddl f prob.pddl
  • Use blackbox help for more options

37
Blackbox Instructions (contd)
  • Blackbox takes domain and problem files in pddl
    format. (no changes should be required from the
    original STRIPS encoded files you get for your
    domains).
  • Examples files are located at C\Blackbox\Blackbox
    43\Examples
  • More information on Blackbox located here
    http//www.cs.rochester.edu/u/kautz/satplan/blackb
    ox/index.html

38
Contact Info
  • Problems or Questions about Blackbox?
  • Email me at cew305_at_lehigh.edu
Write a Comment
User Comments (0)
About PowerShow.com