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

Hoftix tournament selection #956

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Hoftix tournament selection #956

merged 1 commit into from
Oct 24, 2022

Conversation

MorrisNein
Copy link
Collaborator

@MorrisNein MorrisNein commented Oct 24, 2022

Let's say len(individuals) is the size of the original generation, pop_size is the size of the subsample.

The error occurred when the conditions matched:

  • len(individuals) >= 21;
  • len(individuals) == pop_size + 1.

The last iteration of tournament selection attempted to select 3 individuals from the remaining 2.

Made the group size adaptive to the amount of individuals left.

@MorrisNein MorrisNein self-assigned this Oct 24, 2022
@MorrisNein MorrisNein merged commit 91c5ecf into master Oct 24, 2022
@MorrisNein MorrisNein deleted the fix_tournament_selection branch October 24, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants