public void Edit(FitnessFunction function)
        {
            this.function = function;

            Display();

            if (ShowDialog() != DialogResult.OK)
            {
                return;
            }

            Parse();
        }
예제 #2
0
        private void InitializeTraining()
        {
            AI.PointEvaluated      += AI_PointEvaluated;
            AI.PopulationEvaluated += AI_PopulationEvaluated;
            AI.SleepStarting       += AI_SleepStarting;
            AI.SleepEnded          += AI_SleepEnded;

            func       = new FitnessFunction();
            funceditor = new FitnessEditor();

            tbFitness.Text = func.ToString();

            builder = new BuilderForm();
        }
예제 #3
0
        private void DisposeTraining()
        {
            AI.PointEvaluated      -= AI_PointEvaluated;
            AI.PopulationEvaluated -= AI_PopulationEvaluated;
            AI.SleepStarting       -= AI_SleepStarting;
            AI.SleepEnded          -= AI_SleepEnded;

            funceditor?.Dispose();
            funceditor = null;
            func       = null;
            builder?.Dispose();
            builder = null;

            AI.Dispose();
        }