/// <summary> /// Replaces the current agents in the population with the selected agents. /// </summary> /// <param name="selector">The selection method that defines how the selection should be perfomed.</param> /// <param name="selectionSize">The desired size of the selected agents.</param> public void MakeSelection(ISelector selector, int selectionSize, IRandomNumberGenerator random) { if (!fitnessCalculated) { throw new Exception("Fitness must be calculated selection can be performed."); } Agents = selector.MakeSelection(Agents, selectionSize, random); // lav til void }