Galapagos target value

galapagos

#1

For reasons of sanity, I will dispense with the long description of my project and simply say that I have only two sliders in my GH project — all to do with lines and angles. For this I wish Galapagos to “tune” the two sliders.

So I ask: How do I define a fitness target value of “90” when the fitness function only has Minimize and Maximize?


#2

I should also say: what if there’s multiple solutions to attaining “90”?


(David Rutten) #3

You type “90” where it reads Minimize or Maximize. It’s a text field that accepts numeric input.
You could also use an expression along the lines of Abs(x - 90) inside the Grasshopper file and then minimize that value, but I recommend setting the exact target value.


(David Rutten) #4

In that case Galapagos will only find one. If you use the Simulated Annealing solver (the crystal icon) then you will get multiple runs, and each time a new solution may be found. This is actually a pretty good way to figure out a decent global solution; first run the SA solver N times, then when you terminate it, it will select the best solution it found and you can then use the Evolutionary Solver to improve upon that coarse result using the ‘Start from slider setup’ rather than just the plain ‘Start Solver’ button.


#5

Thanks David, but I’m at an impasse now. The project is far too complicated to explain in safe terms without revealing sensitive IP. I wish I could share my screen over FaceTime or something.

It just seems to me that the most dynamic tool of GH is also the most vague when defining a possible solution.


(David Rutten) #6

Since Galapagos only cares about inputs (sliders) and outputs (a single number describing fitness), you should be able to rip out everything sensitive in between and replace it with something simple and shareable. Did you manage to use Galapagos on a simple case (like fitting a circle to some points, or some such trivial task)? If you haven’t tried that, I’d recommend starting there. Pick something where you can see that the answer is correct just to get a feel for the software.

Do note that there are setups where Galapagos will not be able to find an answer. The input sliders need to have a certain amount of continuity (sometimes called ‘linearity’). That means that a slight perturbation of a slider results in only a slight change in fitness. If there are too many sudden jumps in fitness, then GP will get lost too easily.

Of course in practice certain continuous setups are also unsolvable simply because a single iteration takes too long to compute. GP will need a couple hundred stabs before it starts generating suggestions that are even half-way worth considering.


(David Rutten) #7

We can try and set something up, but it’s close to midnight here in central Europe so tomorrow at the earliest. What’s your time-zone?