Похожие презентации:
Two Primary Techniques (Node Pruning)
1. JPS+: Over 100x Faster than A* Steve Rabin Principal Lecturer DigiPen Institute of Technology
2. JPS+: Over 100x Faster than A* JPS+ now with Goal Bounding: Over 1000x Faster than A*
3.
Slides:www.gameaipro.com
4. Coming out April 2015
…however, back inJune 2014…
…however,
2 months ago…
5. Two Primary Techniques (Node Pruning)
JPS+ (ICAPS July 2014)
“Avoid redundant paths on grids”
Goal Bounding (developed in Jan 2015)
“Avoid wrong directions on any kind of map”
6. Test Maps (movingai.com)
75 StarCraft maps (198,230 problems)
156 Dragon Age Origins maps (159,465 problems)
36 Warcraft III maps (50,971 problems)
7. Test Maps (movingai.com)
75 StarCraft maps (198,230 problems)
156 Dragon Age Origins maps (159,465 problems)
36 Warcraft III maps (50,971 problems)
8.
A*JPS+
JPS+ Goal Bounding
9.
A*JPS+
JPS+ Goal Bounding
10.
A*JPS+
JPS+ Goal Bounding
11.
A*JPS+
JPS+ Goal Bounding
12.
A*JPS+
JPS+ Goal Bounding
13.
GoalBounding
JPS+
70x to 350x
faster
Avoid
Redundant
Paths
1400x to 5000x
faster
20x to 60x
faster
Avoid
Wrong
Directions
14. StarCraft Maps: JPS+
400350
300
250
200
150
100
50
0
15. StarCraft Maps: Subgoal Graph
18001600
1400
1200
1000
800
600
400
200
0
16. StarCraft Maps: JPS+ Goal Bounds
60005000
4000
3000
2000
1000
0
17. StarCraft Maps: Comparison
4001800
350
1600
6000
5000
1400
300
1200
4000
250
1000
200
3000
800
150
600
100
2000
400
1000
50
200
0
0
JPS+
Subgoal Graph
0
JPS+ Goal Bounds
18. StarCraft Maps: Comparison
60005000
4000
3000
2000
2000
1500
1000
1000
500
500
0
0
JPS+
Subgoal Graph
0
JPS+ Goal Bounds
19.
JPS+1 value
Per Edge
4 values
Per Edge
Goal
Bounding
Grids, NavMesh, Graphs
Fast O(n)
Precompute
Avoid
Redundant
Paths
No Map
Changes
Slow O(n2)
Precompute
Dijkstra, A*,
Uniform other algorithms
Cost
Avoid
Non-Uniform
Wrong
Cost
Directions
20. Overview
JPS+ Preprocessing & Runtime
Goal Bounding Preprocessing & Runtime
Results and Analysis
Future Work
21. JPS+ Explained
22. Equivalent Paths on Grids
23. JPS Search Strategy
24. JPS Search Strategy
25. JPS Search Strategy
26. JPS Search Strategy
27. JPS Search Strategy
28. JPS Search Strategy
29. Forced Neighbor Cases
30. Fewer Open List Nodes
31. Four Types of Jump Points
Primary
Straight
Diagonal
Target
32. Primary Jump Points
33. Straight Jump Points
34. Straight Jump Point Distance
35. Diagonal Jump Points
36. Add in Wall Distances (0 or neg)
37. Four Types of Jump Points
Primary
Straight
Diagonal
Target (runtime)
38. JPS+ Runtime Example
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49. Goal Bounding
50.
A* SearchReachable optimally
by exploring left
Optimal goal bounds
when exploring left
51.
JPS+ SearchReachable optimally
by exploring left
Optimal goal bounds
when exploring left
52.
A* SearchGoal Bounds
JPS+ Search
Goal Bounds
53.
Goal BoundingA* Search
54.
Goal BoundingA* Search
55.
Goal BoundingA* Search
56.
Goal BoundingA* Search
57.
Goal BoundingA* Search
58.
Goal BoundingA* Search
59.
Goal BoundingA* Search
60.
Goal BoundingA* Search
61.
Goal BoundingA* Search
62.
Goal BoundingA* Search
63.
Goal BoundingA* Search
64.
Goal BoundingA* Search
65.
Goal BoundingA* Search
66.
67.
68. How to calculate Goal Bounds
Dijkstra floodfill from each node
When you put a node on the Closed list
Update start node’s Goal Bounds
(for the edge it originally came from!)
Embarrassingly parallel
69.
CalculatingGoal Bounds
70.
CalculatingGoal Bounds
71.
CalculatingGoal Bounds
72.
CalculatingGoal Bounds
73.
CalculatingGoal Bounds
74.
CalculatingGoal Bounds
75.
CalculatingGoal Bounds
76.
CalculatingGoal Bounds
77.
CalculatingGoal Bounds
78.
CalculatingGoal Bounds
79.
CalculatingGoal Bounds
80.
CalculatingGoal Bounds
81.
CalculatingGoal Bounds
82.
CalculatingGoal Bounds
83.
CalculatingGoal Bounds
84.
CalculatingGoal Bounds
85.
CalculatingGoal Bounds
86.
CalculatingGoal Bounds
87.
CalculatingGoal Bounds
88.
CalculatingGoal Bounds
89.
CalculatingGoal Bounds
90.
CalculatingGoal Bounds
91.
CalculatingGoal Bounds
92.
CalculatingGoal Bounds
93.
CalculatingGoal Bounds
94.
CalculatingGoal Bounds
95.
CalculatingGoal Bounds
96.
CalculatingGoal Bounds
97.
CalculatingGoal Bounds
98.
CalculatingGoal Bounds
99.
CalculatingGoal Bounds
100.
CalculatingGoal Bounds
101.
CalculatingGoal Bounds
102.
CalculatingGoal Bounds
103.
CalculatingGoal Bounds
104.
CalculatingGoal Bounds
105.
CalculatingGoal Bounds
106.
CalculatingGoal Bounds
107.
CalculatingGoal Bounds
108.
CalculatingGoal Bounds
109.
CalculatingGoal Bounds
110.
CalculatingGoal Bounds
111.
CalculatingGoal Bounds
112.
CalculatingGoal Bounds
113. Optimizations
114. JPS+ Goal Bounding
Fast stack and unsorted Open list
Only works for grids using Octile heuristic
115. Across the Cape (768x768)
2940 tests
From 4.41 to 1176.61
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
116. Across the Cape (768x768)
2940 tests
From 4.41 to 1176.61
Search
A*
JPS+ GB
Max Open
List Size
3464
Avg Size On
PopCheapest
117. Across the Cape (768x768)
2940 tests
From 4.41 to 1176.61
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
3464
1204
118. Across the Cape (768x768)
2940 tests
From 4.41 to 1176.61
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
3464
1204
11
119. Across the Cape (768x768)
2940 tests
From 4.41 to 1176.61
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
3464
1204
11
3
3711x faster than A*
120. Arctic Station (768x768)
4100 tests
From 4 to 1643.06 long
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
121. Arctic Station (768x768)
4100 tests
From 4 to 1643.06 long
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
4373
1154
122. Arctic Station (768x768)
4100 tests
From 4 to 1643.06 long
Search
A*
JPS+ GB
Max Open
List Size
Avg Size On
PopCheapest
4373
1154
8
1
4907x faster than A*
123. JPS+ Goal Bounding
Function pointer table
256 wall permutations X 8 parent directions
2048 look-up table pointing at 42 functions
124. Problem: Dynamic Maps
125.
Goal BoundingGates
126.
Goal BoundingGates
127.
Goal BoundingGates
128. Recap
129.
GoalBounding
JPS+
70x to 350x
faster
Avoid
Redundant
Paths
1400x to 5000x
faster
20x to 60x
faster
Avoid
Wrong
Directions
130.
JPS+1 value
Per Edge
4 values
Per Edge
Goal
Bounding
Grids, NavMesh, Graphs
Fast O(n)
Precompute
Avoid
Redundant
Paths
No Map
Changes
Slow O(n2)
Precompute
Dijkstra, A*,
Uniform other algorithms
Cost
Avoid
Non-Uniform
Wrong
Cost
Directions
131. StarCraft Maps: Comparison
60005000
4000
3000
2000
2000
1500
1000
1000
500
500
0
0
JPS+
Subgoal Graph
0
JPS+ Goal Bounds
132. Future Work
Can Goal Bounding work with Subgoal?
Can the precompute be done in O(n)?
Are there better bounds than a box?
How much does it actually speed up A*
on a NavMesh?
133. Questions?
[email protected]
Email me for source code
Slides at:
www.gameaipro.com