I'll explain this optimization method with an example I made up, suppose you have two points and you want to find a path connecting them of length 10 when the straight line distance between them is 5. Further restrictions are that you will make your path with 6 segments, and that you want the x values of these 5 middle points to be increasing from left to right and the y values greater or equal to the starting points.
So now I looked over that range but in intervals of (1/2) instead of integer values.
[ ((0, 0), (1.5, 2.5), (2.5, 4.0), (3.5, 4.0), (4.5, 1.0), (5, 0)))]
which has length: 9.99856323407292
So I think this method of roughly dividing the search space, looking at the top small percentage of solutions, then refining the search space based on the extreme values of those solutions and searching that space with more refinement works well to cut down on the amount of time needed to find a very good solution.