AI Planning meets Production Logistics Francesco Leofante Imperial - - PowerPoint PPT Presentation

ai planning meets production logistics
SMART_READER_LITE
LIVE PREVIEW

AI Planning meets Production Logistics Francesco Leofante Imperial - - PowerPoint PPT Presentation

AI Planning meets Production Logistics Francesco Leofante Imperial College London, United Kingdom FMAIL 2019 Bergen, Norway December 2, 2019 A (Nearly Epic) Tale of Courage, Passion, Amazing Victories and Major Defeats Francesco Leofante


slide-1
SLIDE 1

AI Planning meets Production Logistics

Francesco Leofante

Imperial College London, United Kingdom FMAIL 2019 Bergen, Norway December 2, 2019
slide-2
SLIDE 2

A (Nearly Epic) Tale of Courage, Passion, Amazing Victories and Major Defeats

Francesco Leofante

Imperial College London, United Kingdom FMAIL 2019 Bergen, Norway December 2, 2019
slide-3
SLIDE 3

Starring...

Francesco Imperial College London Verification of Autonomous Systems Group @ Imperial

https://fraleo.github.io/

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 2 / 29
slide-4
SLIDE 4

Starring...

Erika ´ Abrah´ am RWTH Aachen University Armando Tacchella University of Genoa Gerhard Lakemeyer RWTH Aachen University Tim Niemueller X - The Moonshot Factory

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 2 / 29
slide-5
SLIDE 5

Agenda

AI Planning

  • What is planning?
  • Solving planning problems

The RoboCup Logistics League

  • The competition
  • Our approach

Concluding remarks

  • Towards domain-independent planning
  • Open challenges
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 3 / 29
slide-6
SLIDE 6

Before we go into the details...a little teaser

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 4 / 29
slide-7
SLIDE 7

Agenda

AI Planning

  • What is planning?
  • Solving planning problems

The RoboCup Logistics League

  • The competition
  • Our approach

Concluding remarks

  • Towards domain-independent planning
  • Open challenges
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 5 / 29
slide-8
SLIDE 8

Why?

“A goal without a plan is just a wish”

from “50 Ways to Lose Ten Pounds” (1995) by Joan Horbiak, p. 95

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 6 / 29
slide-9
SLIDE 9

What is planning anyway?

Planning is... model-based autonomous behavior

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 7 / 29
slide-10
SLIDE 10

What is planning anyway?

Planning is... model-based autonomous behavior That is, given a model that represents

an initial situation I, the actions A that can be performed and a goal G

what are the actions that I should perform to reach G from I?

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 7 / 29
slide-11
SLIDE 11

What is planning anyway? (cont.d)

Depending on the type of actions we are dealing with, we can define several forms of planning,

Path planning Motion planning Task planning ...

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 8 / 29
slide-12
SLIDE 12

What is planning anyway? (cont.d)

Depending on the type of actions we are dealing with, we can define several forms of planning,

Path planning Motion planning Task planning ...

Here: task planning

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 8 / 29
slide-13
SLIDE 13

Solving planning problems

Different techniques for different representations...

heuristic search in a graph symbolic search reductions to other problems...

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 9 / 29
slide-14
SLIDE 14

Solving planning problems

Different techniques for different representations...

heuristic search in a graph symbolic search reductions to other problems...

Here: reductions to satisfiability checking

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 9 / 29
slide-15
SLIDE 15

Planning as SAT

Let F and A be the sets of state and action variables. Let X = F ∪ A and X′ = {x′ : x ∈ X} be its next state copy. A planning problem is a triple of formulas Π = I, T, G where

I(F ) represents the set of initial states T(X, X′) describes how actions affect states G(F ) represents the set of goal states

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 10 / 29
slide-16
SLIDE 16

Planning as SAT

Planning formula ϕ(Π,k) := I(F0) ∧

k−1

  • i=0

T(Xi, Xi+1) ∧ G(Fk) How to choose k?

start with k = 1 increase until ϕ(Π,k) SAT or upper bound is reached.

ϕ(Π,k) is sat iff there exists a plan with length k

in that case, a plan can be extracted from the satisfying assignment

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 10 / 29
slide-17
SLIDE 17

Planning as SAT - limitations

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 11 / 29
slide-18
SLIDE 18

Planning as SAT - limitations

  • Classical planning as SAT: only Boolean variables

hasFuel(robot): y or n?

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 11 / 29
slide-19
SLIDE 19

Planning as SAT - limitations

  • Need for more expressive formalisms...
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 11 / 29
slide-20
SLIDE 20

Planning as SAT - limitations

  • Need for more expressive formalisms...

minimize total time fuel(robot) > 5 hasMoney(robot)

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 11 / 29
slide-21
SLIDE 21

Step 1: Planning Modulo Theories

How to overcome (some) limitations of SAT?

Satisfiability Modulo Theories

SMT: Boolean combinations of constraints expressed in decidable fragments of first-order theories

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 12 / 29
slide-22
SLIDE 22

Step 1: Planning Modulo Theories

How to overcome (some) limitations of SAT?

Satisfiability Modulo Theories

SMT: Boolean combinations of constraints expressed in decidable fragments of first-order theories Integrated approach for new classes of planning problems:

numeric planning (costs, rewards...) temporal planning (durations, deadlines) planning with resources (raw materials)

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 12 / 29
slide-23
SLIDE 23

Step 2: Optimal Planning Modulo Theories

Can we ask for more?

compute a plan that achieves a goal compute a plan that achieves a goal minimizing costs/time

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 13 / 29
slide-24
SLIDE 24

Step 2: Optimal Planning Modulo Theories

Can we ask for more?

compute a plan that achieves a goal compute a plan that achieves a goal minimizing costs/time Optimization Modulo Theories

OMT: optimize objective function subject to SMT formulas

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 13 / 29
slide-25
SLIDE 25

Agenda

AI Planning

  • What is planning?
  • Solving planning problems

The RoboCup Logistics League

  • The competition
  • Our approach

Concluding remarks

  • Towards domain-independent planning
  • Open challenges
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 14 / 29
slide-26
SLIDE 26

The RoboCup Logistics League

BS RS 1 RS 2 RS 2 CS 2
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 15 / 29
slide-27
SLIDE 27

Planning & Execution Competition for Logistics Robots in Simulation [Niemueller et al., 2015]

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 16 / 29
slide-28
SLIDE 28

Planning & Execution Competition for Logistics Robots in Simulation [Niemueller et al., 2015]

Planning for the RCLL: what’s hard?1

Representation

state space languages and scalability?

Execution

changing environment temporary robot/machine failures changes in task definitions

  • nline arrival of new tasks
1See IFM 2018 [Leofante et al., 2018b] for more.
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 16 / 29
slide-29
SLIDE 29

Representational challenges

domain representation: over 250 product configurations possible! need a language that can model crucial aspects of the domain:

resources: how many token do I need to produce X? durations: how long does it take to produce X? deadlines: deliver X before... time and space dependencies

Solving the RCLL is not easy:

heuristic search does not scale rule-based approaches work, but no formal guarantees!

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 17 / 29
slide-30
SLIDE 30

Can I panic now?

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 18 / 29
slide-31
SLIDE 31

Exploration tasks

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-32
SLIDE 32

Exploration tasks

robot i

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-33
SLIDE 33

Exploration tasks

robot i location k location l

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-34
SLIDE 34

Exploration tasks

Step j

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-35
SLIDE 35

Exploration tasks

Step j posi,j+1 = l di,j+1

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-36
SLIDE 36

Exploration tasks

Step j posi,j+1 = l di,j+1 posi,j+2 = k di,j+2

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-37
SLIDE 37

Exploration tasks

Step j posi,j+1 = l di,j+1 posi,j+2 = k di,j+2

The move action for each robot i and step j can be encoded as

∀i.∀j.

Z

  • l=0

Z

  • k=1

lk

  • posi,j−1=l ∧ posi,j=k ∧ di,j=di,j−1+D(k, l)
  • posi,j=stop ∧ di,Z=di,j−1
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 19 / 29
slide-38
SLIDE 38

A (less) simple example: C0 production

1

Retrieve base with cap from shelf at CS

2

Prepare CS to retrieve cap

3

Feed base into CS

4

Discard cap-less base

5

Prepare BS to provide black base

6

Retrieve base from BS

7

Prepare CS to mount cap

8

Feed black base to CS

9

Retrieve black base with cap from CS

10 Prepare DS for slide specified in order 11 Deliver to DS BS CS 2 C S BS DS
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 20 / 29
slide-39
SLIDE 39

Standard encodings

s0 s1 s2 s3 s4

a1

a2

a3

a4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 21 / 29
slide-40
SLIDE 40

Standard encodings

s0 s1 s2 s3 s4

a1

a2

a3

a4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 21 / 29
slide-41
SLIDE 41

Standard encodings

s0 s1 s2 s3

a1∧a2

a3

a4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 21 / 29
slide-42
SLIDE 42

Standard encodings

s0 s1 s2 s3

a1∧a2

a3

a4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 21 / 29
slide-43
SLIDE 43

Standard encodings

s0 s1 s2 s3

a1∧a2

a3

a4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 21 / 29
slide-44
SLIDE 44

Our solution: long-distance dependencies

[Leofante et al., 2018a]
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-45
SLIDE 45

Our solution: long-distance dependencies

[Leofante et al., 2018a]
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-46
SLIDE 46

Our solution: long-distance dependencies

[Leofante et al., 2018a]
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-47
SLIDE 47

Our solution: long-distance dependencies

[Leofante et al., 2018a]
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-48
SLIDE 48

Our solution: long-distance dependencies

[Leofante et al., 2018a]

s0 s1 s2 s3 s4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-49
SLIDE 49

Our solution: long-distance dependencies

[Leofante et al., 2018a]

s0 s1 s2 s3 s4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-50
SLIDE 50

Our solution: long-distance dependencies

[Leofante et al., 2018a]

s0 s1 s2 s3 s4

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-51
SLIDE 51

Our solution: long-distance dependencies

[Leofante et al., 2018a]

s0 s1 s2 s3 s4

. . .

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 22 / 29
slide-52
SLIDE 52

Integrated planning and execution

[Leofante et al., 2018a]

Model

  • Planning
  • Plan
  • Executive
  • Robot
  • Monitor
  • 1st place, PExC @ ICAPS 2018
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 23 / 29
slide-53
SLIDE 53

Agenda

AI Planning

  • What is planning?
  • Solving planning problems

The RoboCup Logistics League

  • The competition
  • Our solution

Concluding remarks

  • Towards domain-independent planning
  • Open challenges
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 24 / 29
slide-54
SLIDE 54

Domain-independent OMT planning

We implemented a domain-specific planner for the RCLL

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 25 / 29
slide-55
SLIDE 55

Domain-independent OMT planning

We implemented a domain-specific planner for the RCLL

Cool approach but...Does it scale on other planning problems?

(The Guardian)

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 25 / 29
slide-56
SLIDE 56

Optimal Planning Modulo Theories

[Leofante et al., 2019, Leofante, 2019]

Major limitations of [Leofante et al., 2018a]:

tailored for the RCLL

plans have specific structures, horizon is known, in general blow-up heavy use of domain knowledge

how to infer type-abstractions automatically?

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 26 / 29
slide-57
SLIDE 57

Optimal Panning Modulo Theories

[Leofante et al., 2019, Leofante, 2019]

I T GR TR TC n n + 1 abstraction to boost OMT planning Implemented in OMTPlan, available at https://github.com/fraleo/OMTPlan

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 26 / 29
slide-58
SLIDE 58

Summing up

Achieved so far implemented a domain-specific OMT planner for the RCLL integrated OMT planning with online execution and monitoring developed new encodings inspired by challenges faced in the process

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 27 / 29
slide-59
SLIDE 59

Summing up

Achieved so far implemented a domain-specific OMT planner for the RCLL integrated OMT planning with online execution and monitoring developed new encodings inspired by challenges faced in the process

Are we done?

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 27 / 29
slide-60
SLIDE 60

Summing up

Achieved so far implemented a domain-specific OMT planner for the RCLL integrated OMT planning with online execution and monitoring developed new encodings inspired by challenges faced in the process

Are we done? There’s still a lot to do to ease applicability of (OMT) planning in logistics!

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 27 / 29
slide-61
SLIDE 61

Open challenges

Some open problems kick-start discussions:

scalability: dedicated solvers? uncertainty: expressive models or ”online” solutions? integrated task and motion planning: hybrid models? explainability: why did you do that? ...many more!

  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 28 / 29
slide-62
SLIDE 62

Some references I

Leofante, F. (2019). The OMTPlan planner: system description. (in preparation). Leofante, F., ´ Abrah´ am, E., Niemueller, T., Lakemeyer, G., and Tacchella, A. (2018a). Integrated synthesis and execution of optimal plans for multi-robot systems in logistics. Information Systems Frontiers. Leofante, F., ´ Abrah´ am, E., and Tacchella, A. (2018b). Task planning with OMT: an application to production logistics. In Proc. of IFM, pages 316–325. Leofante, F., Giunchiglia, E., ´ Abrah´ am, E., and Tacchella, A. (2019). Optimal planning modulo theories. (under review). Niemueller, T., Lakemeyer, G., and Ferrein, A. (2015). The RoboCup Logistics League as a benchmark for planning in robotics. In Proc. of PlanRob@ICAPS’15.
  • F. Leofante - f.leofante@imperial.ac.uk
FMAIL ’19 December 2, 2019 29 / 29