Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
type ActorChromosome =
{
dogImportance: double
acornImportance: double
rabbitImportance: double
treeImportance: double
squirrelImportance: double
randomImportance: double
}
let getRandomGene (random: System.Random): double = (random.NextDouble() * 2.0) - 1.0
let getRandomChromosome (random: System.Random) =
{
dogImportance = getRandomGene random;
acornImportance = getRandomGene random;
rabbitImportance = getRandomGene random;
treeImportance = getRandomGene random;
squirrelImportance = getRandomGene random;
randomImportance = getRandomGene random;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.