Пример #1
0
 /// <summary>
 /// Creates the genetic algorithm. 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnInitalize_Click(object sender, EventArgs e)
 {
     Bitmap target = new Bitmap(pbTarget.Image);
         _configuration = new ImageConfiguration(target, 500, .005, .2);
         _geneticAlgorithm = new ImageGeneticAlgorithm.ImageGeneticAlgorithm(_configuration);
         _drawer = new ImageRenderView();
         btnRun.Enabled = true;
         RenderBestIndividual();
         CreateSaveDirectory();
 }
        public ImageFitnessEvaluator(Configuration configuration)
        {
            _configuration = (configuration as ImageConfiguration);

                MAXIMUM_FITNESS = ((int)Math.Pow(255, 2) * 3);
        }