Index: /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblem.cs
===================================================================
--- /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblem.cs	(revision 16607)
+++ /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblem.cs	(revision 16608)
@@ -59,9 +59,18 @@
       get { return (ValueParameter<IntValue>)Parameters["Peaks"]; }
     }
+    public ValueParameter<DoubleMatrix> InitialPeakLocationsParameter {
+      get { return (ValueParameter<DoubleMatrix>)Parameters["InitialPeakLocations"]; }
+    }
     public ValueParameter<DoubleMatrix> PeakLocationsParameter {
       get { return (ValueParameter<DoubleMatrix>)Parameters["PeakLocations"]; }
     }
+    public ValueParameter<DoubleArray> InitialPeakWidthsParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["InitialPeakWidths"]; }
+    }
     public ValueParameter<DoubleArray> PeakWidthsParameter {
       get { return (ValueParameter<DoubleArray>)Parameters["PeakWidths"]; }
+    }
+    public ValueParameter<DoubleArray> InitialPeakHeightsParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["InitialPeakHeights"]; }
     }
     public ValueParameter<DoubleArray> PeakHeightsParameter {
@@ -86,11 +95,23 @@
       set { PeaksParameter.Value = value; }
     }
+    public DoubleMatrix InitialPeakLocations {
+      get { return InitialPeakLocationsParameter.Value; }
+      set { InitialPeakLocationsParameter.Value = value; }
+    }
     public DoubleMatrix PeakLocations {
       get { return PeakLocationsParameter.Value; }
       set { PeakLocationsParameter.Value = value; }
     }
+    public DoubleArray InitialPeakWidths {
+      get { return InitialPeakWidthsParameter.Value; }
+      set { InitialPeakWidthsParameter.Value = value; }
+    }
     public DoubleArray PeakWidths {
       get { return PeakWidthsParameter.Value; }
       set { PeakWidthsParameter.Value = value; }
+    }
+    public DoubleArray InitialPeakHeights {
+      get { return InitialPeakHeightsParameter.Value; }
+      set { InitialPeakHeightsParameter.Value = value; }
     }
     public DoubleArray PeakHeights {
@@ -114,12 +135,28 @@
     public MovingPeaksBenchmarkProblem()
       : base(new MovingPeaksBenchmarkProblemEvaluator(), new UniformRandomRealVectorCreator()) {
-      Parameters.Add(new ValueParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension.", null));
+      var defaultBounds = new double[,] {
+        { 0.0, 100.0 }
+      };
+      var defaultPeaks = new double[,] {
+        { 08.0, 64.0, 67.0, 55.0, 04.0 },
+        { 50.0, 13.0, 76.0, 15.0, 07.0 },
+        { 09.0, 19.0, 27.0, 67.0, 24.0 },
+        { 66.0, 87.0, 65.0, 19.0, 43.0 },
+        { 76.0, 32.0, 43.0, 54.0, 65.0 }
+      };
+      var defaultWidths = new double[] { 0.1, 0.1, 0.1, 0.1, 0.1 };
+      var defaultHeights = new double[] { 50.0, 50.0, 50.0, 50.0, 50.0 };
+
+      Parameters.Add(new ValueParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension.", new DoubleMatrix(defaultBounds)));
       Parameters.Add(new ValueParameter<IntValue>("ProblemSize", "The dimension of the problem.", new IntValue(5)));
       Parameters.Add(new ValueParameter<IntValue>("Peaks", "The number of peaks.", new IntValue(5)));
-      Parameters.Add(new ValueParameter<DoubleMatrix>("PeakLocations", "", null ));
-      Parameters.Add(new ValueParameter<DoubleArray>("PeakWidths", "", new DoubleArray(new double[] { 0, 0, 0, 0, 0 })));
-      Parameters.Add(new ValueParameter<DoubleArray>("PeakHeights", "", new DoubleArray(new double[] { 0, 0, 0, 0, 0 })));
-
-      Parameters.Add(new OptionalValueParameter<RealVector>("BestKnownSolution", "The best known solution for this test function instance."));
+      Parameters.Add(new ValueParameter<DoubleMatrix>("InitialPeakLocations", "Initial coordinates of each peaks.", new DoubleMatrix(defaultPeaks)));
+      Parameters.Add(new ValueParameter<DoubleMatrix>("PeakLocations", "Current coordinates of each peaks.", new DoubleMatrix(defaultPeaks)));
+      Parameters.Add(new ValueParameter<DoubleArray>("InitialPeakWidths", "Initial width of each peak.", new DoubleArray(defaultWidths)));
+      Parameters.Add(new ValueParameter<DoubleArray>("PeakWidths", "Current width of each peak.", new DoubleArray(defaultWidths)));
+      Parameters.Add(new ValueParameter<DoubleArray>("InitialPeakHeights", "Initial height of each peak.", new DoubleArray(defaultHeights)));
+      Parameters.Add(new ValueParameter<DoubleArray>("PeakHeights", "Current height of each peak.", new DoubleArray(defaultHeights)));
+
+      //Parameters.Add(new OptionalValueParameter<RealVector>("BestKnownSolution", "The best known solution for this test function instance."));
 
       Maximization.Value = true;
@@ -144,4 +181,11 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       return new MovingPeaksBenchmarkProblem(this, cloner);
+    }
+
+    protected override void OnReset() {
+      base.OnReset();
+      PeakLocations = InitialPeakLocations.Clone() as DoubleMatrix;
+      PeakWidths = InitialPeakWidths.Clone() as DoubleArray;
+      PeakHeights = InitialPeakHeights.Clone() as DoubleArray;
     }
 
@@ -156,16 +200,7 @@
     protected override void OnEvaluatorChanged() {
       base.OnEvaluatorChanged();
-      bool problemSizeChange = ProblemSize.Value < Evaluator.MinimumProblemSize
-        || ProblemSize.Value > Evaluator.MaximumProblemSize;
-      if (problemSizeChange) {
-        ProblemSize.Value = Math.Max(Evaluator.MinimumProblemSize, Math.Min(ProblemSize.Value, Evaluator.MaximumProblemSize));
-      } else {
-        ParameterizeEvaluator();
-      }
+      ParameterizeEvaluator();
       UpdateMoveEvaluators();
       ParameterizeAnalyzers();
-      Maximization.Value = Evaluator.Maximization;
-      BoundsParameter.Value = Evaluator.Bounds;
-      BestKnownQuality = new DoubleValue(Evaluator.BestKnownQuality);
       Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
       Evaluator_QualityParameter_ActualNameChanged(null, EventArgs.Empty);
@@ -180,6 +215,6 @@
       ParameterizeSolutionCreator();
       ParameterizeEvaluator();
-      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize.Value));
-      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize.Value)));
+      //strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize.Value));
+      //strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize.Value)));
       OnReset();
     }
@@ -233,13 +268,13 @@
     //  }
     //}
-    private void strategyVectorCreator_BoundsParameter_ValueChanged(object sender, EventArgs e) {
-      strategyVectorManipulator.BoundsParameter.Value = (DoubleMatrix)strategyVectorCreator.BoundsParameter.Value.Clone();
-    }
-    private void strategyVectorCreator_StrategyParameterParameter_ActualNameChanged(object sender, EventArgs e) {
-      string name = strategyVectorCreator.StrategyParameterParameter.ActualName;
-      strategyVectorCrossover.ParentsParameter.ActualName = name;
-      strategyVectorCrossover.StrategyParameterParameter.ActualName = name;
-      strategyVectorManipulator.StrategyParameterParameter.ActualName = name;
-    }
+    //private void strategyVectorCreator_BoundsParameter_ValueChanged(object sender, EventArgs e) {
+    //  strategyVectorManipulator.BoundsParameter.Value = (DoubleMatrix)strategyVectorCreator.BoundsParameter.Value.Clone();
+    //}
+    //private void strategyVectorCreator_StrategyParameterParameter_ActualNameChanged(object sender, EventArgs e) {
+    //  string name = strategyVectorCreator.StrategyParameterParameter.ActualName;
+    //  strategyVectorCrossover.ParentsParameter.ActualName = name;
+    //  strategyVectorCrossover.StrategyParameterParameter.ActualName = name;
+    //  strategyVectorManipulator.StrategyParameterParameter.ActualName = name;
+    //}
     #endregion
 
@@ -247,8 +282,4 @@
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
-      // BackwardsCompatibility3.3
-      #region Backwards compatible code (remove with 3.4)
-      if (Operators.Count == 0) InitializeOperators();
-      #endregion
       RegisterEventHandlers();
     }
@@ -262,6 +293,6 @@
       SolutionCreator.RealVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_RealVectorParameter_ActualNameChanged);
       Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-      strategyVectorCreator.BoundsParameter.ValueChanged += new EventHandler(strategyVectorCreator_BoundsParameter_ValueChanged);
-      strategyVectorCreator.StrategyParameterParameter.ActualNameChanged += new EventHandler(strategyVectorCreator_StrategyParameterParameter_ActualNameChanged);
+      //strategyVectorCreator.BoundsParameter.ValueChanged += new EventHandler(strategyVectorCreator_BoundsParameter_ValueChanged);
+      //strategyVectorCreator.StrategyParameterParameter.ActualNameChanged += new EventHandler(strategyVectorCreator_StrategyParameterParameter_ActualNameChanged);
     }
     private void ParameterizeAnalyzers() {
@@ -287,12 +318,12 @@
       //Operators.Add(new BestSingleObjectiveTestFunctionSolutionAnalyzer());
       //Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
-      //ParameterizeAnalyzers();
-      //Operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
+      ParameterizeAnalyzers();
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
       //Operators.Add(strategyVectorCreator);
       //Operators.Add(strategyVectorCrossover);
       //Operators.Add(strategyVectorManipulator);
-      //UpdateMoveEvaluators();
-      //ParameterizeOperators();
-      //InitializeMoveGenerators();
+      UpdateMoveEvaluators();
+      ParameterizeOperators();
+      InitializeMoveGenerators();
     }
     private void InitializeMoveGenerators() {
@@ -325,6 +356,6 @@
       //    #endregion
       //  }
-      //ParameterizeOperators();
-      //OnOperatorsChanged();
+      ParameterizeOperators();
+      OnOperatorsChanged();
     }
     private void ParameterizeSolutionCreator() {
@@ -337,11 +368,11 @@
       Evaluator.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
       Evaluator.PointParameter.Hidden = true;
-      try {
-        BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value);
-      }
-      catch (ArgumentException e) {
-        ErrorHandling.ShowErrorDialog(e);
-        ProblemSize.Value = Evaluator.MinimumProblemSize;
-      }
+      //try {
+      //  BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value);
+      //}
+      //catch (ArgumentException e) {
+      //  ErrorHandling.ShowErrorDialog(e);
+      //  ProblemSize.Value = Evaluator.MinimumProblemSize;
+      //}
     }
     private void ParameterizeOperators() {
@@ -412,10 +443,10 @@
     }
     private void UpdateStrategyVectorBounds() {
-      var strategyBounds = (DoubleMatrix)Bounds.Clone();
-      for (int i = 0; i < strategyBounds.Rows; i++) {
-        if (strategyBounds[i, 0] < 0) strategyBounds[i, 0] = 0;
-        strategyBounds[i, 1] = 0.1 * (Bounds[i, 1] - Bounds[i, 0]);
-      }
-      strategyVectorCreator.BoundsParameter.Value = strategyBounds;
+      //var strategyBounds = (DoubleMatrix)Bounds.Clone();
+      //for (int i = 0; i < strategyBounds.Rows; i++) {
+      //  if (strategyBounds[i, 0] < 0) strategyBounds[i, 0] = 0;
+      //  strategyBounds[i, 1] = 0.1 * (Bounds[i, 1] - Bounds[i, 0]);
+      //}
+      //strategyVectorCreator.BoundsParameter.Value = strategyBounds;
     }
     #endregion
Index: /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblemEvaluator.cs
===================================================================
--- /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblemEvaluator.cs	(revision 16607)
+++ /branches/2989_MovingPeaksBenchmark/HeuristicLab.Problems.MovingPeaksBenchmark/3.3/MovingPeaksBenchmarkProblemEvaluator.cs	(revision 16608)
@@ -74,5 +74,18 @@
 
     public double Apply(DoubleMatrix peaks, DoubleArray widths, DoubleArray heights, RealVector point) {
-      return 0;
+      heights[0] *= 1.01;
+
+      double max = 0;
+      double val = 0;
+
+      for (int i = 0; i < widths.Length; i++) {
+        val = 0;
+        for (int j = 0; j < point.Length; j++) {
+          val += (point[j] - peaks[i, j]) * (point[j] - peaks[i, j]);
+        }
+        val = heights[i] / (1 + widths[i] * val);
+        if (val > max) max = val;
+      }
+      return max;
     }
   }
