Changeset 16813 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt
- Timestamp:
- 04/18/19 13:23:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
r16723 r16813 23 23 using System.Diagnostics.Contracts; 24 24 using System.Linq; 25 using HEAL.Attic; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; … … 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Parameters; 31 using HEAL.Attic;32 32 33 33 … … 116 116 #endregion 117 117 118 public Problem() 119 : base() { 118 public Problem() : base(new SymbolicExpressionTreeEncoding()) { 120 119 BoolMatrix world = new BoolMatrix(ToBoolMatrix(santaFeAntTrail)); 121 120 Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world)); 122 121 Parameters.Add(new ValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600))); 123 122 124 base.BestKnownQuality = 89;125 123 var g = new SimpleSymbolicExpressionGrammar(); 126 124 g.AddSymbols(new string[] { "IfFoodAhead", "Prog2" }, 2, 2); 127 125 g.AddSymbols(new string[] { "Prog3" }, 3, 3); 128 126 g.AddTerminalSymbols(new string[] { "Move", "Left", "Right" }); 129 base.Encoding = new SymbolicExpressionTreeEncoding(g, 20, 10); 127 128 Encoding.TreeLength = 20; 129 Encoding.TreeDepth = 10; 130 Encoding.Grammar = g; 131 base.BestKnownQuality = 89; 130 132 } 131 133
Note: See TracChangeset
for help on using the changeset viewer.