Add configurable InitialPopulation factory
Created by: gkirgizov
It will generalise the way of getting initial population for EvoGraphOptimiser.
Thoughts on this:
- Currently optimiser accepts optional list of fixed initial individuals. Instead it would be more flexible to provide some kind of factory of initial population.
- It's good to hide from GraphOptimiser details of how initial population is generated.
This should hide
self.initial_individuals
and details in_init_population
from the optimiser. Why so? Because for better separation of responsibilities the configuration of optimiser must happen outside of optimiser. It can be, for example, done in Composer. - We need to support ways to configure initial graph generation function OR initial graphs
The class
InitialPopulationBuilder
is a step in this direction, and it already encapsulates much of functionality related to initial graph generation. - Drop
InitialPopulationBuilder.with_mutation
-- only Optimiser should really know about mutations or other evo operators