1 / 38

Planning as Satisfiability with Blackbox

Planning as Satisfiability with 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. Introduction.

newberg
Télécharger la présentation

Planning as Satisfiability with Blackbox

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. Planning as Satisfiability

  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. Planning as Satisfiability

  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. Planning as Satisfiability

  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. Planning as Satisfiability

  6. States as Propositional Formulas (cont’d) • 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 Planning as Satisfiability

  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 • Ifs1 is represented asat(r1,l1)  ¬at(r1,l2) and s2 is represented as ¬at(r1,l1)  at(r1,l2), thisdoes 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. Planning as Satisfiability

  8. State Transitions as Propositional Formulas (cont’d) • To assert the states for each propositional formula, we write it as such:at(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) Planning as Satisfiability

  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). Planning as Satisfiability

  10. Planning Problems as Propositional Formulas (cont’d) • 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. Planning as Satisfiability

  11. Planning Problems as Propositional Formulas (cont’d) • 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. Planning as Satisfiability

  12. Planning Problems as Propositional Formulas (cont’d) • 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 Planning as Satisfiability

  13. Planning Problems as Propositional Formulas (cont’d) (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)) Planning as Satisfiability

  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 Planning as Satisfiability

  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 Planning as Satisfiability

  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. Planning as Satisfiability

  17. Davis-Putnam Procedure (cont’d) • 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. Planning as Satisfiability

  18. Davis-Putnam Algorithm Where  is the CNF propositional formula, and  is a model. Planning as Satisfiability

  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) Planning as Satisfiability

  20. Break Planning as Satisfiability

  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. Planning as Satisfiability

  22. Stochastic Procedures (cont’d) • 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. Planning as Satisfiability

  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 Planning as Satisfiability

  24. Iterative Repair (cont’d) • 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. Planning as Satisfiability

  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 Planning as Satisfiability

  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) Planning as Satisfiability

  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. Planning as Satisfiability

  28. P0 A1 P1 Graphplan Review B A B C 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,table) 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 Planning as Satisfiability

  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. Planning as Satisfiability

  30. Blackbox (cont’d) • A planning problem (specified in STRIPS) is converted to a plan graph of length k, and mutexes are computed as in Graphplan. • The plan graph is converted to CNF wff. • The wff is simplified by a general CNF simplification algorithm. • The wff is solved by any variety of fast SAT engines. • If a model of the wff is found, then the model is converted to a plan; otherwise k is incremented and the process repeats. Planning as Satisfiability

  31. Blackbox (cont’d) Mutex computation Plan Graph STRIPS Translator CNF Simplifier General Stochastic / Systematic SAT engines Solution CNF Planning as Satisfiability

  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) Planning as Satisfiability

  33. Translation of Plan Graph Pre1 Act1 Fact Pre2 Act2 • Fact  Act1  Act2 • Act1  Pre1  Pre2 • ¬Act1  ¬Act2 Planning as Satisfiability

  34. P0 A1 P1 B A B C 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,table) 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 Planning as Satisfiability

  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. Planning as Satisfiability

  36. Blackbox Instructions • Blackbox is installed on a pc in PL 250. • It’s the computer in the middle along the back wall. • To run blackbox: • Open a command prompt • cd to C:\Blackbox • Type >blackbox –o domain.pddl –f prob.pddl • Use blackbox –help for more options Planning as Satisfiability

  37. Blackbox Instructions (cont’d) • 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\Blackbox43\Examples • More information on Blackbox located here: http://www.cs.rochester.edu/u/kautz/satplan/blackbox/index.html Planning as Satisfiability

  38. Contact Info • Problems or Questions about Blackbox? • Email me at cew305@lehigh.edu Planning as Satisfiability

More Related