public GeneticAlgorithm CreateGpLawnMowerSample() { GeneticAlgorithm ga = new GeneticAlgorithm(); #region Problem Configuration var problem = new Problems.GeneticProgramming.LawnMower.Problem(); #endregion #region Algorithm Configuration ga.Name = "Genetic Programming - Lawn Mower"; ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem"; ga.Problem = problem; SamplesUtils .ConfigureGeneticAlgorithmParameters <TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( ga, 1000, 1, 50, 0.25, 5); var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator; mutator.Operators.SetItemCheckedState(mutator.Operators .OfType<OnePointShaker>() .Single(), false); #endregion return ga; }
public GeneticAlgorithm CreateGpLawnMowerSample() { GeneticAlgorithm ga = new GeneticAlgorithm(); #region Problem Configuration var problem = new Problems.GeneticProgramming.LawnMower.Problem(); #endregion #region Algorithm Configuration ga.Name = "Genetic Programming - Lawn Mower"; ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem"; ga.Problem = problem; SamplesUtils .ConfigureGeneticAlgorithmParameters <TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( ga, 1000, 1, 50, 0.25, 5); var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator; mutator.Operators.SetItemCheckedState(mutator.Operators .OfType <OnePointShaker>() .Single(), false); #endregion return(ga); }