-
Notifications
You must be signed in to change notification settings - Fork 333
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
Why parameter ‘prob_crossover’ is 0? #17
Comments
Hey, this is largely due to how NEAT defines crossover:
From "Evolving Neural Networks through Augmenting Topologies" In the implementation (of this repository) it is stated a bit more clear: Take all genes from the more fit parent. With some chance take some of the weights of the less fit parents for those genes that match up. Since WANNs don't use weights, this version of crossover becomes pretty much meaningless. I was honestly suprised by this as well. Deprecation of crossover is neither mentioned in the paper nor on the github-website. It would certainly be interesting to see whether crossover can take on a different shape in the context of WANNs. TL;DR: Crossover in NEAT just affects the weights. |
Thanks for you reply! |
Hey guys, when we made WANNs NEAT was our starting point, but we simplified it greatly, cutting out speciation and crossover. The motivation was not that we thought it would necessarily work better without crossover and speciation but that to communicate the main point that we could encode the solutions entirely in the structure. NEAT has a lot of moving parts, and as we were presenting this to an ML audience not an EA audience, we thought the cleaner we could make the implementation the better. So rather than having to explain crossover in the paper, we cut it. Rather than having to explain compatibility distance and fitness sharing, we cut it. But is all still in there. You can run start using crossover and speciation just by changing some hyperparameters. It worked without, but we didn't do any thorough testing to see if it would have worked better with. My intuition is that crossover will not be that beneficial, there are no weights to average and so it will just add structure --- in the WANN case we are trying to find less complex solutions, so this might be a cross purposes. If you do start using crossover remember that crossover takes place only within species. The way things are set up right now we are only using multi-objective optimization and no species, or rather all are in the same species. This will end up in a lot of bloat. Be sure to use species if you are using crossover. If you are playing around and find something interesting don't hesitate to let us know! |
Ah, interesting - the paper states:
Only in the caption of figure 4 does it add:
Pretty, weird that they base their image on an edge case... @agaier It won't even add structure, though, since due to the way crossover is implemented in this repository, all genes are always inherited from the more fit parent (and it is assumend that there won't be equally fit parents) - only the weights might be inherited from the less fit parent (the relevant implementations can be found here (WANN) and here (prettyNEAT) - prettyNeatWann does not contain any crossover function). Or am I missing something here? Regarding speciation: You still use speciation to determine the number of offspring for each species, though, right? @jinglinglingling If you want to test crossover on WANNs, it might be worth looking at other NEAT implementations and see if they also structurally crossover the two parents. |
Hi,
I know that neat algorithm needs to crossover in the evolution. Does WANN abandon this point and only make the mutation?
Thanks
The text was updated successfully, but these errors were encountered: