public void Edit(FitnessFunction function) { this.function = function; Display(); if (ShowDialog() != DialogResult.OK) { return; } Parse(); }
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(); }
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(); }