pathing

Algorithm to find the shortest path, with obstacles

廉价感情. 提交于 2019-11-30 06:24:32
问题 I have a collection of Points which represents a grid, I'm looking for an algorithm that gets me the shortest distance between point A and B. The catch being any point (excluding A and B) can have an obstacle obstructing the path, and thus must be detoured. The path may not move in diagonals. For anyone else looking to solve this type of problem, I found these references to be very useful: http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html http://en.literateprograms.org

Algorithm to find the shortest path, with obstacles

余生长醉 提交于 2019-11-28 18:02:33
I have a collection of Points which represents a grid, I'm looking for an algorithm that gets me the shortest distance between point A and B. The catch being any point (excluding A and B) can have an obstacle obstructing the path, and thus must be detoured. The path may not move in diagonals. For anyone else looking to solve this type of problem, I found these references to be very useful: http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html http://en.literateprograms.org/Dijkstra%27s_algorithm_%28Java%29#chunk%20def:visit%20each%20vertex%20u,%20always%20visiting%20vertex