0

I am trying to find a heuristic to solve a travel salesman problem but with more restrictions. Using the greedy is giving me a total cost of 3.839. Using A* with some estimation as a heuristic is giving me results of 4.0 to 5.35. Using A* while using greedy as a heuristic gives me the best result of 3.5.

Is this wrong? Using a greedy method as a heuristic for a A* algorithm? Does this fall under the category of non-optimistic? Meaning that It can't be used as a heuristic?

ps: this is a graph with many restrictions, with about 5 metrics, so I can't just calculate a distance to the final point.

  • ...What? A\* is a shortest path algorithm. The shortest path does not depend on your use of algorithm, it's a property of the graph. The heuristic given to A\* doesn't matter as long as it's [admissible](https://en.wikipedia.org/wiki/Admissible_heuristic). – BlueRaja - Danny Pflughoeft Jun 16 '22 at 19:30
  • 1
    If you solve TSP greedily (is that what you're doing?) you will get an *overestimate* which is the opposite of an admissible heuristic. Can you give some more details? Likely there will be some way to get a good admissible heuristic with linear programming, which is commonly used for that purpose for TSP and TSP-like problems. – harold Jun 16 '22 at 22:14

0 Answers0