Beispiel #1
0
 /// <summary>
 /// Instancia randomicamnete apenas um clone
 /// </summary>
 /// <param name="ctControleParent"></param>
 /// <param name="sensors"></param>
 public void InitializeClone(int ctControleParent, bool[] sensors)
 {
     if (this._chromosomes[ctControleParent].Clones.Count < clonepopulation)
     {
         this._chromosomes[ctControleParent].Clones.Add(CircuitoChromosome.CreateRandomClone(sensors, this._chromosomes[ctControleParent].NormFitness, this._chromosomes[ctControleParent].Cgp.Genotype, this._k));
     }
 }
Beispiel #2
0
 public void InitializePopulation(bool[] sensors)
 {
     for (int i = 0; i < populationSize; i++)
     {
         this._chromosomes.Add(CircuitoChromosome.CreateRandomChromosome(sensors));
     }
 }