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

            representative = genome;

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