Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A*...
-
Upload
britney-studdard -
Category
Documents
-
view
213 -
download
0
Transcript of Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A*...
![Page 1: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/1.jpg)
Cooperative Pathfinding
David Silver
![Page 2: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/2.jpg)
Overview The problem Solution methods
Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical, Cooperative A*
Live demo (!?) Results
![Page 3: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/3.jpg)
The Problem N agents N goals Find N paths Such that no two
paths overlap
![Page 4: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/4.jpg)
The Problem with the Problem Search space is enormous
e.g. 100x100 gridworld ~(10,000)N states Branching factor of 5N
{N, E, S, W, wait} for each agent
Need to solve in real-time e.g. complete search within 1ms
![Page 5: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/5.jpg)
Reformulating the Problem Err… isn’t this course called Single
Agent Search? So simplify the problem to a series
of single agent searches. Two approaches considered:
A* with local repair Cooperative A*
![Page 6: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/6.jpg)
1. A* with Local Repair 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
![Page 7: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/7.jpg)
Problems with Local Repair Failure to reach goal Long solution lengths Frequent recalculation Appearance of ‘stupidity’
![Page 8: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/8.jpg)
2. Cooperative A* 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
![Page 9: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/9.jpg)
Search Space The new search space has 3
dimensions 2 dimensional grid Time dimension
Reservation table marks illegal states Mark each state on any agent’s path Sparse data structure Implemented using hash table
![Page 10: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/10.jpg)
Problems with Cooperative A* Poor heuristic, many nodes expanded
Need to improve heuristic Problems with agents at destination
Need to continue searching Sensitive to agent order
Dynamically rotate through agent orders
![Page 11: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/11.jpg)
How to improve the heuristic? Pattern databases no good
Search space too large Goal may be different each time Map may change dynamically
So use hierarchical A* (Holte) Search for goal at abstract level Use abstract distance as heuristic 3 ideas for reusing abstract search
![Page 12: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/12.jpg)
3. Hierarchical, Cooperative A* Domain abstraction
Ignore time dimension Ignore reservation table Basic gridworld search
Cooperative A* as before But using abstract distance as heuristic Abstract distance computed on
demand
![Page 13: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/13.jpg)
Reverse, Resumable A* 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
![Page 14: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/14.jpg)
4. Windowed, Hierarchical, Cooperative A* Break up search into manageable
pieces Like an intermediate abstraction layer
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
![Page 15: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/15.jpg)
Windowing
S
G
N
window
abstract edged(N,G) = h(N,G)
![Page 16: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/16.jpg)
Continuing the search Continue search after reaching
destination May need to get out of the way Use edge costs:
0 if sitting on destination 1 for other edges Abstract distance to goal for final
edge
![Page 17: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/17.jpg)
Using Windows 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
![Page 18: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/18.jpg)
Demo I hope this works!
![Page 19: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/19.jpg)
Results: nodes expanded
0200400600800
100012001400160018002000
A* LRA* CA* HCA* W-32 W-16 W-8
BaseAbstract
![Page 20: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/20.jpg)
Results: path length
0102030405060708090
100
A* LRA* CA* CHA* W-32 W-16 W-8
Length
![Page 21: Cooperative Pathfinding David Silver. Overview The problem Solution methods Local repair A* Cooperative A* Hierarchical, Cooperative A* Windowed, Hierarchical,](https://reader035.fdocuments.us/reader035/viewer/2022062712/56649cab5503460f9496c3a0/html5/thumbnails/21.jpg)
Further ideas Additional layers in the hierarchy
e.g. ignore half the reservations Prioritising agents
Overriding low priority agents Abstracting in space as well as
time e.g. Using N-cliques