public Candidate GetWorstFitness() { var max = CurrentGeneration.Max(x => x.Fitness); return(CurrentGeneration.First(x => x.Fitness >= max)); }
protected override void OnEndSimulation() { var max = CurrentGeneration.First(i => i.Fitness.Equals(CurrentGeneration.Max(j => j.Fitness))); _data.Genes = max.Chromosome.ToArray(); }
public Candidate GetBestFitness() { var min = CurrentGeneration.Min(x => x.Fitness); return(CurrentGeneration.First(x => x.Fitness <= min)); }