private static void Mutate(Gene[] genes)
 {
     if (MyRandom.NextDouble() < AlgoParam.MutationRate)
     {
         genes[MyRandom.Next(ChromosomeLength)] = Gene.CreateRandomGene();
         genes[MyRandom.Next(ChromosomeLength)] = Gene.CreateRandomGene();
     }
 }
        public static Chromosome CreateRandomChromosome(int generation = 0)
        {
            var genes = new Gene[Length];

            for (var g = 0; g < Length; g++)
            {
                genes[g] = Gene.CreateRandomGene();
            }

            return(new Chromosome(genes, generation));
        }