harvitronix / neural-network-genetic-algorithm

Evolving a neural network with a genetic algorithm.
https://medium.com/@harvitronix/lets-evolve-a-neural-network-with-a-genetic-algorithm-code-included-8809bece164
MIT License
693 stars 237 forks source link

Mutate children instead of parents #1

Closed normanheckscher closed 6 years ago

normanheckscher commented 6 years ago

Mutation creates diversity. Mutants build strength into a population, by their individuality and contributions to the wider population. Mutation should take place in the offspring, after crossover. If the mutation in the offspring is beneficial, then it will propagate. A population without mutant children lacks diversity and is likely to devolve.

normanheckscher commented 6 years ago

It would be interesting if we could somehow utilise the low scoring mutant networks rather than disposing of them as dead branches. The same way that some of the Chinese dynasties utilised eunuchs or the Roman Catholics LGBTI people.