29
Algorithms for Path- Planning Shuchi Chawla Carnegie Mellon University

Algorithms for Path-Planning Shuchi Chawla Carnegie Mellon University

Embed Size (px)

Citation preview

Algorithms for Path-Planning

Shuchi ChawlaCarnegie Mellon University

Shuchi Chawla2 Algorithms for Path-Planning

A trick-or-treat problem

• It’s Halloween…Collect as much candy as possible

between 6pm and 8pm

• Goal: Get as much candy as possible

• In what order should you visit houses?

Shuchi Chawla3 Algorithms for Path-Planning

Path-planning

• Informally… planning and ordering of tasks

• Classic instance ― Traveling Salesman ProblemFind the shortest tour covering all given locations

• A natural extension ― OrienteeringCover as many locations as possible by a given deadline

• Many variants, applications:

Shuchi Chawla4 Algorithms for Path-Planning

• Informally… planning and ordering of tasks

• Classic instance ― Traveling Salesman Problem

• A natural extension ― Orienteering

• Many variants, applications:– Delivery & distribution problems– Production planning, assembly analysis– Robot navigation

• Needs to be solved at large scales in practice

• Mostly NP-hard ☹

Up the elevator

Up the stairs

Path-planning

1:00 2:00 3:00 4:0012:0011:0010:009:00

Package A, Robinson

Package C,

Downtown,

*priority*

Package B, Monroeville

Office; Pick packages C & DOffice; Pick packages A & B

Package D, Waterfront

Pick up and delivery schedule, Friday, Jan 17

Item X1:

Value: $15Deadline: 100 units by March 15

Requirements: 5 hrs. on Y1 7 hrs. on Y2

Scheduling constraints: < 1 hr. gap between Y1 and Y2

Machine Y2:

Cost: $2 per hr.Scheduling constraints: > 30 mins. between X1 and X2

Cannot find the optimal solution in “polynomial-

time”

Shuchi Chawla5 Algorithms for Path-Planning

• Studied in Operations Research for the past 20-30 years

(also known as Vehicle Routing)

• Many variants:• multiple vehicles, stochastic demands, pickup-and-

delivery

• Techniques for Mixed Integer Programming

• Stochastic planning problems in Robotics and AI

• My focus: Approximation algorithms

• cutting plane methods branch and bound• simulated annealing genetic algorithms …

A 2-approximation:

half-as-good as OPT; value ½ OPT

• Focus mostly on exploration, position estimation• Some poly-time solvable problems studied e.g. shortest paths• Linear and Dynamic programming techniques

Path-planning: A brief history

Find a solution in polynomial-

time with value OPT ( 1)1∕

Shuchi Chawla6 Algorithms for Path-Planning

Approximation Results

• A reward vs. time trade-off

Time taken

Rew

ard

ob

tain

ed

A “quota” approximation

A “budget” approximation

OPT

(2 hrs, )

(2 hrs, )

(4 hrs, )

Shuchi Chawla7 Algorithms for Path-Planning

Approximation Results

• A reward vs. time trade-off

• A budget on time; maximize reward– Orienteering– Deadline-TSP– TSP with Time-Windows

• A quota on reward; minimize time– TSP– k-TSP– Min-Excess

• Optimize a combination of reward and time– Prize-Collecting TSP– Discounted-Reward TSP

single deadline on time different deadlines on different locations different time windows for diff. locations

visit all locations visit k locations visit k locations, but minimize excess

minimize time plus reward foregone max. reward, reward decreases with time

Shuchi Chawla8 Algorithms for Path-Planning

• A reward vs. time trade-off

• A budget on time; maximize reward– Orienteering– Deadline-TSP– TSP with Time-Windows

• A quota on reward; minimize time– TSP– k-TSP– Min-Excess

• Optimize a combination of reward and time– Prize-Collecting TSP– Discounted-Reward TSP

1.5 [Christofides ’76] 2+ [BRV99] [Garg99] [AK00] [CGRT03] … ?

1.5 [Christofides ’76] 2+ [BRV99] [Garg99] [AK00] [CGRT03] … 2+

Approximation Results

? ? ?

2 [Goemans Williamson ’92] ?

3 3 log n 3 log2 n

2 [Goemans Williamson ’92] 6.75+

FOCS’03: Blum, Karger, Chawla, Lane, Meyerson, MinkoffSTOC’04: Bansal, Blum, Chawla, Meyerson

This talk

Use LP-rounding

Use structural properties and Dynamic Programming

Shuchi Chawla9 Algorithms for Path-Planning

A road-map

• An approximation for Orienteering

• Current and future work– Robot navigation & path-planning in a stochastic

world

• Other research

Shuchi Chawla10 Algorithms for Path-Planning

Back to candy-collection (Orienteering)• The givens

A “map” G of locations, distances, start location s

Rewards on locations

Deadline D

• To findA path that collects as much reward as possible by deadline D

• NP-hard; we want to find an approximation

In poly-time, find a path covering reward ⅓ OPT by

deadline D

Shuchi Chawla11 Algorithms for Path-Planning

A flawed attempt: the greedy approach• Visit the closest location; continue until time over

• Assume for simplicity – all locations have equal reward

• Local decisions are bad – consider the “big picture”

– treat clusters of locations as single entities with large reward

Optimal

Greedy

(2 hrs, )

(2 hrs, )

Shuchi Chawla12 Algorithms for Path-Planning

• A single mistake – the very first step – could be disastrous!

• Suppose we had twice or thrice the time …

• Can we use this to approximate Orienteering?

A flawed attempt: the greedy approach

Greedy

Optimal

Algorithm using twice the optimal length(4 hrs, )

(2 hrs, )

(2 hrs, )

Recall: 2-approx to k-TSP …

We know how to achieve this!

Shuchi Chawla13 Algorithms for Path-Planning

k-TSP versus Orienteering

k-TSP:

• Visit at least k reward as fast as possible

• Several approx. known– best: 2-approx [Garg05]

Orienteering:

• Visit as much reward as possible by time D

• No approximation known

Equivalent at optimality; different in approximation:

Time taken

Rew

ard

ob

tain

ed

OPT k-TSPapprox

Orienteering approx

2 hrs. 4 hrs.

Shuchi Chawla14 Algorithms for Path-Planning

• If there exists a path: length = , reward • 2-approx to k-TSP gives: length , reward

• Is there a good path with these properties?

• Bad trade-off between length and reward!

• Delving deeper does not help – – algorithms for k-TSP use a “primal-dual”

subroutine[Goemans

Williamson’92]

– inherently aim for the low-hanging fruit first

½D

Next attempt: Using k-TSP for Orienteering

D

1∕OPT

OPT1∕

Time taken

Rew

ard

ob

tain

ed

OPT k-TSPapprox

Orienteering approx

OPT’ k-TSPapprox

1 hr. 2 hrs.

OPT’

OPT

ALG

4 hrs.

Shuchi Chawla15 Algorithms for Path-Planning

• If there exists a path: length = , reward • 2-approx to k-TSP gives: length , reward

• Is there a good path with these properties?– Yes, if we didn’t have to start from – Idea: Approximate one half of OPT

½D

Next attempt: Using k-TSP for Orienteering

D

• Problem: If OPT collects most reward in its second half…

Length of path ≫ D

Use only as much extra length as “saved” in the first part• Need a better approximation than k-TSP

1∕OPT

OPT1∕

Shuchi Chawla16 Algorithms for Path-Planning

• Need a better approximation than k-TSP

• Excess of path = length of path – length of shortest path

• Given a 2-approx for “excess”:– Divide OPT into 2 parts, each with equal excess– Approximate “excess” on the part with maximum

reward

• Problem: If OPT collects most reward in its second half?

Length of path ≫ D

Key insight: Approximate “excess”

Shuchi Chawla17 Algorithms for Path-Planning

Approximating the excess

• The Min-Excess problem:Given a map G, start s, end t, reward quota kFind path with reward k that minimizes

excess = length – shortest distance from s to t

ℓOPT

k-TSPapprox

Min-Excess approx

length = shortest distance

length

excess

tShortest distance from start

Len

gth

of

path

s

dist(s,t)

Shuchi Chawla18 Algorithms for Path-Planning

Approximating the excess: large excess• The easy case: dist(s,t) ≪ excess

k-TSP gives a good approximation to Min-Excess

tShortest distance from start

Len

gth

of

path

s

OPT

k-TSPapprox

Min-Excess approx

length

excess

dist(s,t)OPT

k-TSP approx

t

Min-Excess approx

Shuchi Chawla19 Algorithms for Path-Planning

Approximating the excess: small excess• The hard case: dist(s,t) > excess, or, excess

≈ 0

OPT visits locations roughly in order of increasing distance from start

• Key insight: If OPT visits locations in order of increasing distance, we can find it exactly using Dynamic Programming!

tShortest distance from start

Len

gth

of

path

s

OPT

k-TSP approx

t

Min-Excess approxℓ

To find best path for (v,k), – try all paths that end at some u and collect reward k-1 – Pick the one with smallest excess

For all locations v, and reward k: find and store best path from start to v with reward k

u

vu

vk=4

k=5

Shuchi Chawla20 Algorithms for Path-Planning

Approximating the excess: combining them• The large excess

case:excess ≫ shortest dist

• Use k-MST

• The small excess case:excess ≈ 0

(OPT is “monotone”)

• Use Dynamic Programming

Use k-TSPDynamic Program

monotone

monotone

monotone

wiggly wiggly

Patch segments using dynamic programming

OPT

Gives a (2+)-approximation for Min-Excess [FOCS’03]

In order of increasing distance from start

What about the intermediate case?

Shuchi Chawla21 Algorithms for Path-Planning

• Construct a path from s to t, that has length D and collects maximum possible reward

• Given a 3-approximation to min-excess:1. Divide into 3 “equal-reward” parts (hypothetically)

2. Approximate the part with the smallest excess

3-approximation to orienteering

An algorithm for Orienteering

Excess of ALG 1+2+3 ; Reward of ALG = ⅓ reward of OPT

1 2

3

Excess of path from u to v

(u,v) = ℓ(u,v)–d(u,v)

An r-approximation for min-excess gives

a r-approximation for Orienteering

v1

v2OPT

ALG

Open: Given an r-approx for min-excess,

can we get r-approx to Orienteering?

Shuchi Chawla22 Algorithms for Path-Planning

Open problems

• Better approximations– Vehicle capacities– Precedence constraints

• Faster approximations

• How hard are they?– Hardness of approximation results for path-

planning– Only small-constant-factor hardness known

• Stochastic models– Map changes over time– Requests arrive stochastically– Robot Navigation

Shuchi Chawla23 Algorithms for Path-Planning

An application: Robot Navigation

• Robot’s task: deliver packages to various locations, collect samples, etc.

• Planning with uncertainty– may run out of battery power– may crash into a wall– may face unforeseen obstacle that causes delay

• Goal: perform as many tasks as possible before failure occurs;perform all tasks as fast as possible in expectation

Shuchi Chawla24 Algorithms for Path-Planning

A simple model for uncertainty

• At each step, fail with probability • Goal: maximize expected reward collected before

failure

• A crude heuristic:– Expected number of steps until failure = 1/– Set deadline = 1/ and apply Orienteering algorithm– Provides no guarantee on reward

• Better formulation: “exponential-discounting”– Probability that robot is alive at time t = 2-t (say, = ½ )

– Thus, if robot visits reward at time t,

expected reward collected = 2-t – Maximize “discounted-reward”

rew

ard

time

Fixed deadline (Orienteering)

Discounted-reward

• Can be solved using techniques in AI, if reward is collected every time the robot visits a location

• The one-time reward case: Discounted-reward TSP

6.8-approximation [FOCS’03]

Shuchi Chawla25 Algorithms for Path-Planning

A more general model: MDPs

• Typically modeled as a Markov Decision Process

– Current position of the robot summarized as a “state”

– Several actions available in each state

– Each action results in a new state with some probability

0.20.5

0.3

0.10.6

0.3 0.5 0.5

0.20.8

Shuchi Chawla26 Algorithms for Path-Planning

Stochastic path-planning

• Measure reward/time in expectation• Stochastic-TSP: find a strategy that takes

minimum possible time in expectation to visit all nodes

• Harder than the deterministic case:– The problems are likely to be PSPACE-hard– Generalize deterministic “directed” problems

• My focus– Currently examining approximation for stochastic-

TSPjoint work with Blum, Kleinberg and McMahan

– General techniques for transforming deterministic-case algorithms to their stochastic versions

0.20.5

0.3

0.10.6

0.3 0.5 0.5

0.20.8

Shuchi Chawla27 Algorithms for Path-Planning

To summarize…

• Path-planning: wide variety of highly applicable problems

• Little known in terms of approximations

• Provided the first approximations for some of them

• Important future directions– Closing the gap between hardness and

approximation– Stochastic models

Shuchi Chawla28 Algorithms for Path-Planning

Goal: Protect privacy of individuals; preserve macroscopic properties

Technique: “sanitization” via perturbation and summarization

General research interests

• Path-planning

• Graph partitioning and clustering

• Online algorithms

• Database Privacy

• Game theory

Clustering with qualitative information Binary classification using the mincut algorithm Sparsest cut finding bottlenecks

Profit maximizing auctions in the Bayesian setting Location games

Scheduling, Routing, Data-structures for search

[ICML’01, FOCS’02, SODA’05]

[SODA’02, APPROX’03, SPAA’03]

[TCC’05]

[EC’03, EC’04]

Questions?