A Star Pathfinding

1 min. read

A* (pronounced “A-star”) is widely used in video games, maps, and other applications where finding the shortest path between two points is important.

Introduction to A* Pathfinding

What is path finding?

Path finding normally involves an algorithm that calculates a path between A and B.

There are an number of different path finding algorithms, for example, Dijkstra’s Algorithm, which Google Maps uses to navigate you to the nearest/fastest locations. It finds the shortest path to all other nodes

How does A* Pathfining work?

A* works by combining the strengths of two other algorithms: Dijkstra’s algorithm and the best-first search. Like Dijkstra’s algorithm, A* uses a priority queue to visit nodes in the search space based on their estimated cost. However, unlike Dijkstra’s, which always expands the node with the lowest cost, A* uses a heuristic function to estimate the cost of reaching the goal from each node. This heuristic allows A* to prioritize nodes that are more likely to be on the optimal path, resulting in faster search times.


Video References

Website References