Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created November 16, 2019 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/b1f741126212a0443c1ab2a73ff135de to your computer and use it in GitHub Desktop.
Save IntegerMan/b1f741126212a0443c1ab2a73ff135de to your computer and use it in GitHub Desktop.
let getRandomChromosome (random: System.Random) =
{
age = 0
genes = Seq.init 7 (fun _ -> getRandomGene random) |> Seq.toArray
}
let getRandomGene (random: System.Random) = (random.NextDouble() * 2.0) - 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment