/// <summary> /// Sort the genomes. /// </summary> public void SortAndRecord() { foreach (IGenome genome in this.Population.Genomes) { genome.Decode(); PerformScoreCalculation(genome); } Population.Sort(); bestEverScore = Comparator.BestScore(Error, bestEverScore); }
/// <summary> /// Sort the genomes. /// </summary> public void SortAndRecord() { foreach (IGenome g in Population.Genomes) { g.Decode(); PerformCalculateScore(g); } Population.Sort(); IGenome genome = Population.Best; double currentBest = genome.Score; if (Comparator.IsBetterThan(currentBest, bestEverScore)) { bestEverScore = currentBest; bestEverNetwork = ((NEATNetwork)genome.Organism); } bestEverScore = Comparator.BestScore(Error, bestEverScore); }