2.3.5 - Pathfinding Algorithms Flashcards
What is the purpose of a pathfinding algorithm?
To find the shortest path between two nodes in a weighted graph.
What are the two types of pathfinding algorithm?
Dijkstra’s Algorithm.
The A* Algorithm.
What can graphs be used to symbolise?
Towns and cities and the distances between the two.
Networks with nodes representing devices and arc costs representing network traffic.
What data structure is Dijkstra’s algorithm implemented using?
A priority queue.
How does Dijkstra’s algorithm differ from the A* algorithm?
The A* algorithm uses heuristics to find an approximate value. This means that every path doesn’t have to be checked and so the algorithm is much faster and only slightly less effective.