public void CreatePopulation() { for (int i = 0; i < PopSize; i++) { Populus.Add(new Individual()); } }
public void GetFittest(int percentageNum) { int percentageCount = (percentageNum * PopSize) / 100; FittestPop = Populus.OrderByDescending(o => o.Fitness).Take(percentageCount).ToList(); foreach (var item in FittestPop) { //Console.WriteLine($"{string.Join("", item.Genes)}, fitness: {item.Fitness}"); } }