Hacker News new | ask | show | jobs
by tines 770 days ago
What heuristic distance function is being used? If it were using Euclidean distance, wouldn’t it be a lot more efficient and not pursue paths that are going in literally the opposite direction as the destination?
2 comments

I use Squared Euclidean distance. Yes, dijkstra algorithm like that way. But if you want to pursue to destination i need to implement A* too.
Yeah, Dijkstra is more for graph search where maybe you have weights but not actual vectors. But this does give a nice visualisation of how far you can get from a single point in a given time.