예제 #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();
     }
 }
예제 #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();
         }
     }
 }