Pills from ASP Challenge 2019 Mario Alviano Department of - - PowerPoint PPT Presentation

pills from asp challenge 2019
SMART_READER_LITE
LIVE PREVIEW

Pills from ASP Challenge 2019 Mario Alviano Department of - - PowerPoint PPT Presentation

Pills from ASP Challenge 2019 Mario Alviano Department of Mathematics and Computer Science University of Calabria, Italy, EU LPNMR 2019 1 / 17 Overview 1 Fastfood Problem Two lines encoding Use median if only one deposit (another two lines)


slide-1
SLIDE 1

Pills from ASP Challenge 2019

Mario Alviano

Department of Mathematics and Computer Science University of Calabria, Italy, EU

LPNMR 2019

1 / 17

slide-2
SLIDE 2

Overview

1 Fastfood Problem

Two lines encoding Use median if only one deposit (another two lines)

2 / 17

slide-3
SLIDE 3

Overview

1 Fastfood Problem

Two lines encoding Use median if only one deposit (another two lines)

2 House Reconfiguration Problem

Around 80 lines of ASP , 16 of which where weak constraints Only toy instances available

3 Insurance Referees Assignment Problem

Around 50 lines of ASP Only toy instances available

2 / 17

slide-4
SLIDE 4

Overview

1 Fastfood Problem

Two lines encoding Use median if only one deposit (another two lines)

2 House Reconfiguration Problem

Around 80 lines of ASP , 16 of which where weak constraints Only toy instances available

3 Insurance Referees Assignment Problem

Around 50 lines of ASP Only toy instances available

4 Checking Policies for Reactive Agents

Input, output, desired function unclear to me

2 / 17

slide-5
SLIDE 5

Overview

1 Fastfood Problem

Two lines encoding Use median if only one deposit (another two lines)

2 House Reconfiguration Problem

Around 80 lines of ASP , 16 of which where weak constraints Only toy instances available

3 Insurance Referees Assignment Problem

Around 50 lines of ASP Only toy instances available

4 Checking Policies for Reactive Agents

Input, output, desired function unclear to me

5 Automated Warehouse Scenario

Let’s talk more about this one!

2 / 17

slide-6
SLIDE 6

Automated Warehouse Scenario (1)

Robots moving in a grid and under shelves Shelves cannot be put down

  • n highway cells

Goal Move shelves to picking stations and deliver products

3 / 17

slide-7
SLIDE 7

Automated Warehouse Scenario (2)

Theorem (Peter Schuller, 2013 — private communication) Robots involved = ⇒ video

4 / 17

slide-8
SLIDE 8

Example instances from 2019

Small size 4x4 grid 2 robots around 4 delivers

5 / 17

slide-9
SLIDE 9

Example instances from 2019

Small size 4x4 grid 2 robots around 4 delivers Good for... Understanding the problem Finding bugs (maybe) Let’s check one of them

5 / 17

slide-10
SLIDE 10

Example instances from 2019

Small size 4x4 grid 2 robots around 4 delivers Good for... Understanding the problem Finding bugs (maybe) Let’s check one of them Bad for... almost everything else! Just bruteforce for the solution No hint on the difficulty of realistic instances

5 / 17

slide-11
SLIDE 11

Example instances from 2017

Medium size at least 12x12 grids at least 6 robots tens of delivers Bigger instances from the ASPRILO project https://asprilo.github.io

6 / 17

slide-12
SLIDE 12

Example instances from 2017

Medium size at least 12x12 grids at least 6 robots tens of delivers Bigger instances from the ASPRILO project https://asprilo.github.io Gave up in 2017 Pure (poor) ASP restriction I had an ASP encoding, but worked only on the 4x4 toy instance in the description of the problem

6 / 17

slide-13
SLIDE 13

Is ASP bad or good?

7 / 17

slide-14
SLIDE 14

Is ASP bad or good?

ASP by itself is bad! We use SQL to query relational databases We don’t use SQL to build websites and apps We combine SQL with other programming languages

7 / 17

slide-15
SLIDE 15

Is ASP bad or good?

ASP by itself is bad! We use SQL to query relational databases We don’t use SQL to build websites and apps We combine SQL with other programming languages ASP itself is good! We have to use ASP for what it is good for We have to use ASP to solve subtasks of a bigger problem We have to combine ASP with other languages

7 / 17

slide-16
SLIDE 16

Is ASP bad or good?

ASP by itself is bad! We use SQL to query relational databases We don’t use SQL to build websites and apps We combine SQL with other programming languages ASP itself is good! We have to use ASP for what it is good for We have to use ASP to solve subtasks of a bigger problem We have to combine ASP with other languages

7 / 17

ASP Challenge 2019 gave sufficient freedom for this!

slide-17
SLIDE 17

Classical planning approaches

Uninformed search Breadth first Depth first Iterative deepening Informed search Dijkstra’s algorithm A∗ Best first

8 / 17

slide-18
SLIDE 18

Classical planning approaches

Uninformed search Breadth first Depth first Iterative deepening Too many plans to test Informed search Dijkstra’s algorithm A∗ Best first Require a priority queue to store (too many) states

8 / 17

slide-19
SLIDE 19

What’s wrong with them?

9 / 17

Optimality is expensive

slide-20
SLIDE 20

What’s wrong with them?

9 / 17

Optimality is expensive Can we at least have some plan with ASP?

slide-21
SLIDE 21

What’s wrong with them?

9 / 17

Optimality is expensive Can we at least have some plan with ASP?

slide-22
SLIDE 22

My solution: Python controller using ASP modules

matcher distancemeter planner

STOP

[else] [everything delivered]

10 / 17

slide-23
SLIDE 23

My solution: Python controller using ASP modules

matcher assign shelves to picking stations distancemeter planner

STOP

[else] [everything delivered]

10 / 17

slide-24
SLIDE 24

My solution: Python controller using ASP modules

matcher assign shelves to picking stations distancemeter compute distances from targets (shelves, picking stations, put-down cells) planner

STOP

[else] [everything delivered]

10 / 17

slide-25
SLIDE 25

My solution: Python controller using ASP modules

matcher assign shelves to picking stations distancemeter compute distances from targets (shelves, picking stations, put-down cells) planner robots, do something! try to deliver, or try to reach a target shelf, or try to get close to a target shelf

STOP

[else] [everything delivered]

10 / 17

slide-26
SLIDE 26

Pills of my solution

matcher.lp — around 60 lines of ASP code Use ordered encoding

11 / 17

slide-27
SLIDE 27

Pills of my solution

matcher.lp — around 60 lines of ASP code Use ordered encoding distancemeter.lp — around 60 lines of ASP code Plus 10 lines of template Distance in the predicate to avoid recursive negation

11 / 17

slide-28
SLIDE 28

Pills of my solution

matcher.lp — around 60 lines of ASP code Use ordered encoding distancemeter.lp — around 60 lines of ASP code Plus 10 lines of template Distance in the predicate to avoid recursive negation planner.lp — around 150 lines of ASP code Only state changes, no actions! What is the knowledge encoded by pick up at time 100?

11 / 17

slide-29
SLIDE 29

Pills of my solution

matcher.lp — around 60 lines of ASP code Use ordered encoding distancemeter.lp — around 60 lines of ASP code Plus 10 lines of template Distance in the predicate to avoid recursive negation planner.lp — around 150 lines of ASP code Only state changes, no actions! What is the knowledge encoded by pick up at time 100? controller.py — around 400 lines of python code Interpret states and inject actions Anytime visualization of the plan

11 / 17

slide-30
SLIDE 30

Pills of matcher.lp

12 / 17

slide-31
SLIDE 31

Pills of distancemeter.lp

13 / 17

slide-32
SLIDE 32

Pills of planner.lp (1)

14 / 17

slide-33
SLIDE 33

Pills of planner.lp (2)

15 / 17

slide-34
SLIDE 34

Let’s run it!

The plan is produced a few steps at time Never look at the past

16 / 17

slide-35
SLIDE 35

Let’s run it!

The plan is produced a few steps at time Never look at the past Don’t even think to optimality In a real environment, after a few actions there will be a mistake and you have to replan anyhow

16 / 17

slide-36
SLIDE 36

Let’s run it!

The plan is produced a few steps at time Never look at the past Don’t even think to optimality In a real environment, after a few actions there will be a mistake and you have to replan anyhow Potentially, one could add new orders during the computation

  • f the plan

16 / 17

slide-37
SLIDE 37

Conclusion

Optimality is a chimera here Having some plan is also a chimera for ASP by itself

17 / 17

slide-38
SLIDE 38

Conclusion

Optimality is a chimera here Having some plan is also a chimera for ASP by itself Plans can still be computed by taking advantage of ASP Apparently not too far from optimality (tested on very small instances)

17 / 17

slide-39
SLIDE 39

Conclusion

Optimality is a chimera here Having some plan is also a chimera for ASP by itself Plans can still be computed by taking advantage of ASP Apparently not too far from optimality (tested on very small instances)

17 / 17