A*: Dijkstra With a Sense of Direction
Save My Interview
0:00 / 0:00
A*: Dijkstra With a Sense of Direction
7 просмотров · 12 дн. назад
Save My Interview
12 подписчиков
7 просмотров · 12 дн. назад
A* is the pathfinding algorithm behind games, robots, and GPS — Dijkstra plus a
heuristic that aims the search at the goal. This episode animates A* expanding
by f = g + h and skipping nodes Dijkstra would have explored. (Graph Algos II.)
• f = g + h: real cost so far plus an estimate of the cost to go
• An animated run showing the heuristic steer past dead ends
• The Python implementation — Dijkstra with one extra term
• Admissible heuristics, and why they guarantee the optimal path
• h = 0 turns A* back into Dijkstra; sharper h explores less
• Where it's used: game AI, robotics, GPS routing
Chapters:
0:00 Intro
0:21 f = g + h
0:47 A* run (animated)
1:41 A* in Python
2:16 The heuristic is everything
2:44 Complexity & uses
3:10 Recap — and Trie next
#AStar #Pathfinding #Graphs #Algorithms #Python #GameDev #InterviewPrep