Cooperative Pathfinding David Silver Overview n n The

  • Slides: 21
Download presentation
Cooperative Pathfinding David Silver

Cooperative Pathfinding David Silver

Overview n n The problem Solution methods n n n Local repair A* Cooperative

Overview n n The problem Solution methods n n n Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical, Cooperative A* Live demo (!? ) Results

The Problem n n N agents N goals Find N paths Such that no

The Problem n n N agents N goals Find N paths Such that no two paths overlap

The Problem with the Problem n Search space is enormous n n n e.

The Problem with the Problem n Search space is enormous n n n e. g. 100 x 100 gridworld ~(10, 000)N states Branching factor of 5 N n n {N, E, S, W, wait} for each agent Need to solve in real-time n e. g. complete search within 1 ms

Reformulating the Problem n n n Err… isn’t this course called Single Agent Search?

Reformulating the Problem n n n Err… isn’t this course called Single Agent Search? So simplify the problem to a series of single agent searches. Two approaches considered: n n A* with local repair Cooperative A*

1. A* with Local Repair n n n Search for route to goal Ignore

1. A* with Local Repair n n n Search for route to goal Ignore other agents If collision is imminent, route again Increase agitation level with each reroute Cross fingers and hope for the best

Problems with Local Repair n n Failure to reach goal Long solution lengths Frequent

Problems with Local Repair n n Failure to reach goal Long solution lengths Frequent recalculation Appearance of ‘stupidity’

2. Cooperative A* n n Consider each agent in turn, greedily Search for a

2. Cooperative A* n n Consider each agent in turn, greedily Search for a route to goal, avoiding reserved states Mark the agent’s route in a reservation table Basic heuristic uses Manhattan distance

Search Space n The new search space has 3 dimensions n n n 2

Search Space n The new search space has 3 dimensions n n n 2 dimensional grid Time dimension Reservation table marks illegal states n n n Mark each state on any agent’s path Sparse data structure Implemented using hash table

Problems with Cooperative A* n Poor heuristic, many nodes expanded n n Problems with

Problems with Cooperative A* n Poor heuristic, many nodes expanded n n Problems with agents at destination n n Need to improve heuristic Need to continue searching Sensitive to agent order n Dynamically rotate through agent orders

How to improve the heuristic? n Pattern databases no good n n Search space

How to improve the heuristic? n Pattern databases no good n n Search space too large Goal may be different each time Map may change dynamically So use hierarchical A* (Holte) n n n Search for goal at abstract level Use abstract distance as heuristic 3 ideas for reusing abstract search

3. Hierarchical, Cooperative A* n Domain abstraction n n n Ignore time dimension Ignore

3. Hierarchical, Cooperative A* n Domain abstraction n n n Ignore time dimension Ignore reservation table Basic gridworld search Cooperative A* as before But using abstract distance as heuristic Abstract distance computed on demand

Reverse, Resumable A* n n n Search backwards from Goal Search towards Start But

Reverse, Resumable A* n n n Search backwards from Goal Search towards Start But only terminate when requested node is reached Keep Open, Closed lists Resume search whenever a new node is requested Consistent heuristic required

4. Windowed, Hierarchical, Cooperative A* n n Break up search into manageable pieces Like

4. Windowed, Hierarchical, Cooperative A* n n Break up search into manageable pieces Like an intermediate abstraction layer n n Full search up to N steps Ignore time/reservations after N steps After N steps this is the same as abstract layer So use abstract distance to complete search

Windowing S window N G abstract edge d(N, G) = h(N, G)

Windowing S window N G abstract edge d(N, G) = h(N, G)

Continuing the search n n n Continue search after reaching destination May need to

Continuing the search n n n Continue search after reaching destination May need to get out of the way Use edge costs: n n n 0 if sitting on destination 1 for other edges Abstract distance to goal for final edge

Using Windows n n Compute window for all agents initially Then recompute each agent

Using Windows n n Compute window for all agents initially Then recompute each agent when half way through window Stagger computation to spread out processing time Can keep abstract distances until destination changes

Demo n I hope this works!

Demo n I hope this works!

Results: nodes expanded

Results: nodes expanded

Results: path length

Results: path length

Further ideas n Additional layers in the hierarchy n n Prioritising agents n n

Further ideas n Additional layers in the hierarchy n n Prioritising agents n n e. g. ignore half the reservations Overriding low priority agents Abstracting in space as well as time n e. g. Using N-cliques