The A* algorithm is a graph search algorithm that finds the shortest path between two points on a graph, balancing between Breadth First Search and Dijkstra’s Algorithm by using heuristics to guide its pathfinding.
The algorithm works by maintaining a priority queue of nodes, expanding nodes that are estimated to be closer to the goal first.
A* is optimal under the condition that the heuristic used does not overestimate the distance to the goal.
A* can be implemented in a variety of contexts beyond grids, such as real maps and other graph-based systems, by appropriately designing the heuristic and movement cost functions.
Get notified when new stories are published for "🇺🇸 Hacker News English"