Encog.Neural.NEAT.Training.NEATTraining.SortAndRecord C# (CSharp) Method

SortAndRecord() public method

Sort the genomes.
public SortAndRecord ( ) : void
return void
        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);
        }