Encoding Domain Knowledge in the Planning as Satisfiability Framework Bart Selman Cornell...
-
date post
21-Dec-2015 -
Category
Documents
-
view
213 -
download
1
Transcript of Encoding Domain Knowledge in the Planning as Satisfiability Framework Bart Selman Cornell...
Encoding Domain Knowledgein the Planning as Satisfiability
Framework
Encoding Domain Knowledgein the Planning as Satisfiability
Framework
Bart Selman
Cornell University
2
What is Planning?What is Planning?
Informally: 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
- scheduling problems often (near) linear, may be solvable by linear relaxation techniques
- planning problems typically highly non-linear, require combinatorial search
3
Some Applications of PlanningSome Applications of Planning
Autonomous systems
Many NASA applications:
• Deep Space One Remote Agent
• Long-range mission planning
• Communication planning & scheduling
Softbots - software robots
• Internet agents, program assistants
• AI “characters” in games, entertainment
User modeling / discourse
Synthesis, diagnosis, experiment design, bug-finding (goal = undesirable state), ...
4
A Core Computation ProblemA Core Computation Problem
Focus: Classical state-space planning, extended with parallel actions
Core problem - similar computational issues arise in many other models
• Reactive plans
• Planning with uncertainty and utilities
• Continuous processes
• Metric time
Many results directly extend to richer formalisms
5
State-space PlanningState-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
6
ParallelismParallelism
Operators may be applied in parallel when all orderings are well defined and equivalent
(Op1 || Op2)(s) = Op2(Op1(s)) = Op1(Op2(s))
A special form of non-linear plans
• Only allows parallel actions, not parallel action sequences
• Easy to serialize
7
Abdundance of Negative Complexity Results
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)
8
PracticePractice
Domain-independent planning systems 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!
9
ProgressionProgression
• 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)
• Our proposal: planning as propositional reasoning
10
ApproachApproach
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
11
SATPLANSATPLAN
axiomschemas instantiated
propositionalclauses
satisfyingmodelplan
mapping
length
problemdescription
SATengine(s)
instantiate
interpret
12
SAT EncodingsSAT 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)
13
Solution to a Planning ProblemSolution 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
14
Satisfiability Testing ProceduresSatisfiability Testing Procedures
Systematic, complete procedures• Depth-first backtrack search
(Davis, Putnam, & Loveland 1961)
– unit propagation, shortest clause heuristic
• One of the best implementations: ntab (Crawford & Auton 1997)
– see also: CSAT (Dubois), MODOC (Van Gelder)
Stochastic, incomplete procedures• Inspired by Mins-Conflict algorithm
(Adorf & Johnson 1990; Minton, Johnson, Philips, & Laird 1992)
• GSAT (Selman et. al 1993)
• Current fastest: Walksat (Selman & Kautz 1993)
– greedy local search + noise to escape local minima
15
Walksat ProcedureWalksat 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.
16
Planning Benchmark Test SetPlanning 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 83 distinct actions
Problems of this size (search space 22000) never previously handled by any state-space planning system
17
Solution of Logistics ProblemsSolution of Logistics Problems
0.01
0.1
1
10
100
1000
10000
100000
rocket.a rocket.b log.a log.b log.c log.d
log
so
luti
on
tim
e
Graphplan
ntab
walksat
18
Why SATPLAN WorksWhy SATPLAN Works
More flexible than forward or backward chaining
• Systematic: most unit propagation at most highly constrained states - bidirectional search
• Stochastic: work anywhere in plan - island search
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
19
Part II: Domain Dependent PlanningPart II: Domain Dependent Planning
SATPLAN has pushed the exponential curve by efficient representations and stochastic search engines
Ways to further improvement:
• Better general search algorithms
• Incorporate (more) domain dependent knowledge
20
Kinds of KnowledgeKinds 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
21
Expressing KnowledgeExpressing Knowledge
Such information is traditionally incorporated in the planning algorithm itself
– or in a special programming language
Instead: we propose expressing as 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
NOT logic programming!
22
Logical Status of HeuristicsLogical 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
23
Axiomatic FormAxiomatic 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)
24
How to Generate HeuristicsHow to Generate Heuristics
Introspection• Traditional method• Try to capture “obvious” inferences that are hard to
deduce (McAllester 1993)
Compilation• Fix operators and initial or goal state, generate
tractable equivalent theory• In worse case, tractable theory is exponentially large
(Kautz & Selman 1991)
– but can be efficient in practice in some domains! (Williams and Nayak 1997)
Induction / learning• Find symmetries in instance or operator schema
(Joslin & Roy 1997)
25
Logistics Heuristic AxiomsLogistics Heuristic Axioms
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
26
QuestionsQuestions
Does it work?
• Additional axioms might just blow up instance with redundant information
Is effect independent of search engine?
• Simplifying assumptions might hurt stochastic methods by reducing solution density
Can we predict the most useful level of heuristic axioms?
• What is relation of difficulty to problem size?
27
logistics size in variableslogistics size in variables
500
600
700
800
900
1000
1100
1200
none h1 h2 h3 h4
nu
mb
er
of
va
ria
lbe
s
log.a
log.b
log.c
28
logistics size in clauseslogistics size in clauses
4000
6000
8000
10000
12000
14000
16000
none h1 h2 h3 h4
nu
mb
er
of
cla
us
es
log.a
log.b
log.c
29
walksat solution of logisticswalksat solution of logistics
0
1
2
3
4
5
6
7
none h1 h2 h3 h4
no
rmal
ized
so
luti
on
tim
e
log.a
log.b
log.c
log.d
30
ntab solution of logisticsntab solution of logistics
0.1
1
10
100
1000
10000
100000
none h1 h2 h3 h4
log
no
rma
lize
d s
olu
tio
n t
ime
log.a
log.b
log.c
31
AnswersAnswers
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)
• BUT larger simplified instances still easier than “no heuristic” case
32
SummarySummary
Easy to encode domain-specific knowledge in the planning as satisfiablity frame
• Key to next order-of-magnitude scaling
Purely declarative assertions• Not logic programming!
Makes clear logical status of different heuristics• invariants, optimality, simplifying
• entailed admissible
Heuristics are independent from the SAT engine• Can use same axioms for radically different
problem solvers
33
Summary (continued)Summary (continued)
Dramatic speedup possible
• Stochastic: speedup 6X - 10X
• Systematic: speedup 100X +
For largest, hardest problems, additional domain knowledge allows systematic solvers to become competitive -
but still dominated by stochastic approach
34
Logistics Best Solution TimesLogistics Best Solution Times
0.01
0.1
1
10
100
1000
10000
100000
log.a log.b log.c log.d
log
so
luti
on
tim
e
walksat
ntab
satz
35
Current & Future WorkCurrent & Future Work
Better search engines for structured SAT problems
• Satz (Chu Min Li 1997)
– systematic search with a powerful variable selection heuristic
– Preliminary experiments: can solve many planning problems with little or no backtracking
– Complex interaction between heuristic axioms and heuristics in solver (can be misled)
• Self-tuning Walksat– Can enhance performance of walksat by more
precisely setting noise parameter
– Employ statistical techniques for finding optimal setting before problem instance is solved (McAllester, Selman & Kautz 1997)
36
Current & Future Work (continued)
Current & Future Work (continued)
Understanding shape of local search space• Analysis for random 3SAT
(Frank, Cheeseman, & Stutz 1997)
• How compare with space generated by planning problems?
• How do heuristic axioms change the space?
Automatic generation of heuristic axioms• Exact compilation (Williams & Nayak 1997)
• Approximate compilation (Kautz & Selman 1996)
• Induction of state invariants