Created
July 8, 2016 04:03
-
-
Save Yuemashi/fb112e75a3bdd8068da09896c47c18e8 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
Genotype = -> size {(1..size).map{rand (0..1)}} | |
Population = -> individualSize, popSize { | |
(0..popSize).map{Genotype[individualSize]} } | |
fitness = -> genotype {genotype.inject(:+)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment