protected OptimizationStep(OptimizationParameters parameters, Population population) { this.BestFitness = double.MaxValue; this.parameters = parameters; this.population = population; bestFitnessCounter = FitnessCounterFactory.GetFitnessCounterForBest(parameters); }
private static void LoadControlFitnessParameters() { Logger.Instance.AddLine("Insert full path of control fitness parameters:"); var controlFitnessParametersPath = Console.ReadLine(); Logger.Instance.AddLine(controlFitnessParametersPath); var controlFitnessParameters = repository.LoadOptimizationParametersByPath(controlFitnessParametersPath); controlFitnessCounter = FitnessCounterFactory.GetFitnessCounterForBest(controlFitnessParameters); }
private static void TestTeam() { if (optimizationParameters == null) { Logger.Instance.AddLine("No optimization parameters loaded"); return; } if (team == null) { Logger.Instance.AddLine("No team loaded"); return; } Logger.Instance.AddLine("Starting test"); var fitnessCounter = FitnessCounterFactory.GetFitnessCounterForBest(optimizationParameters); var result = fitnessCounter.CountFitness(team, optimizationParameters.SeedForRandomSheepForBest, true); Logger.Instance.AddLine($"Total Fitness: {result}"); }