[Tutor] "Path tree"

Michael C mysecretrobotfactory at gmail.com
Mon Aug 14 15:10:52 EDT 2017


http://imgur.com/a/CwA2G

I don't know to do this with math :(








On Sun, Aug 13, 2017 at 1:07 PM, Michael C <mysecretrobotfactory at gmail.com>
wrote:

> 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