Example #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            genetic = new Genetic(7);
            double max = genetic.LivingCycle(FitnessFunc);

            for (int i = 0; i < 10000; i++)
            {
                var a = genetic.LivingCycle(FitnessFunc);
                if (max < a)
                {
                    max = a;
                }
            }

            MessageBox.Show("" + Math.Round(max, 4));
        }