Beispiel #1
0
        public void Initialize()
        {
            generation = 0;

            ChildPopulation = new List <Individual>();
            Random random = new Random();

            for (int i = 0; i < ChildCount; i++)
            {
                Individual individual = new Individual();
                individual.Genotype = Genotype.Clone();
                individual.Genotype.Randomize(random);
                ChildPopulation.Add(individual);
            }

            AdultPopulation = new List <Individual>();
            ParentList      = new List <Individual>();
        }