A* Data Structures and Heuristics Flashcards
Ways of improving pathfinding performance
A* data structures
Heuristics for pathfinding
A* variants for pathfinding
Types of data structures we can use on the Open and Closed lists of A*
List ordered by F-Value
Array where we can use binary search
Priority Heap
Priority Heap defenition
Binary tree where all nodes are ordered in relation with their parent
Define Insertion on Priority Heap
Insert element on next available position (left to right)
Heapify Bottom up
Insertion Complexity on Priority Heap
O(log n)
Define Extract on Priority Heap
Replace root with most bottom-right value
Heapify Top Down
Extract Complexity on Priority Heap
O(log n)
When should we use Node Array A*?
When we want to trade memory for speed
What should we do different on Node Array A* compared to A*?
Create an array with node records for all nodes in the graph before the algorithm begins
Number nodes using sequential integers
Give an adittional feature to the nodeRecord called Category (unvisited, open, closed)
Why is Node Array A* faster?
Testing if a node is in open or closed is very fast
Closed List is not needed
Open list is now ordered by F value
Fill definition
Number of nodes considered by the search algorithm but are not part of the shortest path
Examples of heuristics for open spaces
Euclidean distance Manhatan distance (where diagonall movements are not allowed)
What are good ways to Solve Ties in the Open List?
Prefer nodes with lowest heuristic value
Slightly increase the value of the heuristic
Prefer recent nodes
For indoors levels should we use traditional distance heuristics or cluster based heuristics?
Cluster based heuristics
Define Cluster Heuristics
Group nodes in clusters
Clusters represent regions of the level highly interconnected