public List <Strategy> CrossoverStrategies(List <Strategy> strategies) { var result = new List <Strategy>(); result.AddRange(Crossover.GetPanmixia(strategies)); result.AddRange(Crossover.GetInbreed(strategies)); result.AddRange(Crossover.GetOutbreed(strategies)); return(result); }
public void GetPanmixia_returns_valid_strategy() { var initialStrategies = new List <Strategy>(); for (int i = 0; i < config.PopulationSize; i++) { initialStrategies.Add(StrategiesGenerator.GenerateProgram()); } var strategies = crossover.GetPanmixia(initialStrategies); foreach (var strategy in strategies) { Assert.IsTrue(StrategiesGenerator.CheckProgram(strategy.commands)); } }