Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/13/10 18:32:07 (14 years ago)
Author:
abeham
Message:

updated Evolution Stratgy #932
StrategyParameters moved completely out of the ES into the encoding and problem, because they are inherently problem specific
The ProblemDimension and a few other parameters of ES were removed
Fixed a few bugs also and added some documentation

Location:
trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/EvolutionStrategyMainLoop.cs

    r3193 r3336  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929using HeuristicLab.Selection;
    30 using HeuristicLab.Encodings.RealVectorEncoding;
    3130
    3231namespace HeuristicLab.Algorithms.EvolutionStrategy {
     
    5958      get { return (ValueLookupParameter<IntValue>)Parameters["Children"]; }
    6059    }
    61     public ValueLookupParameter<RealVector> StrategyVectorParameter {
    62       get { return (ValueLookupParameter<RealVector>)Parameters["StrategyVector"]; }
    63     }
    64     public ValueLookupParameter<DoubleMatrix> StrategyVectorBoundsParameter {
    65       get { return (ValueLookupParameter<DoubleMatrix>)Parameters["StrategyVectorBounds"]; }
    66     }
    67     public ValueLookupParameter<DoubleValue> GeneralLearningRateParameter {
    68       get { return (ValueLookupParameter<DoubleValue>)Parameters["GeneralLearningRate"]; }
    69     }
    70     public ValueLookupParameter<DoubleValue> LearningRateParameter {
    71       get { return (ValueLookupParameter<DoubleValue>)Parameters["LearningRate"]; }
    72     }
    7360    public ValueLookupParameter<BoolValue> PlusSelectionParameter {
    7461      get { return (ValueLookupParameter<BoolValue>)Parameters["PlusSelection"]; }
     
    9784    private ScopeParameter CurrentScopeParameter {
    9885      get { return (ScopeParameter)Parameters["CurrentScope"]; }
     86    }
     87    private ValueLookupParameter<IOperator> StrategyParameterManipulatorParameter {
     88      get { return (ValueLookupParameter<IOperator>)Parameters["StrategyParameterManipulator"]; }
     89    }
     90    private ValueLookupParameter<IOperator> StrategyParameterCrossoverParameter {
     91      get { return (ValueLookupParameter<IOperator>)Parameters["StrategyParameterCrossover"]; }
    9992    }
    10093
     
    121114      Parameters.Add(new ValueLookupParameter<IntValue>("Children", "λ (lambda) - the size of the offspring population."));
    122115      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed."));
    123       Parameters.Add(new ValueLookupParameter<RealVector>("StrategyVector", "The strategy vector."));
    124       Parameters.Add(new LookupParameter<DoubleMatrix>("StrategyVectorBounds", "2 column matrix with one row for each dimension specifying upper and lower bound for the strategy vector. If there are less rows than dimensions, the strategy vector will be read in a cycle."));
    125       Parameters.Add(new ValueLookupParameter<DoubleValue>("GeneralLearningRate", "τ0 (tau0) - the factor with which adjustments in the strategy vector is dampened over all dimensions. Recommendation is to use 1/Sqrt(2*ProblemDimension)."));
    126       Parameters.Add(new ValueLookupParameter<DoubleValue>("LearningRate", "τ (tau) - the factor with which adjustments in the strategy vector are dampened in a single dimension. Recommendation is to use 1/Sqrt(2*Sqrt(ProblemDimension))."));
    127116      Parameters.Add(new ValueLookupParameter<BoolValue>("PlusSelection", "True for plus selection (elitist population), false for comma selection (non-elitist population)."));
    128117      Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions."));
     
    133122      Parameters.Add(new LookupParameter<IItem>("Visualization", "The item which represents the visualization of solutions."));
    134123      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the EvolutionStrategy should be applied."));
     124      Parameters.Add(new ValueLookupParameter<IOperator>("StrategyParameterManipulator", "The operator to mutate the endogeneous strategy parameters."));
     125      Parameters.Add(new ValueLookupParameter<IOperator>("StrategyParameterCrossover", "The operator to cross the endogeneous strategy parameters."));
    135126      #endregion
    136127
     
    151142      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
    152143      Placeholder recombinator = new Placeholder();
    153       StrategyVectorManipulator strategyMutator1 = new StrategyVectorManipulator();
     144      Placeholder strategyRecombinator = new Placeholder();
     145      Placeholder strategyMutator1 = new Placeholder();
    154146      Placeholder mutator1 = new Placeholder();
    155147      Placeholder evaluator1 = new Placeholder();
    156148      SubScopesRemover subScopesRemover = new SubScopesRemover();
    157149      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
    158       StrategyVectorManipulator strategyMutator2 = new StrategyVectorManipulator();
     150      Placeholder strategyMutator2 = new Placeholder();
    159151      Placeholder mutator2 = new Placeholder();
    160152      Placeholder evaluator2 = new Placeholder();
     
    230222      useRecombinationBranch.ConditionParameter.ActualName = "UseRecombination";
    231223
     224      childrenCreator.ParentsPerChild = null;
    232225      childrenCreator.ParentsPerChildParameter.ActualName = ParentsPerChildParameter.Name;
    233226
     
    235228      recombinator.OperatorParameter.ActualName = RecombinatorParameter.Name;
    236229
    237       strategyMutator1.StrategyVectorParameter.ActualName = StrategyVectorParameter.Name;
    238       strategyMutator1.GeneralLearningRateParameter.ActualName = GeneralLearningRateParameter.Name;
    239       strategyMutator1.LearningRateParameter.ActualName = LearningRateParameter.Name;
    240       strategyMutator1.RandomParameter.ActualName = RandomParameter.Name;
     230      strategyRecombinator.Name = "Strategy Parameter Recombinator (placeholder)";
     231      strategyRecombinator.OperatorParameter.ActualName = StrategyParameterCrossoverParameter.Name;
     232
     233      strategyMutator1.Name = "Strategy Parameter Manipulator (placeholder)";
     234      strategyMutator1.OperatorParameter.ActualName = StrategyParameterManipulatorParameter.Name;
    241235
    242236      mutator1.Name = "Mutator (placeholder)";
     
    248242      subScopesRemover.RemoveAllSubScopes = true;
    249243
    250       strategyMutator2.StrategyVectorParameter.ActualName = StrategyVectorParameter.Name;
    251       strategyMutator2.GeneralLearningRateParameter.ActualName = GeneralLearningRateParameter.Name;
    252       strategyMutator2.LearningRateParameter.ActualName = LearningRateParameter.Name;
    253       strategyMutator2.RandomParameter.ActualName = RandomParameter.Name;
     244      strategyMutator2.Name = "Strategy Parameter Manipulator (placeholder)";
     245      strategyMutator2.OperatorParameter.ActualName = StrategyParameterManipulatorParameter.Name;
    254246
    255247      mutator2.Name = "Mutator (placeholder)";
     
    327319      uniformSubScopesProcessor1.Operator = recombinator;
    328320      uniformSubScopesProcessor1.Successor = null;
    329       recombinator.Successor = strategyMutator1;
     321      recombinator.Successor = strategyRecombinator;
     322      strategyRecombinator.Successor = strategyMutator1;
    330323      strategyMutator1.Successor = mutator1;
    331324      mutator1.Successor = evaluator1;
  • trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/HeuristicLab.Algorithms.EvolutionStrategy-3.3.csproj

    r3183 r3336  
    8484    <Compile Include="EvolutionStrategy.cs" />
    8585    <Compile Include="EvolutionStrategyMainLoop.cs" />
    86     <Compile Include="SelfAdaptiveCrossover.cs" />
    87     <Compile Include="StrategyVectorManipulator.cs" />
    8886    <Compile Include="WithoutRepeatingBatchedRandomSelector.cs" />
    8987  </ItemGroup>
     
    109107      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    110108      <Name>HeuristicLab.Data-3.3</Name>
    111     </ProjectReference>
    112     <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
    113       <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
    114       <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
    115109    </ProjectReference>
    116110    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
Note: See TracChangeset for help on using the changeset viewer.