Top Banner
CSE 573 1 Lecture 21 State-Space Search vs. Constraint-Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001
21

CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 1

Lecture 21State-Space Search vs. Constraint-

Based Planning

Lecture 21State-Space Search vs. Constraint-

Based Planning

CSE 573

Artificial Intelligence I

Henry Kautz

Fall 2001

Page 2: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 2

Road MapRoad Map

• Today

• Plan graphs

• Planning as state space search

• Comparison of the two approaches

Page 3: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 3

GraphplanGraphplan

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

Page 4: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 4

Graph PruningGraph 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 resolution where one clause is negative binary• given: P V Q, P V R V S V ...• infer: Q V R V S V ...

Page 5: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 5

The Plan GraphThe Plan Graph

Facts FactsActions

... ...

Facts FactsActions

... ...

preconditions

mutually exclusive

add effects

delete effects

Page 6: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 6

The Plan GraphThe Plan Graph

Facts FactsActions

... ...

Facts FactsActions

... ...

preconditions

Page 7: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 7

The Plan GraphThe Plan Graph

Facts FactsActions

... ...

Facts FactsActions

... ...

preconditions add effects

delete effects

Page 8: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 8

Translation of Plan GraphTranslation of Plan Graph

Fact Act1 Act2

Act1 Pre1 Pre2

¬Act1 ¬Act2

Act1

Act2

Fact

Pre1

Pre2

Page 9: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 9

Improved EncodingsImproved 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(Blackbox)

• 2,709 variables, 27,522 clauses

• 5 seconds to solve!

Page 10: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 10

Blackbox = Reachability + Satisfiability

Blackbox = Reachability + Satisfiability

• Blackbox Planner (Kautz 1997) uses the first part of Graphplan (reachability analysis) to determine which propositions to instantiate

• Then formula is generated (up to a bounded length K) and checked for SAT

– can specify Walksat, various kinds of DP

– current best: CHAFF (version DP)

– can also run Graphplan on reachability graph for a few seconds to catch “easy” cases

• If a solution found, then model is translated back to a parallel plan

• Else max length K is incremented, and repeat

Page 11: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 11

Results: Logistics PlanningResults: Logistics Planning

> 24 hours28 seclogistics.d

> 24 hours9 seclogistics.c

13 minutes7 seclogistics.b

31 minutes5 seclogistics.a

55 sec5 secrocket.b

GraphplanBlackbox

Page 12: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 12

How Well Does it Work?How Well Does it Work?

1992 – first incarnation of SATPLAN (Kautz & Selman), competitive with other planners (UCPOP) at the time

1995 – Graphplan (Blum & Furst) best planning algorithm– Constraint-satisfaction style solver, but no explicit

translation to SAT– Blew everything previous out of the water!

1996 – SATPLAN with new SAT solvers (walksat+new local search heuristics, satz-rand, etc.)

– competitive with Graphplan – sometimes much faster – but requires hand-written axioms

1998 – Debut of Blackbox– Generates axioms automatically from STRIPS operators– Beats Graphplan when size & cost of generating formula

small compared to graph search cost– Some domains kill it by blowing up size of formula:

Blocks World, “Gripper”

– Overall “winners” at AIP-98 competition were all constraint-based approaches (variants of SATPLAN and Graphplan)

Page 13: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 13

AIPS-2000AIPS-2000

Another planning competition at the AI and Planning Systems Conference 2000 provided a big surprise:

• Fastest planners were all based on A* search!

• Heuristics derived automatically from STRIPS encoding

Issues:

• How to derive a search heuristic

• How does A* really compare with constraint-based planning (Graphplan / SATPLAN / Blackbox)?

Page 14: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 14

Planning as A* SearchPlanning as A* Search

Simple formulation:

• State = node in search tree

• Action = arc in search tree

• Distance to goal = number of actions in plan

• Note: purely sequential plans (no parallelism)

Search heuristic: estimate of distance to goal

• How to estimate? Ideas?

Page 15: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 15

Search HeuristicsSearch Heuristics

1. Count number of false goal propositions in current state

Admissible?

2. Delete all preconditions from actions, solve easy relaxed problem, use length

Admissible?

3. Delete negative effects from actions, solve easier relaxed problem, use length

Admissible?

Page 16: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 16

AIPS-2000 Planning Competition

AIPS-2000 Planning Competition

Fast-Forward (FF)• Joerg Hoffmann & Bernhard Nebel

(Albert-Ludwigs-University Freiburg, Germany)

• “Delete negative effects” heuristic

• Competed in fully automated track of the 2nd International Planning Systems Competition (AIPS 2000 conference in Breckenridge, CO)

– Granted ``Group A distinguished performance Planning System'‘

– Schindler Award for the best performing planning system in the Miconic 10 Elevator domain

AIPS 2002 – Toulouse, FranceNow, don’t you wish you were doing research on planning?

Page 17: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 17

BB vs FFBB vs FF

problem BB FF

time flights time flights

log-a 1.20 (3,4) 0.08 (4,0)

log-b 2.06 (4,2) 0.09 (5,0)

log-c 3.08 (4,5) 0.09 (6,0)

log-d 7.75 (5,3) 0.25 (7,0)

Page 18: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 18

Hardness of PlanningHardness of Planning

• FF (and other state-space planners) find solutions with unbalanced use of airplanes – little opportunities for post-facto parallelization

• Logistics domain is actually polytime solvable if parallel plan length not considered!

• NP-hard to find a solution with minimum parallel length

Huang, Kautz, Selman 2002 – modify STRIPS operators to force solutions to be ones that can be parallelized!

Page 19: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 19

Modified STRIPS LogisticsModified STRIPS Logistics

(:action FLY-AIRPLANE

:parameters

(?airplane ?loc-from ?loc-to ?r)

:precondition

(and (AIRPLANE ?airplane)

(AIRPORT ?loc-from)

(AIRPORT ?loc-to)

(at ?airplane ?loc-from)

(can_use ?airplane ?r)

(resource ?r))

:effect

(and (not (at ?airplane ?loc-from))

(not (resource ?r))

(at ?airplane ?loc-to)))

)

(:init (at package bos-po) ... (resource r1) (resource r2) (resource r3) (resource r4) (can_use airplane1 r1) (can_use airplane1 r2) (can_use airplane2 r3) (can_use airplane2 r4) ...)(:goal (at package la-po) ...)

Page 20: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 20

BB vs FF (modified logistics)BB vs FF (modified logistics)

problem BB FF

time time

log-a(3,2)

1.71 0.12

log-b(3,1)

2.37 1.61

log-c(3,2)

9.96 > 4 hours

log-d(3,4)

155.1 > 4 hours

Page 21: CSE 5731 Lecture 21 State-Space Search vs. Constraint- Based Planning CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

CSE 573 21

Coming UpComing Up

• Wednesday

• Prob(Prob) = 100%

• Ch 14 – Review of basic probability theory

• Ch 15 – start on Bayesian networks

• Change in schedule

• Only one more homework (not two), distributed Nov 28th