Created
February 24, 2019 22:20
-
-
Save kaievns/3b6fabeab3378a38f3b2965090b96679 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let solution = 'a'...'z'; // <- the end solution; | |
let currentSolution = 'z'...'a'; | |
while (grade(currrentSolution) < '100%') { | |
let generation = randomlyMutate(currentSolution, { times: 10 }); | |
let bestInGeneration = pickBestSolutionIn(generation); | |
currentSolution = bestInGeneration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment