This PR introduces major API changes for the Emitter class. Emitter class now requires a Ranker object and a Selector object.
The Ranker object will define a rank function which returns the index of the solutions in the descending order that they should be in. It will also define a reset function which resets the internal states of the object.
RandomDirectionEmitter, OptimizingEmitter, and ImprovementEmitter are now all combined into EvolutionStrategyEmitter, which can be configured to use different Ranker's.
We also introduce FilterSelector and MuSelector objects which defines a select() function that decides how many parents to select from the potential parents.
EvolutionStrategyEmitter(x0, sigma0, ranker=Ranker, string, selector, ES, restart_rule, bounds, batch_size, seed)
If ranker=str, then we create the object for you
TODO
[ ] Implement ImprovementRanker
[x] Implement TwoStageImprovementRanker
[x] Implement RandomDirectionRanker
[x] Implement TwoStageRandomDirectionRanker
[x] Implement ObjectiveRanker
[x] Implement TwoStageObjectiveRanker
[x] Implement get_ranker(str) -> Ranker
Others
[x] Add documentation for all new classes/functions
Description
This PR is a split from #207
This PR introduces major API changes for the
Emitter
class.Emitter
class now requires aRanker
object and aSelector
object.The
Ranker
object will define arank
function which returns the index of the solutions in the descending order that they should be in. It will also define areset
function which resets the internal states of the object.RandomDirectionEmitter
,OptimizingEmitter
, andImprovementEmitter
are now all combined intoEvolutionStrategyEmitter
, which can be configured to use differentRanker
's.We also introduce
FilterSelector
andMuSelector
objects which defines aselect()
function that decides how many parents to select from the potential parents.EvolutionStrategyEmitter(x0, sigma0, ranker=Ranker, string, selector, ES, restart_rule, bounds, batch_size, seed) If ranker=str, then we create the object for you
TODO
ImprovementRanker
TwoStageImprovementRanker
RandomDirectionRanker
TwoStageRandomDirectionRanker
ObjectiveRanker
TwoStageObjectiveRanker
get_ranker(str) -> Ranker
Others
Status
yapf
pytest
pylint
HISTORY.md
.