예제 #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));
        }