Planning as Propositional Satisfiabililty Brian C. Williams Oct. 30 th, 2002 16.412J/6.834J GSAT, Graphplan and WalkSAT Based on slides from Bart Selman.

Slides:



Advertisements
Similar presentations
Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
Advertisements

CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
SAT-Based Planning Using Propositional SAT- Solvers to Search for Plans.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Planning with Constraints Graphplan & SATplan Yongmei Shi.
1 Planning as X X  {SAT, CSP, ILP, …} José Luis Ambite* [* Some slides are taken from presentations by Kautz, Selman, Weld, and Kambhampati. Please visit.
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.
1 Planning. R. Dearden 2007/8 Exam Format  4 questions You must do all questions There is choice within some of the questions  Learning Outcomes: 1.Explain.
1 BLACKBOX: A New Paradigm for Planning Bart Selman Cornell University.
Encoding Domain Knowledge in the Planning as Satisfiability Framework Bart Selman Cornell University.
1 Compute-Intensive Methods in AI: New Opportunities for Reasoning and Search Bart Selman Cornell University
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
1 BLACKBOX: A New Approach to the Application of Theorem Proving to Problem Solving Bart Selman Cornell University Joint work with Henry Kautz AT&T Labs.
Knowledge Representation II (Inference in Propositional Logic) CSE 473.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
GRASP: A Search Algorithm for Propositional Satisfiability EE878C Homework #2 2002/11/1 KAIST, EECS ICS Lab Lee, Dongsoo.
3/19/2003copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams November 22 nd, 2004.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
Planning as Satisfiability CS Outline 0. Overview of Planning 1. Modeling and Solving Planning Problems as SAT - SATPLAN 2. Improved Encodings using.
The Role of Domain-Specific Knowledge in the Planning as Satisfiability Framework Henry Kautz AT&T Labs Bart Selman Cornell University.
Logical Foundations of AI Planning as Satisfiability Clause Learning Backdoors to Hardness Henry Kautz.
Boolean Satisfiability and SAT Solvers
Performing Bayesian Inference by Weighted Model Counting Tian Sang, Paul Beame, and Henry Kautz Department of Computer Science & Engineering University.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
1 Chapter 7 Propositional Satisfiability Techniques.
1 Planning as Satisfiability Alan Fern * * Based in part on slides by Stuart Russell and Dana Nau  Review of propositional logic (see chapter 7)  Planning.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams /6.834 October 7 th, 2002.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Open-Loop Planning as Satisfiability Henry Kautz AT&T Labs.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
CS 5411 Compilation Approaches to AI Planning 1 José Luis Ambite* Some slides are taken from presentations by Kautz and Selman. Please visit their.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© Daniel S. Weld 1 Logistics Problem Set 2 Due Wed A few KR problems Robocode 1.Form teams of 2 people 2.Write design document.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Graphplan Based on slides by: Ambite, Blyth and.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Planning 2 (SATPLAN) CSE 573. © Daniel S. Weld 2 Ways to make “plans” Generative Planning Reason from first principles (knowledge of actions) Requires.
Graphplan CSE 574 April 4, 2003 Dan Weld. Schedule BASICS Intro Graphplan SATplan State-space Refinement SPEEDUP EBL & DDB Heuristic Gen TEMPORAL Partial-O.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
AAAI of 20 Deconstructing Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.
Local Search Methods for SAT Geoffrey Levine March 11, 2004.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Heuristic Search Planners. 2 USC INFORMATION SCIENCES INSTITUTE Planning as heuristic search Use standard search techniques, e.g. A*, best-first, hill-climbing.
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
Planning as Satisfiability
Planning as Search State Space Plan Space Algorihtm Progression
The Propositional Calculus
Class #17 – Thursday, October 27
Planning as Satisfiability with Blackbox
Graphplan/ SATPlan Chapter
Planning as Satisfiability
ECE 667 Synthesis and Verification of Digital Circuits
Compute-Intensive Methods in AI: New Opportunities for Reasoning and Search Bart Selman Cornell University 1 1.
Class #19 – Monday, November 3
Combinatorial Problems I: Finding Solutions
Methods of Proof Chapter 7, second half.
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
[* based in part on slides by Jim Blythe and Dan Weld]
Presentation transcript:

Planning as Propositional Satisfiabililty Brian C. Williams Oct. 30 th, J/6.834J GSAT, Graphplan and WalkSAT Based on slides from Bart Selman & Henry Kautz

Outline  Planning as local search  Fast state-space planning using Sat

GSAT Example  C1: Not A or B  C2: Not C or Not A  C3: or B or Not C C1, C2, C3 violated A True B False C True C3 violated False C2 violated True C1 violated False 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

GSAT Example  C1: Not A or B  C2: Not C or Not A  C3: or B or Not C C1 violated A True B False C Satisfied False Satisfied True C1,C2,C3 violated True 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

GSAT Example  C1: Not A or B  C2: Not C or Not A  C3: or B or Not C Satisfied A True B C False 1.Pick random assignment 2.Check effect of flipping each assignment, counting violated clauses 3.Pick assignment with fewest violations.

Review Satisfiability Testing Procedures  Reduce to CNF (Clausal Form) then:  Systematic, complete procedures  Depth-first backtrack search (Davis, Putnam, & Loveland 1961)  unit propagation, shortest clause heuristic  State-of-the-art implementations:  ntab (Crawford & Auton 1997)  itms (Nayak & Williams 1997)  many others! See SATLIB 1998 / Hoos & Stutzle  Stochastic, incomplete procedures  GSAT (Selman et. al 1993)  Walksat (Selman & Kautz 1993)  greedy local search + noise to escape local minima

Outline  Satisfiability as Local Search  Fast state-space planning using Sat  Direct encoding (Sat Plan)  Graphplan encoding (Blackbox)

SATPLAN axiom schemas instantiated propositional clauses satisfying model plan mapping length problem description SAT engine(s) instantiate interpret

Approach  Design SAT encodings so that plans correspond to satisfying assignments  Use recent efficient satisfiability procedures (systematic and stochastic) to solve  Evaluate performance on benchmark instances

SAT Encodings  Propositional CNF: no variables or quantifiers  Sets of clauses specified by axiom schemas  fully instantiated before problem-solving  Discrete time, modeled by integers  state predicates: indexed by time at which they hold  action predicates: indexed by time at which action begins  each action takes 1 time step  many actions may occur at the same step

Encoding Conventions  Actions imply preconditions and effects fly(x,y,i)  at(x,i) & route(x,y) & at(y,i+1)  Conflicting actions cannot occur at same time (A deletes a precondition of B) fly(x,y,i) & y  z   fly(x,z,i)  If something changes, an action must have caused it (Explanatory Frame Axioms) at(x,i) &  at(x,i+1)   y. route(x,y) & fly(x,y,i)  Initial and final states hold at(NY,0) &... & at(LA,9) &...

Modeling Tricks  Can often dramatically reduce size of problem by modeling techniques move(x,y,z,i) requires n 4 vars pickup(x,y,i), putdown(x,z,i) requires 2n 3 vars  State-based encodings: eliminate all action variables (“compile away”) at(x,i)  at(x,i+1)   y. route(x,y) & at(y,i+1) at(x,i) & x  y   at(y,i)

Solution to a Planning Problem  A solution is specified by any model (satisfying truth assignment) of the conjunction of the axioms describing the initial state, goal state, and operators  Easy to convert back to a STRIPS-style plan

SAT Algorithms  Systematic Search  DP (Davis Putnam Logemann Loveland) backtrack search + unit propagation  satz (Chu Min Li) - variable selection by forward checking: max unit props  relsat (Bayardo) - dependency directed backtracking: add new clauses at dead-ends  Local Search  Inspired by Mins-Conflict algorithm (Adorf, Johnson, Minton, Philips, & Laird)  GSAT (Selman), Walksat (Selman, Kautz & Cohen) greedy local search + noise to escape minima

Planning Benchmark Test Set  Extension of Graphplan test set  blocks world - up to 18 blocks, states  logistics - complex, highly-parallel transportation domain. Logistics.d:  2,165 possible actions per time slot  legal configurations ( states)  optimal solution contains 74 distinct actions over 14 time slots  Problems of this size never previously handled by state-space planning systems

Scaling Up Logistics Planning

Unpredictability of Systematic Search

Randomized Restarts  Solution: randomize the systematic solver  Add noise to the heuristic branching (variable choice) function  Cutoff and restart search after a fixed number of backtracks  In practice: rapid restarts with low cutoff can dramatically improve performance  (Gomes 1996, Gomes, Kautz, and Selman 1997, 1998)

Increased Predictability

What SATPLAN Shows  General propositional theorem provers can compete with state of the art specialized planning systems  New, highly tuned variations of DP surprisingly powerful  result of sharing ideas and code in large SAT/CSP research community  specialized engines can catch up, but by then new general techniques  Radically new stochastic approaches to SAT can provide very low exponential scaling  2+ orders magnitude speedup on hard benchmark problems

Why SATPLAN Works  More flexible than forward or backward chaining  Systematic: most unit propagation at most highly constrained states  Stochastic: iterative repair  Space for time tradeoff  Less overhead since does not have to instantiate variable during search  Randomized algorithms less likely to get trapped along bad paths

Outline  Satisfiability as Local Search  Fast state-space planning using Sat  Direct encoding (Sat Plan)  Graphplan encoding (Blackbox)

Graphplan  Planning as graph search (Blum & Furst 1995) Set new paradigm for planning  Like SATPLAN...  Two phases: instantiation of propositional structure, followed by search  Unlike SATPLAN...  Interleaves instantiation and pruning of plan graph  Employs specialized search engine  Graphplan - better instantiation  SATPLAN - better search

Blackbox STRIPS Plan Graph Mutex computation CNF General Stochastic / Systematic SAT engines Solution Simplifier Translator CNF

The Plan Graph Facts Actions... Facts Actions... preconditionsadd effects mutually exclusive delete effects

Graph Pruning  Graphplan instantiates in a forward direction, pruning unreachable nodes  conflicting actions are mutex  if all actions that add two facts are mutex, the facts are mutex  if the preconditions for an action are mutex, the action is unreachable!  In logical terms: limited application of negative binary propagation  given:  P V  Q, P V R V S V...  infer:  Q V R V S V...

Bridging Paradigms  Both SATPLAN and Graphplan are disjunctive planners (Kambhampati 1996) Can the best features of each be combined?  IJCAI Challenge in Bridging Plan Synthesis Paradigms (Kambhampati 1997)  Our response: blackbox

Translation of Plan Graph  Fact  Act1  Act2  Act1  Pre1  Pre2  ¬Act1  ¬Act2 Act1 Act2 Fact Pre1 Pre2

Improved Encodings  Translations of Logistics.a:  STRIPS  Axiom Schemas  SAT (Medic system, Weld et. al 1997)  3,510 variables, 16,168 clauses  24 hours to solve  STRIPS  Plan Graph  SAT  2,709 variables, 27,522 clauses  5 seconds to solve!

Limited Inference  SATPLAN used only a single general theorem-prover  What role can limited (polytime) reasoning algorithms play?  Two kinds of limited deduction  Planning specific (mutex computation)  General polytime simplification  apply to all CNF formulas, may or may not be designed with planning in mind

General Limited Inference  Generated wff can be further simplified by consistency propagation techniques  Compact (Crawford & Auton 1996)  unit propagation: is Wff inconsistent by resolution against unit clauses? O(n)  failed literal rule: is Wff + { P } inconsistent by unit propagation? O(n 2 )  binary failed literal rule: is Wff + { P V Q } inconsistent by unit propagation? O(n 3 )

General Limited Inference

Intuition  Many real-world problems not tractable, but are nearly so  polytime inference takes advantage of special kinds of structure  structure may be visible at the level of a domain specific representation, or only after the problem is encoded  small numbers of practical methods for combinatorial core  can be highly optimized

Blackbox Results

Staged Inference Domain specific model Polytime domain specific inference General language encoding Full general inference (NP complete) Solution Polytime general inference Abstract problem specification Encoding scheme Combinatorial CORE

Conclusions  Propositional approaches to Open-Loop planning using general SAT engines are highly competitive with specialized planning algorithms  Synergy with Plan Graph approaches  Biggest limitation: domains where number of objects is too large to instantiate