What is A* pathfinding, and how do better heuristics speed it up?

Have you ever wondered what makes a video game character find the shortest route across a map, or lets a warehouse robot navigate efficiently between shelves? The answer is often a single algorithm developed in 1968 that remains in wide use today: A*, pronounced "A star."
A* is a search algorithm designed to find the shortest path from a starting point to a goal. Its core idea is to avoid blindly scanning every possible route and instead guide the search intelligently using a "heuristic function" that estimates how close a given point is to the destination.
The quality of that heuristic function directly determines the algorithm's speed. A crude estimate causes the algorithm to explore far more paths than necessary, while an accurate but still "optimistic" estimate can steer the search toward the goal much faster.
The simplest heuristics typically rely on straight-line calculations such as Euclidean distance, but these tend to underestimate the true distance whenever a map includes walls, obstacles, or winding routes.
Differential heuristics take a different approach to this problem: by precomputing and storing the actual distances to a handful of fixed "landmark" points on the map, the algorithm can use that information during the search to produce far more accurate estimates.
The trade-off is that this approach requires extra memory and upfront preparation time for the precomputation; but on large, complex maps, the speed gained during the actual search can more than offset that cost.
A*'s practical relevance extends well beyond game development: robotic navigation, logistics route planning, network routing, and even some AI planning systems rely on similar search logic.
The fact that the algorithm has remained in use for more than half a century is a striking example of how durable a foundational idea in computer science can be; current research continues to find new ways to improve its performance.
For developers, the practical takeaway is clear: choosing the right heuristic can sometimes produce a far bigger performance difference than changing the algorithm itself.
These kinds of fine-tuned improvements continue to run quietly behind the pathfinding systems operating on billions of devices today; whenever a map app calculates a route, or a game character navigates around an obstacle, some variant of A* is likely at work.
Read next

Planned Amazon data center could become the biggest climate polluter in the U.S.
As part of a planned Texas data center, Amazon is investing in an on-site power plant that could reportedly become the single largest source of climate pollution in the United States. The development highlights growing concern over the energy demands of AI infrastructure.

New Mexico judge orders Meta to fund $567M youth mental health program
A New Mexico judge has ruled that Meta's platforms constituted a "public nuisance" and ordered the company to fund a $567 million program addressing the youth mental health crisis. The ruling is seen as a significant precedent in the wider wave of lawsuits against social media companies.

How AI hurricane forecasting is buying meteorologists an extra day's warning
DeepMind's open-source WeatherNext model can produce surprisingly accurate forecasts even when fed lower-resolution weather data. The result is giving meteorologists an extra day's lead time on predicting a hurricane's path compared with traditional physics-based models.

Why do hacking groups get codenames? A cybersecurity explainer
Google recently overhauled how it assigns names to hacking groups. TechCrunch spoke with one of the world's foremost hacker-tracking experts to understand why security companies give threat actors codenames in the first place.

Why Microsoft Edge is about to lock out older ad blockers
Microsoft Edge is ending support for the Manifest V2 extensions platform, the same move Google Chrome made earlier this year, which will disable the uBlock Origin ad blocker and others like it. The impact on most users will be limited, but the shift is part of a broader transformation of the browser extension ecosystem.