Hey guys,
I just recently made a program that implements Dijkstra's algorithm for finding the shortest path in a provided graph. What I have is a 3d representation of a graph with the cost of each edge being the distance from the nodes it connects to. If anyone knows anything about Dijkstra's algorithm it is that it exhausts all possibilities before coming to the best solution. Although my program works really fast with a graph of 9 nodes and 16 edges (I think...), this function can get costly quick if there are about 10 enemies and about 30 or 40 nodes to traverse to(and even more edges!).
Anyways, my question is that I want to implement the A* algorithm but not too sure what to use for the heuristic value. I know some people use their H value to be the direct distance from that node to the destination node. However, depending on how the graph is setup, this is not always the best way. Although it will be able to find a path to the destination, it won’t always be the shortest path.
If I couldn't find a way to implement A* accurately, then I was considering optimizing Dijkstra's algorithm. Maybe I can have a queue that will perform the shortest path function maybe 3 or 4 times for each game cycle. Another thought is to have a two-tiered path finding system. If the agent needs to travel across the map, then it can traverse through a macro sized graph and once it gets closer to its destination, then traverse through a micro sized graph.
What do you guys think?

If at first you dont succeed, call it version 1.0.