It seems impossible to find the shortest path of the minimum curve through shortest walk add-on

pipevideoplay 0112_finding_path_videoplay

2D_straight_square_help.gh (28.8 KB)
Hi, I coded using the shortest walk of grashopper.
Shortest walk is built on the basis of A* algorithm and does not find a way to the shortest path to the minimum curve.
It seems impossible to find the shortest path of the minimum curve through the A* algorithm.
Is there any other add-on to use in grashopper?

No need of doubling posts