Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/20/13 18:44:04 (11 years ago)
Author:
sawinkle
Message:

#2109:

  • Removed the parameters MaxFunctionDefinitions and MaxFunctionArguments from GEArtificialAntProblem.cs, because automatically defined functions (adf) won't be supported by the Grammatical Evolution implementation of the Artificial Ant problem.
  • Switched from SharpDevelop to Visual Studio 2012 and installed 'Productivity Power Tools 2012'. This extension includes the options 'Format Document on save' and 'Remove and Sort Usings on save', so that some usings were deleted, sorted and the formating changed slightly. Furthermore 'Visual Studio 2010 text editor settings.vssettings' were included.
  • Added new folders ArtificialAnt and Symbolic to separate the files for the ArtificialAnt problem and the Symbolic Regression problem (single objective).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/GEArtificialAntEvaluator.cs

    r10039 r10068  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     25using HeuristicLab.Encodings.IntegerVectorEncoding;
    2526using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    26 using HeuristicLab.Problems.ArtificialAnt;
    2727using HeuristicLab.Operators;
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 using HeuristicLab.Encodings.IntegerVectorEncoding;
     31using HeuristicLab.Problems.ArtificialAnt;
    3232using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
    3333
     
    3838    ISingleObjectiveEvaluator, ISymbolicExpressionTreeGrammarBasedOperator {
    3939
    40     #region Parameter Properties
     40    #region Parameter Properties
    4141    public ILookupParameter<DoubleValue> QualityParameter {
    4242      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
    4343    }
    44     // genotype:
    45     public ILookupParameter<IntegerVector> IntegerVectorParameter {
     44    // genotype:
     45    public ILookupParameter<IntegerVector> IntegerVectorParameter {
    4646      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
    4747    }
    48     // phenotype:
     48    // phenotype:
    4949    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    5050      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
     
    5656      get { return (ILookupParameter<IntValue>)Parameters["MaxTimeSteps"]; }
    5757    }
    58     public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
     58    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
    5959      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters["SymbolicExpressionTreeGrammar"]; }
    6060    }
    61     // genotype-to-phenotype-mapper:
    62     public ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
     61    // genotype-to-phenotype-mapper:
     62    public ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
    6363      get { return (ILookupParameter<IGenotypeToPhenotypeMapper>)Parameters["GenotypeToPhenotypeMapper"]; }
    6464    }
    65     #endregion
    66  
     65    #endregion
     66
    6767    [StorableConstructor]
    6868    protected GEArtificialAntEvaluator(bool deserializing) : base(deserializing) { }
     
    8181
    8282    public sealed override IOperation Apply() {
    83       SymbolicExpressionTree expression = GenotypeToPhenotypeMapperParameter.ActualValue.Map (
     83      SymbolicExpressionTree expression = GenotypeToPhenotypeMapperParameter.ActualValue.Map(
    8484        SymbolicExpressionTreeGrammarParameter.ActualValue,
    85         IntegerVectorParameter.ActualValue       
     85        IntegerVectorParameter.ActualValue
    8686      );
    8787      SymbolicExpressionTreeParameter.ActualValue = expression;
    8888      BoolMatrix world = WorldParameter.ActualValue;
    8989      IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue;
    90  
     90
    9191      AntInterpreter interpreter = new AntInterpreter();
    92       interpreter.MaxTimeSteps   = maxTimeSteps.Value;
    93       interpreter.World          = world;
    94       interpreter.Expression     = expression;
     92      interpreter.MaxTimeSteps = maxTimeSteps.Value;
     93      interpreter.World = world;
     94      interpreter.Expression = expression;
    9595      interpreter.Run();
    9696
Note: See TracChangeset for help on using the changeset viewer.