28
Reviving Integer Programming Approaches for AI Planning: A Branch-and-Cut Framework Thomas Vossen Leeds School of Business University of Colorado at Boulder Boulder, CO [email protected] Subbarao Kambhampati Department of Computer Science Arizona State University Tempe, AZ [email protected] Menkes van den Briel Department of Industrial Engineering Arizona State University Tempe, AZ [email protected]

Reviving Integer Programming Approaches for AI Planning: A Branch-and-Cut Framework Thomas Vossen Leeds School of Business University of Colorado at Boulder

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Reviving Integer Programming Approaches for AI Planning: A Branch-and-Cut Framework

Thomas VossenLeeds School of Business

University of Colorado at BoulderBoulder, CO

[email protected]

Subbarao KambhampatiDepartment of Computer Science

Arizona State UniversityTempe, AZ

[email protected]

Menkes van den BrielDepartment of Industrial

EngineeringArizona State University

Tempe, [email protected]

Compilation approaches for AI planning

Integer Programming

(IP)

PropositionalSatisfiability

(SAT) ConstraintSatisfaction

(CSP)

Planning

• Very little focus on IP

• There were no IP-based planners in IPCs 1998, 2000, 2002

Background

• Why should we pursue integer programming?– Support for optimality– Support for numeric constraints– IP has shown to be a great success in solving

large scale optimization problems

Reviving integer programming

1. State variables are modeled by an appropriately defined network– The resulting IP formulation can be interpreted as a

network flow problem with additional side constraints

2. The common notion of parallelism based on planning graphs is generalized– This reduces the plan length of the solution plan

3. Action ordering constraints are dynamically generated when needed by a branch-and-cut algorithm– Branch-and-cut has been extremely successful for a

large number of optimization problems

Example: State change flow network

LOC1 LOC2

Example: State change flow network

I

I

G

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

t = 1 t = 2 t = 3

LOC1 LOC2

0 1 2 3

Package1

Truck1

Example: State change flow network

I

I

G

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

t = 1 t = 2 t = 3

LOC1 LOC2

0 1 2 3

Package1

Truck1

Action effects

• STRIPS (binary-valued)

• SAS+ (multi-valued)

LOAD(Package1,Loc1)

PRE: Package1_AT_LOC1, Truck1_AT_LOC1

DEL: Package1_AT_LOC1

ADD: Package1_IN_TRUCK1

LOAD(Package1,Loc1)

State change effects Package1: AT_LOC1 IN_TRUCK1

Prevail conditions Truck1: AT_LOC1 AT_LOC1

LOC1

Prevail condition

State change effect

Example: state change flow network

I

I

G

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

t = 1 t = 2 t = 3

LOC1 LOC2

Action effects link multiple networks together

Package1

Truck1

LOAD(Package1) DRIVE(Truck1,Loc1,Loc2) UNLOAD(Package1)

Single state change (1SC) formulation

• Constraints

– State changes (network flow), for all c C

gC ycf,g,t = 1{f I} for f Dc

hC ycg,h,t+1 = fC yc

g,h,t for f Dc , 1 t <

T

fC ycf,g,T = 1 for g G

– Effect implications, for all c C, 1 t T

aA:(f,g)SCa xa,t = ycf,g,t for f, g Dc, f g

xa,t ycf,f,t for aA, (f,f)PRa

Reviving integer programming

1. State variables are modeled by an appropriately defined network– The resulting IP formulation can be interpreted as a

network flow problem with additional side constraints

2. The common notion of parallelism based on planning graphs is generalized– This reduces the plan length of the solution plan

3. Action ordering constraints are dynamically generated when needed by a branch-and-cut algorithm– Branch-and-cut has been extremely successful for a

large number of optimization problems

Generalized parallelism

• Common notion of parallelism (Graphplan)– Actions can be executed in the same plan step as long

as they do not interfere with each other (no action deletes the precondition or add effect of another action)

– In an actual plan it is possible to arrange independent parallel actions in any order with exactly the same outcome

• Alternative concept of parallelism– Allow actions to be executed in the same plan step as

long as there exists a feasible ordering of the actions such that: • All the actions preconditions are met• Within each state variable and for each plan step,

the value is changed at most once

Generalized parallelism

Increase in parallelism requires “generalized” state

changes

Graphplan parallelism Alternative parallelism

Example: Generalized parallelism

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

Package1

Truck1

Action effect implications

LOAD(Package1,Truck1) Increase in

parallelism requires “generalized” state

changes

LOAD(Package1,Truck1)

DRIVE(Truck1,Loc1,Loc2)

Implied precedences

• Implied precedences

A1,A2A3

A4

A1

A2

A3 A4

Implied precedence graph

Implied precedences

• Implied precedences

• Cycle elimination constraints need to ensure feasible orderings

A1,A2A3

A4

A4

A1

A1

A2

A3 A4

Implied precedence graph

Generalized single state change (G1SC) formulation

• Constraints– State changes (network flow), for all c C

gC ycf,g,t = 1{f I} for f Dc

hC ycg,h,t+1 = fC yc

g,h,t for f Dc,1 t T fC yc

f,g,T = 1 for g G Dc

– Effect implications, for all c C, 1 t TaA:(f,f)SCa xa,t= yc

f,g,t for f, g Dc, f g,

xa,t ycf,f,t + gDc:f≠g (yc

g,f,t + ycf,g,t) for aA, (f,f)PRa

– Ordering (Cycle elimination) constraints

aV() xa,t |V()| – 1 for all cycles G, 1 t T

Reviving integer programming

1. State variables are modeled by an appropriately defined network– The resulting IP formulation can be interpreted as a

network flow problem with additional side constraints

2. The common notion of parallelism based on planning graphs is generalized– This reduces the plan length of the solution plan

3. Action ordering constraints are dynamically generated when needed by a branch-and-cut algorithm– Branch-and-cut has been extremely successful for a

large number of optimization problems

Branch-and-cut algorithm

• Branch-and-cut (row generation with branch-and-bound)– Classes of valid inequalities are left out of the LP

relaxation because there are too many constraints to handle efficiently, and most of them will not be binding in an optimal solution anyway

– Branching occurs when no violated inequalities in a class are found and the LP solution does not satisfy the integrality constraints

Reviving integer programming

1. State variables are modeled by an appropriately defined network– The resulting IP formulation can be interpreted as a

network flow problem with additional side constraints

2. The common notion of parallelism based on planning graphs is generalized– This reduces the plan length of the solution plan

3. Action ordering constraints are dynamically generated when needed by a branch-and-cut algorithm– Branch-and-cut has been extremely successful for a

large number of optimization problems

Further generalizations

• Allow actions to be executed in the same plan step as long as there exists a feasible ordering of the actions such that – All the actions preconditions are met– For each state variable, more than one state

change is allowed, e.g. “state change paths”

I

I

G

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

t = 1 t = 2

0 0’ 1 1’

Package1

Truck1

Further generalizations

• There exists a feasible ordering of the actions such that – All the actions preconditions are met– For each state variable, more than one state

change is allowed, e.g. “state change paths”

I

G

I

AT_LOC1

AT_LOC2

IN_TRUCK1

AT_LOC1

AT_LOC2

t = 1

0 0’

Package1

Truck1

LOAD(Package1) DRIVE(Truck1,Loc1,Loc2) UNLOAD(Package1)

State change path (kSC) formulation

• Constraints– State changes (network flow), for all c C

gC,fg ycg,f,1 + 1 {f I} = yc

f,f,1 yc

f,f,1 = gC,fg ycf,g,1 + zc

f,1 for f CgC,fg yc

g,f,1 + zcf,t-1 = yc

f,f,t yc

f,f,t = gC,fg ycf,g,t + zc

f,t for f C, 1 t T – 1 gC,fg yc

g,f,T + zcf,T-1 = yc

f,f,T yc

f,f,T = gC,fg ycf,g,T + zc

f,T for f C

– Effect implications, for all c C, 1 t T

aA:(f,f)SCa xa,t= ycf,g,t for f, g Dc, f g,

xa,t ycf,f,t + gDc:f≠g (yc

g,f,t + ycf,g,t) for aA, (f,f)PRa

– Ordering (Cycle elimination) constraints aV() xa,t |V()| – 1 for all cycles G, 1 t T

Experimental Setup

• Four domains from the International Planning Competition – Blocks-world, Logistics, Driverlog, Zenotravel– Used Fast Downward preprocessor (translates PDDL to multi-

valued state variables)

• Compared results of 1SC, G1SC, and kSC to SATPLAN04 (SAT4) – State-of-the art SAT-based planner– First prize in the IPC-2004

• Resources– 2.67GHz Linux machine, 1Gb memory– ILOG CPLEX 8.1– 30 minute maximum for each problem

Performance Quality

0.01

0.1

1

10

100

1000

10000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Problems (Logistics)

Tim

e (s

eco

nd

s)

SAT4

1SC

G1SC

kSC

0.01

0.1

1

10

100

1000

10000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Problems (Blocksmove)

Tim

e (s

eco

nd

s)

SAT4

1SC

G1SC

kSC

0

5

10

15

20

25

30

35

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Problems (Blocksmove)

Pla

n le

ng

th (

# o

f ac

tio

ns)

SAT4

1SC

G1SC

kSC

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Problems (Logistics)

Pla

n le

ng

th (

# o

f ac

tio

ns)

SAT4

1SC

G1SC

kSC

Performance Quality

0

10

20

30

40

50

60

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Problems (Driverlog)

Pla

n le

ng

th (

# o

f ac

tio

ns)

SAT4

1SC

g1SC

kSC

0.01

0.1

1

10

100

1000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Problems (Zenotravel)

Tim

e (s

eco

nd

s)

SAT4

1SC

G1SC

kSC

0

5

10

15

20

25

30

35

40

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Problems (Zenotravel)

Pla

n le

ng

th (

# o

f ac

tio

ns)

SAT4

1SC

G1SC

kSC

0.01

0.1

1

10

100

1000

10000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Problems (Driverlog)

Tim

e (s

eco

nd

s)

SAT4

1SC

g1SC

kSC

0

2

4

6

8

10

12

14

16

18

Pla

n st

eps

SAT4

1SC

G1SC

kSC

Blocks Logistics Driverlog Zenotravel

Results: plan length

Summary and conclusions

• First integer programming formulation that is competitive with state-of-the art SAT-based planner:– Uses multi valued states and represent state changes as

flows in an appropriately defined network– Uses generalized notion of parallelism in a branch-and-cut

algorithm

• Future work– Optimal planning (minimum number of actions, minimum

cost plans, minimum resource usage, minimum makespan)

– Expand the scope of planning problems, apply integer programming techniques to planning with resources and temporal planning