-
Notifications
You must be signed in to change notification settings - Fork 10
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
Genome mutate - implements new logic for mutations #180
Genome mutate - implements new logic for mutations #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase your branch on current master? I think you branched off a while ago and now there are some changes in the PR which don't belong here.
47f99b8
to
a8034c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, great work @HenrikMettler! 🚀
this is quite a substantial change, so accordingly I had a few remarks. ;) they should be addressed before merging. please let me know if anything is unclear.
the fitness should be identical, independent of the number of processes as far as I remember. this is obviously desirable from a reproducibility viewpoint. is it possible that any of the stochastic operations are not using the internal rng of the population? that would be my first guess. |
Just noticed that |
As far as I can see the problem just arises when setting |
i would adapt the test logic as we are happy with the logic in mutate. maybe you can increase the mutation rate to |
what do you mean by "the problem"? is the fitness always the same except for running a single process? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is improving nicely! just added two more comments
I can't set it to '1.0' because of https://github.com/Happy-Algorithms-League/hal-cgp/blob/master/cgp/population.py#L37 ( |
Yes. (It also doesn't matter at which position in the vector |
ah, interesting. well, why don't we allow a mutation rate of |
this is not good and we should fix it before merging. i'll see whether i find time today to look into this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great, nice solution to the only_silent_mutations
testing 🚀
added a few more comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a few inline comments regarding the generation of random numbers
7efe834
to
742cc9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good, just some more nitpicking :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, four more small comments to fix and this is good to go! :)
you also need to rebase on the current master to fix the conflicts before we can merge
I am not sure how to fix to travis CI build issue, when I introduce a line break, black "refixes" it |
hmm, yeah, black and flake seem to bite each other here. i suggested a shorter variable name, that should do the trick :) |
863ed1e
to
11343f1
Compare
… random prob is below the mutation rate, evaluate permissible values for every gene, make a mutation always change the gene value, if more than one value is possible for this gene. Add test for number of mutations in a large population (must be close to expected value), test only silent mutation by monkey patching the indices selection function, testing permissible values for hidden and output region. Allow mutation_rates = 1.0.
11343f1
to
66393bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work, this look good 🎉 ✨
approving 👍 conditioned on travis passing
Implements the new logic for mutation discussed in #172. Closes #172 , #173 and makes #124 obsolete. Does not pass
test_parallel_population
in test/test_hl_api.py, since fitnes is not the with 1 or 2 parallel processes. I created the PR anyway since I couldn't figure out why and whether this is a problem with the new logic in mutate