Changeset 10280 for branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/ArtificialAnt
- Timestamp:
- 01/05/14 12:53:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/ArtificialAnt/GEArtificialAntEvaluator.cs
r10071 r10280 63 63 get { return (ILookupParameter<IGenotypeToPhenotypeMapper>)Parameters["GenotypeToPhenotypeMapper"]; } 64 64 } 65 public ILookupParameter<IRandom> RandomParameter { 66 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 67 } 65 68 #endregion 66 69 … … 78 81 Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>("SymbolicExpressionTreeGrammar", "The tree grammar that defines the correct syntax of symbolic expression trees that should be created.")); 79 82 Parameters.Add(new LookupParameter<IGenotypeToPhenotypeMapper>("GenotypeToPhenotypeMapper", "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree).")); 83 Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator for the genotype creation and the genotype-to-phenotype mapping.")); 80 84 } 81 85 82 86 public sealed override IOperation Apply() { 83 SymbolicExpressionTree expression = GenotypeToPhenotypeMapperParameter.ActualValue.Map( 87 SymbolicExpressionTree tree = GenotypeToPhenotypeMapperParameter.ActualValue.Map( 88 RandomParameter.ActualValue, 84 89 SymbolicExpressionTreeGrammarParameter.ActualValue, 85 90 IntegerVectorParameter.ActualValue 86 91 ); 87 SymbolicExpressionTreeParameter.ActualValue = expression;92 SymbolicExpressionTreeParameter.ActualValue = tree; 88 93 BoolMatrix world = WorldParameter.ActualValue; 89 94 IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue; … … 92 97 interpreter.MaxTimeSteps = maxTimeSteps.Value; 93 98 interpreter.World = world; 94 interpreter.Expression = expression;99 interpreter.Expression = tree; 95 100 interpreter.Run(); 96 101
Note: See TracChangeset
for help on using the changeset viewer.