Wiki says, that heuristic function is estimate of the distance from the current node to the goal in that case.
But there are no description of function heuristic_cost_estimate
in this code: link to wikiperida
AM I RIGHT?... For example, I have graph with 3 vertexes. I must have 3 heuristics from each vertex to goal vertex and I set up with setting up vertexes?
Matrix (weight):
0 5 2
1 0 3
1 2 0
Heuristic function for each vertex (values means heuristic cost from current vertex to goal, for example cost from 2 to goal will be 3):
5 3 4
It is strange assumption, isn't it? I don't know what vertex would be goal. How I can set up heuristic function at this step?
OR?... I have 3 vertexes and 9 heuristics.
Graph matrix:
0 5 2
1 0 3
1 2 0
Heuristic cost:
0 5 10
5 0 10
3 8 0
It means this. If 3 is goal, heuristic cost from 1 to goal will be 3. If 2 is goal, cost from 1 to 2 (goal) will be 5.
OR I AM NOT RIGHT?
What is heuristic function in my case (finding optimal path on graph)?