void SaveBestFit() { trainings.Sort(new TrainingComparer()); lastBestFit.Clear(); for (int i = 0; i < nbToKeep; ++i) { AIAgent agent = trainings[i].GetComponentInChildren <AIAgent>(); lastBestFit.Add(agent.GetBrainConfig()); } bestFitness = trainings[0].fitness; }