Avoid duplicate work for steady state and base evolvers. Have one evolver that can do both generational EA, but also allow for extra individuals to be generated on the fly to make use of idle cores. #65
Labels
enhancement
New feature or request
In base evolver, it is common to have idle cores while the last few individuals in a population are being evaluated. In the steady state evolver, a new individual is generated and sent to dask when a core is idle. This eliminates idle cores. However, in some cases the generational approach performs better, hence the need to keep both possible.
Currently, we have fixed population size EA in Baseevolver, and pure steady state EA in the steadystateevolver. (These also have slightly different uses for the same parameter names, which is confusing). We also now have to estimators, one for each evolver. Maintaining both revolvers can lead to duplicate work.
We could have one evolver that supports both the classic generations approach, steady state, and generational with extra individuals for idle cores. (Note, this does not mean having separate implementations under one evolver. The same implementation can be used for both)
The parameters of this evolver could be:
generations # stopping condition based on the number of generations
initial_population_size # number of individuals in the initial population
parent_size # number of parents that are available to be used for generating new offspring
offspring_size #number of individuals generated each generation.
opportunistic_offsprint (bool) # This is whether we allow extra cores to be used for extra individuals within a generation (ignored if offspring_size=None)
In this API, if offspring_size=None, then we update the parent population after every individual as they complete the evaluation. if offspring_size is an int, then the algorithm is equivalent to the generational approach. if opportunistic_offspring is True, then we also generate extra individuals during the generational approach if cores are idle.
I believe this can be implemented with the existing steady state evolver by adding a conditional as to when the parent population is updated.
if offspringsize>0 : Only update the parent population if we completed evaluating all offspring this generation (not including extras) OR
else: update parent population after every individual.
The text was updated successfully, but these errors were encountered: