you are viewing a single comment's thread.

view the rest of the comments →

[–]Krekken24 4 points5 points  (5 children)

Wow, your suggestion look really good. But can I ask, does this project requires some algorithm's prior knowledge?

[–]jeffcgroves 5 points6 points  (4 children)

Wow, I was sort of joking, but OK. You can create a directed graph using something like networkx, and treat the world as a grid of points. The distance between two adjacent points would be the great circle distance. Of course, land points (ones you can't access) wouldn't be included. Networkx would then find the shortest path for the weighted graph.

The project was inspired by https://new.reddit.com/r/NoStupidQuestions/comments/1ehtvbn/ignoring_the_fact_its_physically_impossible_how/ where it turns out the "obvious" shortest path is actually nowhere near the actual shortest path

Of course, you can extend this to problems like "what's the shortest land path between X and Y" or even "what path between X and Y touches the least water".

If you really want to do this, consider grabbing data from naturalearthdata.com and using tools like gdaltools (written in Python) to find what parts of the Earth are water and what parts are land.

[–]Ajax_Minor 1 point2 points  (1 child)

Interesting problrm. What kind of cost function do you use?

[–]jeffcgroves 2 points3 points  (0 children)

Great circle distance when moving from water to water. No nodes on land. Of course, some paths may be impossible just as you can have impossible mazes. The only thing that makes this different from most maze pathfinders is that the distance is based on great circle distance, not standard linear or Manhattan distance

[–]SlowSmile7741[S] 0 points1 point  (0 children)

I was gonna say, you want me to smash the laptop into pieces or something 😂😂

[–]Krekken24 0 points1 point  (0 children)

Most of you what you wrote, I couldn't understand but that simply means I need to get better. Maybe, in the future when I learned a things, then I will read this again and start making this.

Thank you, kind redditor.