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; }
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; }
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); }