예제 #1
0
        /// <summary>
        /// Ends the current generation.
        /// </summary>
        public virtual void EndCurrentGeneration()
        {
            CurrentGeneration.End(MaxSize);

            if (BestChromosome != CurrentGeneration.BestChromosome)
            {
                BestChromosome = CurrentGeneration.BestChromosome;

                OnBestChromosomeChanged(EventArgs.Empty);
            }
        }
        /// <summary>
        ///     Ends the current generation.
        /// </summary>
        public virtual void EndCurrentGeneration()
        {
            CurrentGeneration.End(CurrentGeneration.Genomes.Count);

            if (BestGenome != CurrentGeneration.BestGenome)
            {
                BestGenome = CurrentGeneration.BestGenome;

                OnBestGenomeChanged(EventArgs.Empty);
            }
        }
예제 #3
0
        /// <summary>
        /// Ends the current generation.
        /// </summary>
        public void EndCurrentGeneration()
        {
            CurrentGeneration.End(MaxSize);

            if (BestChromosome != CurrentGeneration.BestChromosome)
            {
                BestChromosome = CurrentGeneration.BestChromosome;

                if (BestChromosomeChanged != null)
                {
                    BestChromosomeChanged(this, EventArgs.Empty);
                }
            }
        }