Behind the science
A* finds a path by minimizing f(n)=g(n)+h(n), where g is travel cost and h estimates remaining distance. This four-neighbour grid uses Manhattan distance. Increasing the heuristic weight can speed exploration, but values above 1 no longer guarantee the shortest route.