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

fixed fitnesses being invalid for mutate with fitness #30

Merged
merged 1 commit into from
Jun 18, 2023
Merged

Conversation

philswatton
Copy link
Collaborator

This PR:

  • Fixes a problem wherein if we mutate with probability inverse to fitness, the fitnesses no longer correspond to the new teams after the selection step
  • Separates out the selection step from the crossover step
  • Adds match_fn as a parameter to genetic in genetic.py, meaning different match generation functions in matches.py can be passed

I haven't bug tested this at the time of writing so watch out for any mistakes!

@philswatton philswatton requested a review from phinate June 16, 2023 12:35
@phinate
Copy link
Collaborator

phinate commented Jun 18, 2023

On first glance, this seems to be right -- I'll recruit you at some point to write a couple tests in the future though once we sharpen the codebase :D Happy to merge (and will do so)

@phinate phinate merged commit 588a442 into main Jun 18, 2023
@phinate phinate deleted the selection branch June 18, 2023 14:34
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