예제 #1
0
 public Population(IFitnessFunction fitnessFunction, List <IGenome> population)
 {
     //Log.Create("../../Logs/");
     this.selection  = DefaultParameter.selection;
     this.crossover  = DefaultParameter.crossover;
     this.mutation   = DefaultParameter.mutation;
     this.population = population;
 }
예제 #2
0
 public Population(IFitnessFunction fitnessFunction, List<IGenome> population)
 {
     //Log.Create("../../Logs/");
     this.selection = DefaultParameter.selection;
     this.crossover = DefaultParameter.crossover;
     this.mutation = DefaultParameter.mutation;
     this.population = population;
 }
예제 #3
0
        public Population(IFitnessFunction fitnessFunction, int size)
        {
            //            Log.Create("../../Logs/");
            this.selection = DefaultParameter.selection;
            this.crossover = DefaultParameter.crossover;
            this.mutation = DefaultParameter.mutation;
            this.generation = 1;
            this.avarageFitness = 0;
            this.fitnessFunction = fitnessFunction;

            IInitialPopulationMethod initial = DefaultParameter.initialPopulation;
            this.population = initial.Generate(DefaultParameter.genomeSize, fitnessFunction);
        }
예제 #4
0
        public Population(IFitnessFunction fitnessFunction, int size)
        {
//            Log.Create("../../Logs/");
            this.selection       = DefaultParameter.selection;
            this.crossover       = DefaultParameter.crossover;
            this.mutation        = DefaultParameter.mutation;
            this.generation      = 1;
            this.avarageFitness  = 0;
            this.fitnessFunction = fitnessFunction;

            IInitialPopulationMethod initial = DefaultParameter.initialPopulation;

            this.population = initial.Generate(DefaultParameter.genomeSize, fitnessFunction);
        }