Exemple #1
0
        public void Add(SpeciatedGenome <GType, PType> genome)
        {
            members.Add(genome);

            representative = genome;

            Update();
        }
Exemple #2
0
        public Species(ISpeciatedGA parent, SpeciatedGenome <GType, PType> representative)
        {
            this.parent         = parent;
            this.representative = representative;

            this.members = new List <SpeciatedGenome <GType, PType> >()
            {
                representative
            };
            this.CanBreed = true;

            this.PreviousScore = Best.Score;

            Update();
        }
Exemple #3
0
 public void Remove(SpeciatedGenome <GType, PType> genome)
 {
     members.Remove(genome);
     Update();
 }
Exemple #4
0
 public bool BelongsTo(SpeciatedGenome <GType, PType> genome)
 {
     return(representative.CompatibilityDistance(genome) <= parent.CompatibilityDistanceThreshold);
 }