Ejemplo n.º 1
0
    // crossover: media com o best
    public void Breed(Indiv1 best)
    {
        // avalicao nao realizada
        this.pontuation = -1;

        weightVoid      = (weightVoid + best.weightVoid) / 2; // novo parametro
        weightBumpiness = (weightBumpiness + best.weightBumpiness) / 2;
        weightHeight    = (weightHeight + best.weightHeight) / 2;
    }
Ejemplo n.º 2
0
 public void NextPlayer(Indiv1 player)
 {
     this.player = player;
 }
Ejemplo n.º 3
0
 //verifica se esse individuo é melhor que outro
 public bool IsBest(Indiv1 best)
 {
     return(this.pontuation > best.pontuation);
 }