Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selectors (FilterSelector and MuSelector) which determines how many solutions to use as evolution parents #217

Closed
wants to merge 5 commits into from

Conversation

itsdawei
Copy link
Collaborator

@itsdawei itsdawei commented Jun 23, 2022

Description

This PR is a split from #207

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

  • MuSelector
  • FilterSelector
  • Documentation
  • Testing

Questions

  • Clarify how MuSelector is supposed to work

Status

  • I have read the guidelines in CONTRIBUTING.md.
  • I have formatted my code using yapf
  • I have tested my code by running pytest
  • I have linted my code with pylint
  • I have added a one-line description of my change to the changelog in HISTORY.md.
  • This PR is ready to go

@itsdawei itsdawei changed the title add selectors.py Add selectors (FilterSelector and MuSelector) which determines how many solutions to use as evolution parents Jun 23, 2022
@itsdawei itsdawei linked an issue Jun 23, 2022 that may be closed by this pull request
@itsdawei itsdawei added the API label Jun 23, 2022
@itsdawei itsdawei self-assigned this Jun 23, 2022
@itsdawei
Copy link
Collaborator Author

It is unclear whether a separate class is needed for each selector, as the current selectors (FilterSelector and MuSelector) are very simple. Until more future developments that justifies the use of a separate class, we will be closing this PR for now.

@itsdawei itsdawei closed this Jun 23, 2022
@itsdawei itsdawei mentioned this pull request Jun 30, 2022
19 tasks
@btjanaka btjanaka deleted the add-selector-api branch July 2, 2022 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce duplicate code between CMA-ME emitters
1 participant