Esempio n. 1
0
        private ResultMap RunExperiment <T>(GeneticAlgorithm <T> alg, int runs = 25) where T : IGenome
        {
            ResultMap res_list = new ResultMap();

            foreach (int pop_size in PopulationSizes)
            {
                res_list.Add(pop_size, new InnerResultList());
                for (int i = 0; i < runs; ++i)
                {
                    res_list[pop_size].Add(alg.start(pop_size, int.MaxValue, true));
                }
            }

            return(res_list);
        }