Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3450 for trunk


Ignore:
Timestamp:
04/20/10 18:53:14 (15 years ago)
Author:
abeham
Message:

Changed handling of strategy parameters and renamed operators in realvector #890, #932, #934

Location:
trunk/sources
Files:
1 deleted
9 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj

    r3425 r3450  
    104104    <Compile Include="Crossovers\UniformSomePositionsArithmeticCrossover.cs" />
    105105    <Compile Include="HeuristicLabEncodingsRealVectorEncodingPlugin.cs" />
    106     <Compile Include="Interfaces\IRealVectorStrategyParameterManipulator.cs" />
    107     <Compile Include="Interfaces\IRealVectorStrategyParameterCrossover.cs" />
    108     <Compile Include="Interfaces\IRealVectorStrategyParameterCreator.cs" />
    109     <Compile Include="Interfaces\IRealVectorStrategyParameterOperator.cs" />
     106    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterCreator.cs" />
     107    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterCrossover.cs" />
     108    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterManipulator.cs" />
     109    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterOperator.cs" />
    110110    <Compile Include="Interfaces\IAdditiveRealVectorMoveOperator.cs" />
    111111    <Compile Include="Interfaces\IRealVectorBoundsChecker.cs" />
     
    116116    <Compile Include="Moves\AdditiveMoveTabuChecker.cs" />
    117117    <Compile Include="Moves\AdditiveMoveTabuMaker.cs" />
    118     <Compile Include="StrategyParameters\StrategyVectorCreator.cs" />
    119     <Compile Include="StrategyParameters\StrategyVectorCrossover.cs" />
    120     <Compile Include="StrategyParameters\StrategyVectorManipulator.cs" />
    121118    <Compile Include="Moves\AdditiveMoveTabuAttribute.cs" />
    122119    <Compile Include="Moves\AdditiveMoveMaker.cs" />
     
    134131    <Compile Include="Manipulators\PolynomialOnePositionManipulator.cs" />
    135132    <Compile Include="Manipulators\UniformOnePositionManipulator.cs" />
     133    <Compile Include="StrategyParameters\StdDevStrategyVectorCreator.cs" />
     134    <Compile Include="StrategyParameters\StdDevStrategyVectorCrossover.cs" />
     135    <Compile Include="StrategyParameters\StdDevStrategyVectorManipulator.cs" />
    136136    <None Include="HeuristicLab.snk" />
    137137    <None Include="HeuristicLabEncodingsRealVectorEncodingPlugin.cs.frame" />
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCreator.cs

    r3435 r3450  
    2626
    2727namespace HeuristicLab.Encodings.RealVectorEncoding {
    28   /// <summary>
    29   /// An interface which represents an operator for creating vectors of real-valued data.
    30   /// </summary>
    31   public interface IRealVectorStrategyParameterCreator : IRealVectorStrategyParameterOperator, IStrategyParameterCreator {
     28  public interface IRealVectorStdDevStrategyParameterCreator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterCreator {
    3229    IValueLookupParameter<IntValue> LengthParameter { get; }
    3330    IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCrossover.cs

    r3435 r3450  
    2626
    2727namespace HeuristicLab.Encodings.RealVectorEncoding {
    28   /// <summary>
    29   /// An interface which represents an operator for crossing vectors of real-valued data.
    30   /// </summary>
    31   public interface IRealVectorStrategyParameterCrossover : IRealVectorStrategyParameterOperator, IStrategyParameterCrossover {
     28  public interface IRealVectorStdDevStrategyParameterCrossover : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterCrossover {
    3229    ILookupParameter<ItemArray<RealVector>> ParentsParameter { get; }
    3330  }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterManipulator.cs

    r3435 r3450  
    2626
    2727namespace HeuristicLab.Encodings.RealVectorEncoding {
    28   /// <summary>
    29   /// An interface which represents an operator for manipulating vectors of real-valued data.
    30   /// </summary>
    31   public interface IRealVectorStrategyParameterManipulator : IRealVectorStrategyParameterOperator, IStrategyParameterManipulator {
     28  public interface IRealVectorStdDevStrategyParameterManipulator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterManipulator {
    3229    IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    3330  }
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterOperator.cs

    r3435 r3450  
    2525
    2626namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorStrategyParameterOperator : IStrategyParameterOperator {
     27  public interface IRealVectorStdDevStrategyParameterOperator {
    2828  }
    2929}
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs

    r3376 r3450  
    4040  [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.")]
    4141  [StorableClass]
    42   public class NormalAllPositionsManipulator : RealVectorManipulator, IRealVectorStrategyParameterOperator, ISelfAdaptiveManipulator {
     42  public class NormalAllPositionsManipulator : RealVectorManipulator, ISelfAdaptiveManipulator {
     43    public Type StrategyParameterType {
     44      get { return typeof(IRealVectorStdDevStrategyParameterOperator); }
     45    }
    4346    /// <summary>
    4447    /// Parameter for the strategy vector.
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialAllPositionManipulator.cs

    r3376 r3450  
    4040    /// <summary>
    4141    /// The contiguity parameter specifies the shape of the probability density function that controls the mutation. Setting it to 0 is similar to a uniform distribution over the entire manipulation range (specified by <see cref="MaximumManipulationParameter"/>.
    42     /// A higher value will shape the density function such that values closer to 0 (little manipulation) are more likely than values closer to 1 or -1 (maximum manipulation).
     42    /// A higher value will shape the density function such that values closer to 0 (little manipulation) are more likely than larger values.
    4343    /// </summary>
    4444    public ValueLookupParameter<DoubleValue> ContiguityParameter {
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCreator.cs

    r3435 r3450  
    3030
    3131namespace HeuristicLab.Encodings.RealVectorEncoding {
    32   [Item("StrategyVectorCreator", "Creates the endogeneous strategy parameters.")]
     32  [Item("StdDevStrategyVectorCreator", "Creates the endogeneous strategy parameters.")]
    3333  [StorableClass]
    34   public class StrategyVectorCreator : SingleSuccessorOperator, IStochasticOperator, IRealVectorStrategyParameterCreator {
     34  public class StdDevStrategyVectorCreator : SingleSuccessorOperator, IStochasticOperator, IRealVectorStdDevStrategyParameterCreator {
    3535    public override bool CanChangeName {
    3636      get { return false; }
     
    4949    }
    5050
    51     public StrategyVectorCreator()
     51    public StdDevStrategyVectorCreator()
    5252      : base() {
    5353      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCrossover.cs

    r3435 r3450  
    2929
    3030namespace HeuristicLab.Encodings.RealVectorEncoding {
    31   [Item("StrategyVectorCrossover", "Crosses the strategy vector by using intermediate recombination (average crossover).")]
     31  [Item("StdDevStrategyVectorCrossover", "Crosses the strategy vector by using intermediate recombination (average crossover).")]
    3232  [StorableClass]
    33   public class StrategyVectorCrossover : SingleSuccessorOperator, IStochasticOperator, IRealVectorStrategyParameterOperator, IStrategyParameterCrossover {
     33  public class StdDevStrategyVectorCrossover : SingleSuccessorOperator, IStochasticOperator, IRealVectorStdDevStrategyParameterCrossover {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    4545    }
    4646
    47     public StrategyVectorCrossover()
     47    public StdDevStrategyVectorCrossover()
    4848      : base() {
    4949      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs

    r3435 r3450  
    2828using HeuristicLab.Random;
    2929using System;
     30using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3031
    3132namespace HeuristicLab.Encodings.RealVectorEncoding {
     
    3334  /// Mutates the endogenous strategy parameters.
    3435  /// </summary>
    35   public class StrategyVectorManipulator : SingleSuccessorOperator, IStochasticOperator, IRealVectorStrategyParameterOperator, IStrategyParameterManipulator {
     36  [Item("StdDevStrategyVectorManipulator", "Mutates the endogenous strategy parameters.")]
     37  [StorableClass]
     38  public class StdDevStrategyVectorManipulator : SingleSuccessorOperator, IStochasticOperator, IRealVectorStdDevStrategyParameterManipulator {
    3639    public ILookupParameter<IRandom> RandomParameter {
    3740      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    5457    /// <c>LearningRate</c>).
    5558    /// </summary>
    56     public StrategyVectorManipulator()
     59    public StdDevStrategyVectorManipulator()
    5760      : base() {
    5861      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj

    r3418 r3450  
    9595    <Compile Include="Interfaces\IStrategyParameterCreator.cs" />
    9696    <Compile Include="Interfaces\IRun.cs" />
    97     <Compile Include="Interfaces\IStrategyParameterOperator.cs" />
    9897    <Compile Include="OptimizerList.cs" />
    9998    <Compile Include="Experiment.cs" />
  • trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs

    r3376 r3450  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2829  /// </summary>
    2930  public interface ISelfAdaptiveManipulator : IOperator {
     31    Type StrategyParameterType { get; }
    3032    IParameter StrategyParameterParameter { get; }
    3133  }
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs

    r3376 r3450  
    7272    /// <returns>The result value of the Ackley function at the given point.</returns>
    7373    public static double Apply(RealVector point) {
    74       double result = 20 + Math.E;
     74      double result;
    7575      double val;
    7676
     
    8080      val /= point.Length;
    8181      val = -0.2 * Math.Sqrt(val);
    82       result -= 20 * Math.Exp(val);
     82      result = 20 - 20 * Math.Exp(val);
    8383
    8484      val = 0;
     
    8686        val += Math.Cos(2 * Math.PI * point[i]);
    8787      val /= point.Length;
    88       result -= Math.Exp(val);
     88      result += Math.E - Math.Exp(val);
    8989      return (result);
    9090    }
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RealVectorAdditiveMoveWrapper.cs

    r3187 r3450  
    3131    private RealVector vector;
    3232
     33    public RealVectorAdditiveMoveWrapper() {
     34      dimension = -1;
     35      moveDistance = 0;
     36      this.vector = new RealVector();
     37    }
     38
    3339    public RealVectorAdditiveMoveWrapper(AdditiveMove move, RealVector vector) {
    3440      dimension = move.Dimension;
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r3336 r3450  
    4040  public sealed class SingleObjectiveTestFunctionProblem : ParameterizedNamedItem, ISingleObjectiveProblem {
    4141    [Storable]
    42     private StrategyVectorCreator strategyVectorCreator;
     42    private StdDevStrategyVectorCreator strategyVectorCreator;
    4343    [Storable]
    44     private StrategyVectorCrossover strategyVectorCrossover;
     44    private StdDevStrategyVectorCrossover strategyVectorCrossover;
    4545    [Storable]
    46     private StrategyVectorManipulator strategyVectorManipulator;
     46    private StdDevStrategyVectorManipulator strategyVectorManipulator;
    4747
    4848    public override Image ItemImage {
     
    151151      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance.", new DoubleValue(evaluator.BestKnownQuality)));
    152152
    153       strategyVectorCreator = new StrategyVectorCreator();
     153      strategyVectorCreator = new StdDevStrategyVectorCreator();
    154154      strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
    155       strategyVectorCrossover = new StrategyVectorCrossover();
    156       strategyVectorManipulator = new StrategyVectorManipulator();
     155      strategyVectorCrossover = new StdDevStrategyVectorCrossover();
     156      strategyVectorManipulator = new StdDevStrategyVectorManipulator();
     157      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(0.5);
     158      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.5);
    157159
    158160      creator.RealVectorParameter.ActualName = "Point";
Note: See TracChangeset for help on using the changeset viewer.