Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/09/10 17:28:32 (14 years ago)
Author:
gkronber
Message:

Added first version of architecture altering operators for ADFs. #290 (Implement ADFs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs

    r3251 r3294  
    107107      get { return (ValueParameter<IntValue>)Parameters["MaxExpressionDepth"]; }
    108108    }
     109    public ValueParameter<IntValue> MaxFunctionDefinitionsParameter {
     110      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionDefinitions"]; }
     111    }
     112    public ValueParameter<IntValue> MaxFunctionArgumentsParameter {
     113      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionArguments"]; }
     114    }
    109115    public ValueParameter<BoolMatrix> WorldParameter {
    110116      get { return (ValueParameter<BoolMatrix>)Parameters["World"]; }
     
    195201      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(100)));
    196202      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the expression to control the artificial ant.", new IntValue(10)));
     203      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionDefinitions", "Maximal number of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
     204      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionArguments", "Maximal number of arguments of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
    197205      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
    198206      Parameters.Add(new ValueParameter<IntValue>("MaxTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
     
    333341        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    334342      }
     343      foreach (SymbolicExpressionTreeManipulator op in Operators.OfType<SymbolicExpressionTreeManipulator>()) {
     344        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     345      }
     346      foreach (SymbolicExpressionTreeArchitectureAlteringOperator op in Operators.OfType<SymbolicExpressionTreeArchitectureAlteringOperator>()) {
     347        op.MaxFunctionDefiningBranchesParameter.ActualName = MaxFunctionDefinitionsParameter.Name;
     348        op.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
     349      }
    335350    }
    336351
Note: See TracChangeset for help on using the changeset viewer.