Post
The algorithm that stops NPCs from walking into walls like complete idiots.
A* (pronounced 'A-star') is the gold standard pathfinding algorithm in games. It finds the shortest path between two points on a graph by combining the actual cost of the path so far with a heuristic estimate of the remaining distance. It is smarter than Dijkstra's algorithm because the heuristic lets it explore promising directions first instead of blindly checking every possibility. Most games use A* on top of a navigation mesh (navmesh) -- a simplified walkable surface that tells the algorithm where NPCs can and cannot go. Variations like Hierarchical A* and Jump Point Search optimize it for large maps.
Example
Age of Empires II uses A* pathfinding for hundreds of units simultaneously, and the Definitive Edition rewrote the pathfinding system to handle larger groups more intelligently -- fixing one of the original game's most notorious frustrations.
Why it matters
Pathfinding is one of those things players only notice when it breaks. Good A* implementation means NPCs that navigate naturally. Bad pathfinding means escort missions where the NPC you are protecting walks straight into lava.
Related concepts