Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            _goal       = new Point(400, 20);
            _population = new Population(10000, _goal, PopulationFactory.GetGeneration());

            new Thread(() =>
            {
                while (!_theEnd)
                {
                    _population.Update();
                }
            }).Start();

            new Thread(Render).Start();
        }
 public void Save()
 {
     PopulationFactory.Save(_generation);
     DotsFactory.SaveDirection(_dots.OrderByDescending(dot => dot.FitnessScore).Select(dot => dot.GetDirection()));
 }