Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/03/13 22:47:11 (11 years ago)
Author:
sawinkle
Message:

#2109:

  • simplified GEArtificialAntProblem and removed some unused code (e.g. parameter MaximumExpressionDepth is not necessary for an IntegerVector)
  • extended GEEvaluator to perform a complete, recursive Genotype-To-Phenotype mapping (depth-first approach); currently no "wrapping" of the integer vector is possible; a full tree with the maximum possible nodes filled in is generated, dependent on the integer vector; the Interpreter, Analysers and other classes get reused
File:
1 edited

Legend:

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

    r10012 r10022  
    8686      get { return (IValueParameter<IntValue>)Parameters["MaximumExpressionLength"]; }
    8787    }
    88     public IValueParameter<IntValue> MaxExpressionDepthParameter {
    89       get { return (IValueParameter<IntValue>)Parameters["MaximumExpressionDepth"]; }
    90     }
    9188    public IValueParameter<IntValue> MaxFunctionDefinitionsParameter {
    9289      get { return (IValueParameter<IntValue>)Parameters["MaximumFunctionDefinitions"]; }
     
    104101      get { return (IValueParameter<IntMatrix>)Parameters["Bounds"]; }
    105102    }
    106    
    107103    #endregion
    108104
     
    119115      get { return MaxExpressionLengthParameter.Value; }
    120116      set { MaxExpressionLengthParameter.Value = value; }
    121     }
    122     public IntValue MaxExpressionDepth {
    123       get { return MaxExpressionDepthParameter.Value; }
    124       set { MaxExpressionDepthParameter.Value = value; }
    125117    }
    126118    public IntValue MaxFunctionDefinitions {
     
    174166      : base(new GEEvaluator(), new UniformRandomIntegerVectorCreator()) {
    175167      BoolMatrix world = new BoolMatrix(santaFeAntTrail);
    176       Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(100)));
    177       Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionDepth", "Maximal depth of the expression to control the artificial ant.", new IntValue(10)));
     168      Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(30)));
    178169      Parameters.Add(new ValueParameter<IntValue>("MaximumFunctionDefinitions", "Maximal number of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
    179170      Parameters.Add(new ValueParameter<IntValue>("MaximumFunctionArguments", "Maximal number of arguments of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
     
    181172      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
    182173      Parameters.Add(new ValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
    183       IntMatrix m = new IntMatrix(1,2);
    184       m[0,0] = 1;
    185       m[0,1] = 10;
    186       Parameters.Add(new ValueParameter<IntMatrix>("Bounds", "", m));
     174      IntMatrix m = new IntMatrix(new int[,]{{0,100}});
     175      Parameters.Add(new ValueParameter<IntMatrix>("Bounds", "The integer number range in which the single genomes of a genotype are created.", m));
    187176     
    188177      Maximization.Value = true;
Note: See TracChangeset for help on using the changeset viewer.