Galapagos Run Time Limit Problem / Feature Request

Hello,

I’m experiencing trouble with the run time limit of Galapagos. It doesn’t seem to matter whether I set it or not – in both cases, Galapagos will go on making new generations until I manually stop it.

This issue is especially bothersome because I’m benchmarking Galapagos, Goat, and an optimization plug-in I have been building, so I need to make sure to compare the same run times.
Is there anything I could be doing wrong? Or is this a bug?

Thank you!
Thomas

PS: I’ve also noted that Galapagos always takes the existing solution as a gene, which means that I have to randomize it, or set it back to a fixed starting position. One can see this use of the existing solution as a bug or feature, but it took me awhile to realize what was happening.

PPS: I also have a feature request: It’d be great if one could automatically run Galapagos multiple times (assuming the run time limit works), with Galapagos logging the several runs. (For that to work, one would have to randomize ALL the genes, or at least have the option.) Actually, allowing multiple runs is not only useful for benchmarking, but also not unheard of from a global optimization point of view – it would allow a multi-start approach (e.g. http://link.springer.com/chapter/10.1007%2F978-3-319-20469-7_6).

Yup, you’re right, the time limit is ignored. That’s a bug.

You’re also correct in that the current slider layout is always used as one of the seeding genomes. I agree it probably shouldn’t do that unless the ‘Start from slider setup’ button is used. This is also something I can probably easily fix.

As for your feature request, that’s not going to happen for GH1, I’ve got a long list of improvements planned for Galapagos in GH2, but that’s definitely a long term plan.

I tried fixing the bugs, but it’s hard to know whether I caused other ones without extensive testing. You can try and replace the GalapagosLibrary.gha and Galapagos.dll files on your machine with the attached ones, but keep the old ones around in case you need to switch back (easiest solution is to rename them GalapagosLibrary.ghaold and Galapagos.dllold while keeping them in the same folder). I’m not even entirely sure they will load correctly on the old Grasshopper so this may be a very short test.

I’ll also move these changes into the Grasshopper code that ships with Rhino WIP/Beta, so it will eventually be available via official channels.

Fixes:

  • Duration limits should now work and are correctly restored between sessions.
  • The exact slider layout is no longer part of the seeder generation.

GalapagosFixes.zip (242.5 KB)

Hi David,

thanks for the quick response and fix. The files load, and the slider layout bug looks indeed fixed.
The time limit has an effect now - however it’s a bit strange:

The optimization doesn’t stop: Instead I get lot’s of generations with more or less the same genes (it looks slightly randomized), but with "undefined’ fitness (see the image below and the attached log) . This more or less works for my purposes - I can pick out where the time limit stopped by looking at the fitness “NaNs”. Still, of course if would be easier if the process just stopped.

Cheers,
Thomas

galapagos_log.txt (1.0 MB)

Darn, I saw that too, but I wasn’t sure whether it was a new bug. I’ve never seen it before, but then I shouldn’t have been anywhere near the measuring code. Sadly the problem went away once I began debugging it, but I’ll try again today.