Efficient Planning, PDDL - GitHub Pages · HSP Heuristics H 0 - Cost of action is sum of...

Preview:

Citation preview

1

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 1

CS 4649/7649Robot Intelligence: Planning

Sungmoon Joo

School of Interactive Computing

College of Computing

Georgia Institute of Technology

Efficient Planning, PDDL

TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAAAA

*Slides based on Dr. Mike Stilman’s lecture slides

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 2

Course Info.

• Course Website: joosm.github.io/RIP2014 • Course Wiki: github.com/RIP2014/RIP2014Wiki/wiki

- add your contact info, start grouping/filling in project ideas, etc.• HW#1, due Sept. 29

2

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 3

Efficiency in Planning

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 4

Properties of Heuristics: h(s)

• Is A* with Admissible h(s) optimal?

3

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 5

Heuristics in Planning

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 6

Heuristics in Planning

4

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 7

Domain Independent Heuristics

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 8

HSP (Bonet & Geffner 1997)

5

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 9

Computing Costs of Literals

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 10

HSP Progression Heuristic

6

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 11

HSP Heuristics

H0

- Cost of action is sum of precondition costs

- Informed, but not admissible

H1

- Cost of Action is maximum over costs of preconditions- Admissible, but not very informed

H2

- Solve for pairs of literals- Take maximum cost over all pairs- Informed, and claimed to be admissible

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 12

H0

7

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 13

H1

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 14

H2

8

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 15

FF (Hoffman 2000)

Refines HSP Heuristics

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 16

FF Heuristic

9

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 17

FF Heuristic

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 18

FF Heuristic

10

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 19

FF Heuristic

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 20

FF vs. HSP

and admissible

11

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 21

FF vs. HSP

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 22

Plan Space Planning?

(reduces branching factor)

(Which subgoal(or threat) should be worked on?)

12

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 23

The Long Road

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 24

Propositional Satisfiability: Since 1960s

13

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 25

Planning As Satisfiability

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 26

Encoding Plans as SAT

14

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 27

Encoding Plans as SAT

only one action occurs at each time point

describe the predicate that are not affected by the actions

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 28

Encoding Plans as SAT

15

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 29

Solving SAT

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 30

The Last Classical Story

16

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 31

The Last Classical Story

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 32

Who Won in 2008? FF/HSP Strike Back!

17

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 33

Who Won in 2011?

• Sequential Track: Winner - LAMA 2011Runner up - Stone Soup

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 34

Who Won in 2014?

67 planners in total from 66 people from 14 countries: Australia, Canada,Czech Republic, Finland, France, Germany, Iran, Israel, New Zealand,Spain, Switzerland, UK, Venezuela, and USA

*China(X), India(X), Italy(X)

• Sequential Optimal track: Winner - SymBA*-2, SymBA*-1

Runner up – cGamer• Sequential Multi-core track: Winner - ArvandHerd

Runner up – IBaCoP• Sequential Satisficing track: Winner – IBaCoP2

Runner up - Mercury• Agile track: Winner – YAHSP3

Runner up – Madagascar-pC• Temporal track: Winner – YAHSP3-MT

Runner up – Temporal Fast Downward

18

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 35

Summary

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 36

PDDL = Planning Domain Definition Language

PDDL

• Components of a PDDL planning task:

-Objects: Things in the world- Predicates: Object properties- Initial state: The state of the world that we start in- Goal specification: Things that we want to be true- Actions/Operators: Ways of changing the state of the world

19

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 37

How to use PDDL for planning problems?

PDDL

• Two files

- A domain file: predicates and actions- A problem file: objects, initial state and goal specification

(define (domain hanoi-domain)

(:requirements :equality)

(:predicates (disk ?x) (smaller ?x ?y) (on ?x ?y) (clear ?x))

(:action move-disk

:parameters (?disk ?below-disk ?new-below-disk)

:precondition (and (disk ?disk)

(smaller ?disk ?new-below-disk)

(not (= ?new-below-disk ?below-disk))

(not (= ?new-below-disk ?disk))

(not (= ?below-disk ?disk))

(on ?disk ?below-disk)

(clear ?disk)

(clear ?new-below-disk))

:effect (and (clear ?below-disk)

(on ?disk ?new-below-disk)

(not (on ?disk ?below-disk))

(not (clear ?new-below-disk)))))

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 38

How to use PDDL for planning problems?

PDDL

• Two files

- A domain file: predicates and actions- A problem file: objects, initial state and goal specification

(define (problem hanoi-problem)(:domain hanoi-domain)(:objects p1 p2 p3 d1 d2 d3)(:init (smaller d1 p1) (smaller d2 p1) (smaller d3 p1)

(smaller d1 p2) (smaller d2 p2) (smaller d3 p2) (smaller d1 p3) (smaller d2 p3) (smaller d3 p3) (smaller d1 d2) (smaller d1 d3) (smaller d2 d3) (clear p1) (clear p2) (clear d1) (disk d1) (disk d2) (disk d3) (on d1 d2) (on d2 d3) (on d3 p3))(:goal (and (on d1 d2) (on d2 d3) (on d3 p1))))

20

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 39

PDDL

• Domain description

(define (domain hanoi-domain)

(:requirements :equality)

(:predicates (disk ?x) (smaller ?x ?y) (on ?x ?y) (clear ?x))

(:action move-disk

:parameters (?disk ?below-disk ?new-below-disk)

:precondition (and (disk ?disk)

(smaller ?disk ?new-below-disk)

(not (= ?new-below-disk ?below-disk))

(not (= ?new-below-disk ?disk))

(not (= ?below-disk ?disk))

(on ?disk ?below-disk)

(clear ?disk)

(clear ?new-below-disk))

:effect (and (clear ?below-disk)

(on ?disk ?new-below-disk)

(not (on ?disk ?below-disk))

(not (clear ?new-below-disk)))))

Domain name

PredicatesActions

*Requirement flags allow a planner to quickly tell if it is likely to be able to hangle the domain

*Action effects can include universal quantifiers(i.e. forall), conditionals (e.g. when)

Requirements

9/9/2014S. Joo (sungmoon.joo@cc.gatech.edu) 40

PDDL

• Problem descriptionProblem name

Objects

Initial state

(define (problem hanoi-problem)(:domain hanoi-domain)(:objects p1 p2 p3 d1 d2 d3)(:init (smaller d1 p1) (smaller d2 p1) (smaller

d3 p1) (smaller d1 p2) (smaller d2 p2) (smaller d3 p2) (smaller d1 p3) (smaller d2 p3) (smaller d3 p3) (smaller d1 d2) (smaller d1 d3) (smaller d2 d3) (clear p1) (clear p2) (clear d1) (disk d1) (disk d2) (disk d3) (on d1 d2) (on d2 d3) (on d3 p3))

(:goal (and (on d1 d2) (on d2 d3) (on d3 p1))))

Goal specification

*domain must match the corresponding domain name

Domain

Recommended