1 Compute-Intensive Methods in AI: New Opportunities for Reasoning and Search Bart Selman Cornell University

Slides:



Advertisements
Similar presentations
SAT-Based Planning Using Propositional SAT- Solvers to Search for Plans.
Advertisements

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
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.
1 Backdoor Sets in SAT Instances Ryan Williams Carnegie Mellon University Joint work in IJCAI03 with: Carla Gomes and Bart Selman Cornell University.
Dynamic Restarts Optimal Randomized Restart Policies with Observation Henry Kautz, Eric Horvitz, Yongshao Ruan, Carla Gomes and Bart Selman.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Statistical Regimes Across Constrainedness Regions Carla P. Gomes, Cesar Fernandez Bart Selman, and Christian Bessiere Cornell University Universitat de.
CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman
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.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
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 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…
1 Understanding Problem Hardness: Recent Developments and Directions Bart Selman Cornell University.
Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University, USA SAT 2010 Conference Edinburgh, July 2010 An Empirical Study of Optimal Noise and Runtime.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
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]
Relaxed DPLL Search for MaxSAT (short paper) Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University SAT-09 Conference Swansea, U.K. July 3, 2009.
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
Planning as Satisfiability CS Outline 0. Overview of Planning 1. Modeling and Solving Planning Problems as SAT - SATPLAN 2. Improved Encodings using.
Scalable Knowledge Representation and Reasoning Systems Henry Kautz AT&T Shannon Laboratories.
The Role of Domain-Specific Knowledge in the Planning as Satisfiability Framework Henry Kautz AT&T Labs Bart Selman Cornell University.
Satisfiability and State- Transition Systems: An AI Perspective Henry Kautz University of Washington.
Boolean Satisfiability and SAT Solvers
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
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.
1 The LPSAT Engine and its Application to Metric Planning Steve Wolfman University of Washington CS&E Advisor: Dan Weld.
Open-Loop Planning as Satisfiability Henry Kautz AT&T Labs.
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
Planning as Propositional Satisfiabililty Brian C. Williams Oct. 30 th, J/6.834J GSAT, Graphplan and WalkSAT Based on slides from Bart Selman.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
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)
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
© 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.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla P. Gomes and Bart Selman Cornell University Muri Meeting June 2002.
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
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.
Lecture 8 Randomized Search Algorithms Part I: Backtrack Search CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.
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:
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Inference in Propositional Logic (and Intro to SAT)
CS 4700: Foundations of Artificial Intelligence
Planning as Satisfiability
Planning as Search State Space Plan Space Algorihtm Progression
Emergence of Intelligent Machines: Challenges and Opportunities
Compute-Intensive Methods in AI: New Opportunities for Reasoning and Search Bart Selman Cornell University 1 1.
Methods of Proof Chapter 7, second half.
Presentation transcript:

1 Compute-Intensive Methods in AI: New Opportunities for Reasoning and Search Bart Selman Cornell University

2 Introduction In recent years, we’ve seen substantial progress in propositional reasoning and search methods. Boolean satisfiability testing: 1990: 100 variables / 200 clauses (constraints) 1998: 10, ,000 vars / 10^6 clauses Novel applications: e.g. in planning, software / circuit testing, machine learning, and protein folding

3 Factors in Progress a) new algorithms e.g. stochastic methods b) better implementations several competitions --- Germany 91 / China 96 / DIMACS-93/97/98 c) faster hardware Also, close interplay between theoretical, experimental, and applied work.

4 Applications: Methodology Combinatorial Task SAT Encoding SAT Solver Decoder Shift work to “encoding phase’’, use fast, off-the-shelf SAT solver and tools.

5 Compare methodology to the use of Linear / Integer Programming packages: --- Emphasis is on mathematical modeling (e.g. using primal and dual formulations). --- After modeling phase, problem is handed to a state-of-the-art solver.

6 Perhaps theoretically, but often not in practice --- It’s difficult to duplicate efforts put in designing fast solvers. --- Encodings can compensate for much of the loss due to going to a uniform representation formalism (e.g. SAT, CSP, LP, or MIP). Would specialized solver not be better?

7 Outline I --- Example application: AI Planning The SATPLAN system II --- Current Themes in SAT Solvers randomization / scalability III --- Current Themes in SAT Encodings declarative control knowledge IV --- Conclusions

8 I. Example Application: Planning

9 Planning: find a (partially) ordered set of actions that transform a given initial state to a specified goal state. in most general case, can cover most forms of problem solving special case of program synthesis scheduling: fixes set of actions, need to find optimal total ordering - planning problems typically highly non-linear, require combinatorial search

10 Some Applications of Planning Autonomous systems Deep Space One Remote Agent (NASA) mission planning Softbots - software robots Internet agents, program assistants AI “characters” in games, entertainment Synthesis, bug-finding (goal = undesirable state), … Supply Chain Management --- “just-in-time” manufacturing (SAP, I2, PeopleSoft etc. $10 billion) Proof planning in mathematical domains (Melis 1998 )

11 State-space Planning Find a sequence of operators that transform an initial state to a goal state State = complete truth assignment to a set of variables (fluents) Goal = partial truth assignment (set of states) Operator = a partial function State  State specified by three sets of variables: precondition, add list, delete list (STRIPS-style, Nilsson & Fikes 1971)

12 Abdundance of Negative Complexity Results I. Domain-independent planning: PSPACE- complete or worse (Chapman 1987; Bylander 1991; Backstrom 1993) II. Domain-dependent planning: NP-complete or worse (Chenoweth 1991; Gupta and Nau 1992) III. Approximate planning: NP-complete or worse (Selman 1994)

13 Practice Traditional domain-independent planners can generate plans of only a few steps. Prodigy, Nonlin, UCPOP,... Practical systems minimize or eliminate search by employing complex search control rules, hand-tailored to the search engine and the particular search space (Sacerdoti 1975, Slaney 1996, Bacchus 1996) pre-compiling entire state-space to a reactive finite-state machine (Agre & Chapman 1997, Williams & Nayak 1997) Scaling remains problematic when state space is large or not well understood!

14 Progression Planning as first-order theorem proving (Green 1969) computationally infeasible STRIPS (Fikes & Nilsson 1971) very hard Partial-order planning (Tate 1977, McAllester 1991, Smith & Peot 1993) can be more efficient, but still hard (Minton, Bresina, & Drummond 1994) Proposal: planning as propositional reasoning

15 Approach SAT encodings are designed so that plans correspond to satisfying assignments Use recent efficient satisfiability procedures (systematic and stochastic) to solve Evaluation performance on benchmark instances

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

17 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 fly(Plane, City1, City2, i)  at(Plane, City2, i +1)

18 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

19 Satisfiability Testing Procedures Systematic, complete procedures Depth-first backtrack search (Davis, Putnam, & Loveland 1961) unit propagation, shortest clause heuristic State-of-the-art implementation: ntab (Crawford & Auton 1997) and many others! See SATLIB 1998 / Hoos & Stutzle. Stochastic, incomplete procedures GSAT (Selman et. al 1993) Current fastest: Walksat (Selman & Kautz 1993) greedy local search + noise to escape local minima

20 Walksat Procedure Start with random initial assignment. Pick a random unsatisfied clause. Select and flip a variable from that clause: With probability p, pick a random variable. With probability 1-p, pick greedily a variable that minimizes the number of unsatisfied clauses Repeat to predefined maximum number flips; if no solution found, restart.

21 Planning Benchmark Test Set Extension of Graphplan benchmark set Graphplan faster than UCPOP (Weld 1992) and Prodigy (Carbonell 1992) on blocks world and rocket domains logistics - complex, highly-parallel transportation domain, ranging up to 14 time slots, unlimited parallelism 2,165 possible actions per time slot optimal solutions containing 150 distinct actions Problems of this size (10^18 configurations) not previously handled by any state-space planning system

22 Solution of Logistics Problems rocket.arocket.blog.alog.blog.clog.d log solution time Graphplan ntab walksat

23 What SATPLAN Shows A general propositional theorem prover can be competitive with specialized planning systems Surpise: “Search direction” does not appear to matter. (Traditional planners generally backward chain from goal state.) Fast SAT engines stochastic search - walksat large SAT/CSP community sharing ideas and code specialized engines can catch up, but by then, new general technique

24 II. Current Themes in Sat Solvers

25 SAT Solvers Stochastic local search solvers (walksat) when they work, scale well cannot show unsat fail on certain domains must use very simple (fast) heuristics Systematic solvers (Davis Putnam Loveland style) complete fail on (often different) domains might use more sophisticated (costly) heuristics often to scale badly Can we combine best features of each approach?

26 Background Combinatorial search methods often exhibit a remarkable variability in performance. It is common to observe significant differences between: - different heuristics - same heuristic on different instances - different runs of same heuristic with different seeds (stochastic methods)

27 Preview of Strategy We’ll put variability / unpredictability to our advantage via randomization / averaging.

28 Cost Distributions Backtrack-style search (e.g. Davis- Putnam) characterized by: I Erratic behavior of mean. II Distributions have “heavy tails”.

29

30

31

32 Heavy-Tailed Distributions … infinite variance … infinite mean Introduced by Pareto in the 1920’s --- “probabilistic curiosity.” Mandelbrot established the use of heavy-tailed distributions to model real-world fractal phenomena. Examples: stock-market, earth- quakes, weather,...

33 Decay of Distributions Standard --- Exponential Decay e.g. Normal: Heavy-Tailed --- Power Law Decay e.g. Pareto-Levy:

34 Standard Distribution (finite mean & variance) Power Law Decay Exponential Decay

35 How to Check for “Heavy Tails”? Log-Log plot of tail of distribution should be approximately linear. Slope gives value of infinite mean and infinite variance infinite mean and infinite variance infinite variance infinite variance

36

37

38 Heavy Tails Bad scaling of systematic solvers can be caused by heavy tailed distributions Deterministic algorithms get stuck on particular instances but that same instance might be easy for a different deterministic algorithm! Expected (mean) solution time increases without limit over large distributions

39 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 Provably Eliminates heavy tails In practice: rapid restarts with low cutoff can dramatically improve performance (Gomes and Selman 1997, 1998)

40 Rapid Restart on LOG.D Note Log Scale: Exponential speedup!

41 SATPLAN Results

42 Overall insight: Randomized tie-breaking with rapid restarts gives powerful bactrack-style search strategy. (sequential / interleaved / parallel) Related analysis: Luby & Zuckerman 1993; Alt & Karp 1996.

43 Heavy-Tailed Distributions in Other Domains Quasigroup Completion Problem Graph Coloring Logistic Planning Circuit Synthesis Gomes, Selman, and Crato Proc. CP97; Gomes, Selman, McAloon, and Tretkoff Proc AIPS98; Gomes, Kautz, and Selman Proc. AAAI98.

44 Deterministic Logistics Planning108 mins.95 sec. Scheduling sec250 sec (*) not found after 2 days Scheduling 16---(*)1.4 hours Scheduling (*)~18 hrs Circuit Synthesis 1---(*)165sec. Circuit Synthesis 2---(*)17min. Sample Results Random Restarts R 3 Gomes, Kautz, Selman 1998

45 SAT Solvers: Themes, cont. Randomization (as discussed) Hybrid solvers --- Algorithm Portfolios (Hogg & Hubermann 1997; Gomes & Selman 1997) Using LP relaxations (Warners & van Maaren 1998) Between 2SAT / 3SAT: Mixture can behave as pure 2SAT! (Kirkpatrick, Selman, et al / 1998)

46

47

48 SAT Solvers: Recent Theory Minimal size of search tree (Beame, Karp, et al. 1998) Better worst-case: less than O(2^n) backtrack style: O(2^(0.387n)) (Schiermeyer 1997; Paturi, et al. 1998) local search: O(2^(c.n)) with c < 1 (Hirsch, 1998)

49 IV. Current Themes in Encodings

50 Add Declarative Domain Knowledge Efficient representations and (randomized) SAT engines extend the range of domain- independent planning Ways for further improvement: Better general search algorithms Incorporate (more) domain dependent knowledge

51 Kinds of Knowledge * About domain itself a truck is only in one location airplanes are always at some airport * About good plans do not remove a package from its destination location do not unload a package and immediate load it again X About how to search plan air routes before land routes work on hardest goals first

52 Expressing Knowledge Such information is traditionally incorporated in the planning algorithm itself or in a special programming language Instead: use additional declarative axioms Problem instance: operator axioms + initial and goal axioms + heuristic axioms Domain knowledge  constraints on search and solution spaces Independent of any search engine strategy

53 Logical Status of Heuristics 1. Entailed by operator axioms: conflicts and derived effects fly(plane,d1,i) and fly(plane,d2,i) conflict 2. Entailed by operators + initial state axioms: state invariants a truck is at only one location 3. Entailed by operators + initial + goal + length: optimality conditions do not return a package to a location 4. New constraints on problem instance: simplifying assumptions Once a truck is loaded, it should immediately move

54 Axiomatic Form Invariant: A truck is at only one location at(truck,loc1,i) & loc1  loc2   at(truck,loc2,i) Optimality: Do not return a package to a location at(pkg,loc,i) &  at(pkg,loc,i+1) & i<j   at(pkg,loc,j) Simplifying: Once a truck is loaded, it should immediately move  in(pkg,truck,i) & in(pkg,truck,i+1) & at(truck,loc,i+1)   at(truck,loc,i+2)

55 Questions Does it work? Additional axioms might just blow up instance with redundant information Is effect independent of search engine? Can we predict the most useful level of heuristic axioms? What is relation of difficulty to problem size?

56 Experiment: Logistics h1: Optimality conditions Once a package leaves a location, it never returns h2, h3: Simplifying assumptions A package is never in any city other than its origin or destination cities rules out solutions where packages are transferred between airplanes in an intermediate city Once a vehicle is loaded, it should immediately move rules out solutions where vehicles are loaded incrementally h4: More optimality conditions A package never leaves its destination city

57 ntab solution of logistics

58 Answers Does it work? YES, 10 to 100+ times speedup Is effect independent of search engine? YES, same heuristics best for systematic and stochastic engines --- but needs more investigation Can we predict the most useful level of heuristic axioms? USUALLY point at which problem size is minimized after simplification by unit propagation (40% - 70% reduction)

59 How to Generate Control Knowledge --- Automatically Polytime preprocessing Try to add “obvious” inferences (McAllester, Crawford) Compilation Fix operators and initial or goal state, generate tractable equivalent theory (Kautz & Selman) Learning strategies (Minton, Kambhampati, Etzioni, Weld, Smith) Use automatic type inference to derive invariants. (Fox & Long --- STAN system 1998; Rintanen 1998; Koehler & Nebel --- IPP system 1998)

60 Encodings: Themes cont. Add declarative control knowledge (as discussed) Robustness Small change in original formulation, small change in encoding. Add numeric information / “soft constraints” Weighted MAXSAT? More compact encodings. E.g. causal.

61 Conclusions Discussed current state-of-the-art in propositional reasoning and search. Shift to 10,000+ variables and 10^6 clauses has opened up new applications. Methodology: Find compact SAT encoding; Use off-the-shelf SAT Solver. Analogous to LP and MIP approaches.

62 Conclusions, cont. Example: AI planning / SATPLAN system One order of magnitude improvement (last 3yrs): 10 step to 200 step plans Need two more: up to 20,000 step... Discussed themes in SAT Sovers / Encodings Heavy-tails / Randomization / Declarative domain knowledge