#computer-science/algorithm
## The hidden beauty of the A* algorithm

- 💡 A* algorithm is a variant of Dijkstra's algorithm that incorporates additional information about the graph, making it faster and more efficient.
- 🌍 **A* uses potentials (heuristics / direction)** to create a graph with non-negative edge lengths, making it easier to find the shortest path.
- 🧠 Potentials should be optimistic estimates of the actual distance and must be computable fast, as they are used to reweight edge lengths in the graph.
- ⚡ Implementing A* involves changing only one line of code in Dijkstra's algorithm to allow for implicit reweighting based on potentials.
- 🎯 A* algorithm has wide-ranging applications, from solving map navigation problems to 15 puzzle games, showcasing its versatility and effectiveness.
> ### Dijkstra doesn’t care about the direction but A\* does. Therefore A\* is fast.
## A* star algo on real map
