Esempio n. 1
0
        protected override IPhenotype CreateRandomPhenotype()
        {
            BinaryGenotype g = new BinaryGenotype(_bitcount);

            for (int i = 0; i < _bitcount; i++)
            {
                g.Bits[i] = RNG.NextBool();
            }
            OneMaxPhenotype p = new OneMaxPhenotype(g);

            return(p);
        }
Esempio n. 2
0
        protected override IPhenotype CreatePhenotype(IGenotype genotype)
        {
            var phenotype = new OneMaxPhenotype(genotype);

            return(phenotype);
        }