Created
March 7, 2021 18:48
-
-
Save Albertbol/c2efc0d524976a272a416bc7df1c3567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DNAchanges() { | |
population.forEach((_, index) => { | |
const a = selection() | |
const b = selection() | |
let child = crossover(a.randomPhrase, b.randomPhrase) | |
child = mutate(child) | |
population[index].randomPhrase = child | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment