4 ms·
What would a heuristic function look like for a "regular" graph (I.e. graphs as the data structures used for learning bfs, dfs, &c) then? I understand A* in ter
by yolesaber 14y ago
What would a heuristic function look like for a "regular" graph (I.e. graphs as the data structures used for learning bfs, dfs, &c) then? I understand A* in terms of the grid what with the x and y distance, but how would implementing distance work in a non-grid graph? I feel as though it would just be taking the weights of edges and/or nodes. And if that's the case, then it essentially regresses to being Dijkstra's.
- revelation 14y agoAny real world application for these algorithms will have the graph embedded in some kind of coordinate system. Euclidean distance is a popular heuristic given how it maps to the real world idea of "distance".