Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/13/10 18:32:07 (15 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.Encodings.RealVectorEncoding/3.3
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/UniformRandomRealVectorCreator.cs

    r3160 r3336  
    3434  [Item("UniformRandomRealVectorCreator", "An operator which creates a new random real vector with each element uniformly distributed in a specified range.")]
    3535  [StorableClass]
    36   public class UniformRandomRealVectorCreator : RealVectorCreator {
     36  public class UniformRandomRealVectorCreator : RealVectorCreator, IStrategyParameterCreator {
    3737    /// <summary>
    3838    /// Generates a new random real vector with the given <paramref name="length"/> and in the interval [min,max).
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj

    r3207 r3336  
    103103    <Compile Include="Crossovers\UniformSomePositionsArithmeticCrossover.cs" />
    104104    <Compile Include="HeuristicLabEncodingsRealVectorEncodingPlugin.cs" />
     105    <Compile Include="Interfaces\IRealVectorStrategyParameterManipulator.cs" />
     106    <Compile Include="Interfaces\IRealVectorStrategyParameterCrossover.cs" />
     107    <Compile Include="Interfaces\IRealVectorStrategyParameterCreator.cs" />
     108    <Compile Include="Interfaces\IRealVectorStrategyParameterOperator.cs" />
    105109    <Compile Include="Interfaces\IAdditiveRealVectorMoveOperator.cs" />
    106110    <Compile Include="Interfaces\IRealVectorBoundsChecker.cs" />
     
    108112    <Compile Include="Interfaces\IRealVectorMoveOperator.cs" />
    109113    <Compile Include="Manipulators\NormalAllPositionsManipulator.cs" />
     114    <Compile Include="StrategyParameters\StrategyVectorCreator.cs" />
     115    <Compile Include="StrategyParameters\StrategyVectorCrossover.cs" />
     116    <Compile Include="StrategyParameters\StrategyVectorManipulator.cs" />
    110117    <Compile Include="Moves\AdditiveMoveTabuAttribute.cs" />
    111118    <Compile Include="Moves\AdditiveTabuMoveEvaluator.cs" />
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs

    r3207 r3336  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3839  [Item("NormalAllPositionsManipulator", "This manipulation operator adds a value sigma_i * N(0,1) to the current value in each position i. The values for sigma_i are taken from the strategy vector, if there are less elements in the strategy vector than positions, then the strategy vector is cycled. It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.")]
    3940  [StorableClass]
    40   public class NormalAllPositionsManipulator : RealVectorManipulator {
     41  public class NormalAllPositionsManipulator : RealVectorManipulator, IRealVectorStrategyParameterOperator, ISelfAdaptiveManipulator {
    4142    /// <summary>
    4243    /// Parameter for the strategy vector.
    4344    /// </summary>
    44     public ValueLookupParameter<RealVector> StrategyVectorParameter {
    45       get { return (ValueLookupParameter<RealVector>)Parameters["StrategyVector"]; }
     45    public IValueLookupParameter<RealVector> StrategyParameterParameter {
     46      get { return (IValueLookupParameter<RealVector>)Parameters["StrategyParameter"]; }
     47    }
     48
     49    IParameter ISelfAdaptiveManipulator.StrategyParameterParameter {
     50      get { return StrategyParameterParameter; }
    4651    }
    4752    /// <summary>
     
    5156    public NormalAllPositionsManipulator()
    5257      : base() {
    53       Parameters.Add(new ValueLookupParameter<RealVector>("StrategyVector", "The vector containing the endogenous strategy parameters."));
     58      Parameters.Add(new ValueLookupParameter<RealVector>("StrategyParameter", "The vector containing the endogenous strategy parameters."));
    5459    }
    5560
     
    7782    /// <param name="realVector">The vector of real values that is manipulated.</param>
    7883    protected override void Manipulate(IRandom random, RealVector realVector) {
    79       if (StrategyVectorParameter.ActualValue == null) throw new InvalidOperationException("NormalAllPositionsManipulator: The strategy vector parameter could not be found and does not have an associated value.");
    80       Apply(random, realVector, StrategyVectorParameter.ActualValue);
     84      if (StrategyParameterParameter.ActualValue == null) throw new InvalidOperationException("NormalAllPositionsManipulator: The strategy parameter could not be found and does not have an associated value.");
     85      Apply(random, realVector, StrategyParameterParameter.ActualValue);
    8186    }
    8287  }
Note: See TracChangeset for help on using the changeset viewer.