Ejemplo n.º 1
0
        private void OneGeneration_Tick(object sender, EventArgs e)
        {
            if (generationNum == 1)
            {
                label10.Text = "Generation Num: " + Convert.ToString(++generationNum);
                for (int i = 0; i < mobScore.Length; i++)
                {
                    mobScore[i] = 0;
                }
            }
            if (oneGenerationIteration == mobScore.Length)
            {
                Crossbreeding(BestMob(mobScore), BestMob(mobScore), BestMob(mobScore), BestMob(mobScore));
                Mutation();
                oneGenerationIteration++;
                OneGeneration.Stop();
                GlobalCycle.Start();
                return;
            }

            WeightsReader(W01, W12, W23, oneGenerationIteration);

            mobUpIteration = 0;
            OneMobLifeCycle.Start();
            OneGeneration.Stop();
        }