[Tutor] "Path tree"
Michael C
mysecretrobotfactory at gmail.com
Sun Aug 13 16:07:53 EDT 2017
Hi all:
I am trying to formulate a "path-finding" function, and I am stuck on this
problem:
Please look at the picture attached: Those dots are coordinates of (x,y),
and this tree can be thought of as a list of tuples, with each tuple
consisting of (x,y). Now I am trying to make a function go through this
list of tuples and then return the "path." to go from, say, 4 to 8. If I
simply compute for the dot for shortest distance, then the solution would
be to go from 4 to 8 direct, but that doesn't work, because the correct
solution should have been 4,3,2,5,6,8.
How do I do this?
Thanks!
More information about the Tutor
mailing list