Create component like Galapagos using Python

Hi @alexandre.flamant,

I wouldn’t think of it as replicating Galapagos in GHPython, but rather look into how to code genetic algorithms and evolutionary solvers. The principals of the algorithm might stay the same or at least remain similar for many tasks, but in my opinion it’s better to integrate and customise it for each individual task.

Here’s a Python example I did a while back for finding optimised solutions to the travelling salesman problem with an evolutionary approach.
It’s not perfect, but it shows at least two things:

  1. How to structure/set up an animated GHPython component (which by the way I learned from Anders)
  2. How to structure/set up the algorithm (populations, fitness, mutations, etc.)