示例#1
0
文件: Program.cs 项目: sdenisen/.net
        private static void Main()
        {
            var fitness = new RabbitFitness(FitnessSolution);

            fitness.Stop += StopAlgorithm;
            var reproduction = new Reproduction2();
            var selection    = new StrangeWhellSelection();

            var factory = new RabbitFactory(reproduction, fitness, DnaElementsCount);

            ExecuteGeneticAlgorithm(factory, selection);

            Console.ReadKey();
        }
示例#2
0
        public static List <KeyValuePair <int, double> > Execute()
        {
            IReproduction reproduction0 = new Reproduction2();
            Selection     selection0    = new StrangeWhellSelection();
            var           fitness0      = new FitnessSolution {
                Solution = 30
            };

            fitness0.Stop += StopAlgorithm;

            var factory0 = new RabbitFactory(reproduction0, fitness0, CountOfnucleotide);

            return(ExecuteGeneticAlgorithm0(factory0, selection0));
        }