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

[Possible Bug] GTournamentSelector #67

Open
cristianocca opened this issue Apr 4, 2015 · 0 comments
Open

[Possible Bug] GTournamentSelector #67

cristianocca opened this issue Apr 4, 2015 · 0 comments

Comments

@cristianocca
Copy link

Looking at the code of GTournamentSelector, it seems like it is not considering if maximizing or minimizing when selecting from the candidates.

if population.sortType == Consts.sortType["scaled"]:
choosen = max(tournament_pool, key=key_fitness_score)
else:
choosen = max(tournament_pool, key=key_raw_score)

Since in GASimpleGA.py to use elitism it considers the min/max param, it seems like this one should do it as well and use min instead if minimizing.

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

No branches or pull requests

1 participant