Grasshopper) Can solve this problem?

I saw the video on the link below.
https://www.grasshopper3d.com/video/traveling-salesman-problems
When I downloaded the sample file of the video, the TSP algorithm was applied.
I tried to transform it.
It is made of one polyline.
But I want two independent lines intertwined.
And the lines should not overlap or collide.
It will be an interesting outcome.
It’s too complicated and difficult for me.
Can you help me by any chance?

If you’re interested in the Travelling Salesperson algorithm, you can for instance check out this thread of mine:

2 Likes

Yes, it explains the traveling salesman problem algorithm well.
However, the problems I want to solve are as follows.
If I calculate the TSP path for each of the points in group 2 and connect the polylines for each,
(It’s a thick line)
Since the line has a volume in 3D space, some places will have parts where the two lines collide and overlap.
I want to solve this part. It’s a bit of a difficult problem.

Well … have in mind:

  1. A TSP either works (in all occasions/pts collections) or not. There’s various TSP algos (most of them are crap). The so called 2Opt is the best balance (speed/faultless result). The “accuracy” is user controlled (loops) … but for a “normal” pts collection (and some sort of “special” concave polyline) 2 loops is all what you need. See mp4 below (each frame is using a different set of rnd points).
  2. A TSP that’s slow (or very slow) say against 1-5K points is a theoretical take on that matter … meaning more or less pointless.