- Timestamp:
- 06/27/12 11:41:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r7915 r8132 439 439 } 440 440 #endregion 441 #region LawnMower 442 [TestMethod] 443 public void RunGpLawnMowerSampleTest() { 444 var ga = CreateGpLawnMowerSample(); 445 ga.SetSeedRandomly.Value = false; 446 RunAlgorithm(ga); 447 } 448 449 public GeneticAlgorithm CreateGpLawnMowerSample() { 450 GeneticAlgorithm ga = new GeneticAlgorithm(); 451 #region Problem Configuration 452 var problem = new HeuristicLab.Problems.LawnMower.Problem(); 453 #endregion 454 #region Algorithm Configuration 455 ga.Name = "Genetic Programming - Lawn Mower"; 456 ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem"; 457 ga.Problem = problem; 458 ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( 459 ga, 1000, 1, 50, 0.25, 5); 460 var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator; 461 mutator.Operators.SetItemCheckedState(mutator.Operators 462 .OfType<OnePointShaker>() 463 .Single(), false); 464 #endregion 465 return ga; 466 } 467 #endregion 441 468 #endregion 442 469
Note: See TracChangeset
for help on using the changeset viewer.