Esempio n. 1
0
        public void Run()
        {
            _populatieOutput1 = new Populatie();
            _populatieOutput1.Initialize();
            var nrIteratii = 0;

            while (Valid(_populatieOutput1) && nrIteratii < ConfigurationClass.NumarIteratii)
            {
                Console.WriteLine(nrIteratii);
                Console.WriteLine(_populatieOutput1.GetBest().ToString());
                _populatieOutput1.Evolve();
                nrIteratii++;
            }
            Console.WriteLine("loss final ->");
            Console.WriteLine(_populatieOutput1.GetBest().Fitness());
            Console.WriteLine(_populatieOutput1.GetBest().ToString());
        }
Esempio n. 2
0
 private bool Valid(Populatie populatie)
 {
     return(populatie.GetBest().Fitness() > ConfigurationClass.PragFitness);
 }