empirical project powerpoint
TRANSCRIPT
Joseph Krall Master Student, Computer Science West Virginia University April 2010
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
2
Pathfinding is a subject of high research interest
Applications in Video Games and AI
3
Many Problems with Pathfinding Today
http://www.ai-blog.net/archives/000152.html
In this Project…
An Empirical Study
Using A-Star
But first a look at Pathfinding Methods…
4
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
5
A set of accessible nodes surrounding a node
4-Way System
8-Way System
16-Way System
Steps to neighbors have associated costs
6
Estimate distance from node to goal
Manhattan Distance
Step only {Up, Down, Left, Right} and count
D(n) = |X1 – X2| + |Y1 – Y2|
7
Euclidean Distance
Distance “as the crow flies”
Not always True Distance
Diagonal Distance
Combines Manhattan and Euclidean
Always True Distance
.
8
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
9
Three Commonly Known Algorithms…
Dijkstra’s Algorithm Expand outward in all directions until goal found
Guaranteed Optimal Path, but slow
Best-First Search
Expand in direction of goal, until goal is found
Not Guaranteed Optimal Path, but fast
10
A-Star
Hybrid of first two
Expand in direction of goal node
Guaranteed Optimal Path, and is also fast
11
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
12
An experiment using A-Star 3x3x6 Factorial Design
▪ 3 Neighborhood Regions
▪ 3 Distance Functions
▪ 6 Different Maps
13
Factors Neighborhood Region
Heuristic Function
Map
Dependent Variables
Nodes Evaluated
Path Length
Runtime
14
Research Goals 1. Does Neighborhood Region affect Runtime?
2. Does Heuristic Function affect Runtime?
3. Does Neighborhood Region affect Nodes Evaluated?
4. Does Heuristic Function affect Nodes Evaluated?
5. Does Neighborhood Region affect Path Length?
6. Does Heuristic Function to Path Length ?
7. Does Path Length affect Runtime ?
8. Does Nodes Evaluated affect Runtime ?
15
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
16
Tests Used
Two Way ANOVA
▪ 99% Confidence for Goals #1 and #2
▪ 75% Confidence for Goals #3 and #4
▪ 95% Confidence for Goals #5 and #6
Goodness of Fit quantified by R-Squared
▪ Using Excel Trendlines
▪ For Goals #7 and #8
17
Research Goals
1. Neighborhood Region strongly affects Runtime F = 6.99 | F_Crit = 5.11
2. Heuristic Function has no significance on Runtime F = 0.01 | F_Crit = 5.11
3. Neighborhood Region slightly affects Nodes Evaluated F = 1.596 | F_Crit = 1.143
4. Heuristic Function has no significance on Nodes Evaluated F = 1.596 | F_Crit = 1.143
18
Research Goals
5. Neighborhood Region affects Path Length F = 3.432 | F_Crit = 3.204
6. Heuristic Function does not affect Path Length F = ~zero | F_Crit = 3.204
7. Path Length does not model Runtime very well R-Squared = 0.388
8. Nodes Evaluated models Runtime fairly well R-Squared = 0.898 Model: Runtime = 18.89*e0.111[Nodes Evaluated]
19
Goodness of Fit Charts Path Length vs Runtime
20
Goodness of Fit Charts Nodes Evaluated vs. Runtime
21
Introduction Neighborhood Regions Heuristic Functions Algorithms Empirical Study Analysis Results Threats to Validity Conclusion
22
Array-based A-Star
Time spent looping through arrays
External Validity
Tested using Personal Computer
Not the best runtimes
Runtimes scaled higher than usual
May still be generalizable
23
Want to minimize Nodes Evaluated
Avoid searching Swamps (dead-ends)
Use an appropriate Neighborhood Region
4-Way is best, but impractical
8-Way is the way to go
24
25