Example #1
0
        public ScoredGeneration(IEnumerable <IGenomeInfo <T> > genomes, IGenomeEvaluator <T, TScore> evaluator)
        {
            IOrderedEnumerable <FitnessResult <T, TScore> > orderedFitnessResults = evaluator.GetFitnessResults(genomes);

            OrderedFitnessResults = orderedFitnessResults.ToArray();
        }
Example #2
0
 private IEnumerable <T> TakeFittest(IEnumerable <T> genomes)
 {
     return(_genomeEvaluator
            .GetFitnessResults(genomes)
            .Take(_childrenToKeepPerPair));
 }