evvo-labs / evvo

Solve multi-objective optimization problems with distributed evolutionary algorithms
Apache License 2.0
65 stars 4 forks source link

Size-limited populations #164

Open julian-zucker opened 4 years ago

julian-zucker commented 4 years ago

Is your feature request related to a problem? Please describe. When working on Evolving Fair Models, I notice that on long runs, the population size grows indefinitely. A 40,000-solution population slows down the improvement of solutions compared to a smaller population.

Describe the solution you'd like A size-limited population, that works like a FIFO queue (maybe with exceptions for Pareto-optimal solutions?).

Describe alternatives you've considered I could just write more deletors/allocate more threads to do deletion. However, getting that balance correct is difficult. I want some static guarantees about maximum population size. You can delete within those.

Additional context

drassaby commented 4 years ago

What do you think about adding behavior like this to strategies? Currently, our agent step scheduling is not flexible enough to support this (since strategies can only return wait times), but we could make the system more flexible by allowing strategies to specify run conditions (as predicates). One of these run conditions could be that the population size (which is already encapsulated by PopulationInformation) is less than some number. And then that strategy can be used for the modifiers and creators.

This would also have the benefit of deleting solutions according to deletors instead of some pattern we decide on.