Ejemplo n.º 1
0
 public Genome(int n)
 {
     this.genes = new Gene[n];
     for (int i = 0; i < this.genes.Length; i++)
     {
         this.genes[i] = Gene.RandomGene();
     }
 }
Ejemplo n.º 2
0
 public void Randomize(int n)
 {
     for (int i = 0; i < this.genes.Length; i++)
     {
         if (ran.Next(n) == 0)
         {
             this.genes[i] = Gene.RandomGene();
         }
     }
 }