Dijkstra’s algorithm and A* algorithm are two classic graph search algorithms in geometry, which can find the shortest path between any two nodes on a weighted graph as shown in Figure 2. In weighted graphs, the shortest path exactly equals the least cost path [3]. That means finding an optimal path on a weighted graph equals finding the shortest path on it.