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 indices arg to remaining selection operators #175

Open
5 tasks
SigmaX opened this issue Sep 18, 2021 · 1 comment
Open
5 tasks

Add indices arg to remaining selection operators #175

SigmaX opened this issue Sep 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@SigmaX
Copy link
Collaborator

SigmaX commented Sep 18, 2021

We've found it useful at least twice now to have selection operators that are able to return, not just an individual, but the index of that individual within the population.

This should become our new standard interface. We've already added an indices argument (which takes an empty list that the index is added to) to ops.naive_cyclic_selection(), ops.random_selection(), and to ops.tournament_selection().

Remaining operators that should support an indices argument:

  • ops.proportional_selection()
  • ops.sus_selection()
  • ops.truncation_selection()
  • ops.insertion_selection()
  • ops.cyclic_selection()
@SigmaX SigmaX added the enhancement New feature or request label Sep 18, 2021
@markcoletti
Copy link
Collaborator

This is an interesting development, and I can see where this would be useful.

Somewhere in the code I have some kind of one-liner for returning the index of a selected individual that I got from stackoverflow that could potentially be useful for some of these other operators. I'm not near the source right now, though, so I'll have to grep for it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants