Why does my Galapagos find such a bad solution?


I am new here and I have a question concerning Galapagos.

I am trying to approximate a nurbs curve with 3 arc segments. The 2 division points (-> split the curve in 3 segments) can be adjusted along the nurbs curve by 2 sliders.
I created some piece of code that splits the nurbs curve, creates the arc segments and measures the deviation from the original nurbs curve (Fitness function). I tested my code by moving the sliders manually and found quite a good solution but it took me some time.

To find a good solution more quickly (and more exact) in the future I want Galapagos to move the sliders.

Unfortunately Galapagos never reaches a solution as good as the one that I found manually…not even close to it.

I know that the solution process of the Evolutionary Algorithm is dependent on the starting value. So I gave my manually found slider values (that were quite ok already) to Galapagos as starting values. It doesn’t help unfortunately… Galapagos seems to forget my “good” values and moves the sliders somewhere else and I get a worse result than with the starting values.

Can anybody tell me why that happens or how I can adjust parameters in the algorithm to make it work properly?

If it helps I can also post my .gh here.

Kind regards,


Can you upload the file so I can see it running (and failing) on my machine?

It could be a bug in the solver, it could be a problem with the fitness function, can’t tell without seeing it.

I looked through my code and I think there is a problem with my Fitness function. It reactes in a way that I dont understand at the moment.

So I am pretty sure now that there is no bug in the solver.

Sorry for bothering you! :see_no_evil:

Kind regards,