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

            representative = genome;

            Update();
        }
Example #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();
        }
Example #3
0
 public void Remove(SpeciatedGenome <GType, PType> genome)
 {
     members.Remove(genome);
     Update();
 }
Example #4
0
 public bool BelongsTo(SpeciatedGenome <GType, PType> genome)
 {
     return(representative.CompatibilityDistance(genome) <= parent.CompatibilityDistanceThreshold);
 }