Heuristic in the a*

I’m applying a* in an indoor environment, what would be the best way to calculate the heuristic?

You’re not giving us nearly enough information to even begin to answer your question.

Please take look at the documentation and try to formulate a more concrete question based on the example given.


arestas_header.csv (916,Bytes)
vertices_header.csv (1,6,KB)

Well, I think I did a poor job of formulating my question. But here’s the environment, my question would be how to calculate the heuristic of the best formula in this environment, since to move around in it you would have to make curves, it would not be in a straight line. Well, I’m just imagining that these details of the environment might offer a not so good heuristic. One way would be the Euclidean distance, since I have the x, y points of each vertex, but I don’t know if it would be the best way to calculate the heuristic. Just to exemplify what I said, imagine that the person wants to go from vertex 39 to 56, it would not be a straight path. The edges and vertices files contain the information of this environment

This question is not really about graph-tool at all, but help with understanding how to use A* search in particular problem, so it’s a bit off topic.

In any case, I do not see any issue with using euclidean distance. The quality of the heuristic does not need to be perfect (or even good) for the algorithm to work.

You should experiment.

Thank you very much, I tried with the Euclidean distance it was good. I thought it would be an impediment, because of the environment

1 Like