I'm trying to design an algorithm finding the shortest path between two nodes in a graph such that this path has the minimum number of changes of directions. So, the path would be the shortest and straightest of all. For the shortest part, I would apply a Dijkstra algorithm but I don't know how to modify this to match the straightest part.
Any help would be appreciated.
0 · ·