It seems true, but I canβt find anyone on the Internet saying that it is, so I would like to make sure. Please tell me if you agree, and if so, why. Ideally, a reference to paper or, if you do not agree, a counterexample.
Let G be a directed graph with some negative edges. We want to run A * on G
First of all, if G has negative cycles that are reachable from the source and achieve the goal, there is no valid heuristic, since it is impossible to underestimate the cost of achieving the goal, because it is -β .
If there are no such cycles, there may be a valid heuristic. In particular, the sum of all negative edges will always underestimate the cost of achieving the goal.
I get the impression that in this case A * might work fine.
PS I could run Bellman-Ford on the chart, detect negative cycles, and if there are none, outweigh to get rid of the negative edges. But, if I know that there are no negative loops, I can just skip this and run A *.
This is trivially wrong. The value of the peak is the sum of the heuristic and the path built so far ... while the heuristic underestimates the cost of achieving the goal, the sum of the heuristic and the path traveled so far cannot. Maxima culpa.
It seems that sorting an open set with a function that underestimates the cost of achieving the goal, while passing through a given vertex may work, although ... if <sum of negative edges in the graph> used as such a function, it looks like degenerate bypassing the schedule.