Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/BinaryEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/BinaryEncoding.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/BinaryEncoding.cs	(revision 11739)
@@ -71,4 +71,7 @@
       RegisterParameterEvents();
     }
+
+    public BinaryEncoding() : this("BinaryVector", 10) { }
+    public BinaryEncoding(int length) : this("BinaryVector", length) { }
     public BinaryEncoding(string name, int length)
       : base(name) {
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11739)
@@ -94,5 +94,8 @@
     public override IDeepCloneable Clone(Cloner cloner) { return new IntegerEncoding(this, cloner); }
 
-    public IntegerEncoding(string name, int length, int min, int max, int? step = null)
+
+    public IntegerEncoding() : this("IntegerVector", 10) { }
+    public IntegerEncoding(int length) : this("integerVector", length) { }
+    public IntegerEncoding(string name, int length, int min = int.MinValue, int max = int.MaxValue, int? step = null)
       : base(name) {
       if (min >= max) throw new ArgumentException("min must be less than max", "min");
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs	(revision 11739)
@@ -95,4 +95,7 @@
     }
 
+
+    public PermutationEncoding() : this("Permutation", 10, PermutationTypes.Absolute) { }
+    public PermutationEncoding(int length) : this("Permuration", length, PermutationTypes.Absolute) { }
     public PermutationEncoding(string name, int length, PermutationTypes type)
       : base(name) {
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11739)
@@ -93,5 +93,7 @@
     }
 
-    public RealEncoding(string name, int length, double min, double max)
+    public RealEncoding() : this("RealVector", 10) { }
+    public RealEncoding(int length) : this("RealVector", length) { }
+    public RealEncoding(string name, int length, double min = double.MinValue, double max = double.MaxValue)
       : base(name) {
       if (min >= max) throw new ArgumentException("min must be less than max", "min");
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 11739)
@@ -140,10 +140,12 @@
     <Compile Include="Interfaces\IEncoding.cs" />
     <Compile Include="Interfaces\IMultiEncodingOperator.cs" />
-    <Compile Include="Interfaces\ISingleObjectiveMoveOperator.cs" />
+    <Compile Include="Interfaces\internal\INeighborBasedOperator.cs" />
+    <Compile Include="Interfaces\internal\IMultiObjectiveAnalysisOperator.cs" />
+    <Compile Include="Interfaces\internal\ISingleObjectiveAnalysisOperator.cs" />
+    <Compile Include="Interfaces\internal\IMultiObjectiveEvaluationOperator.cs" />
+    <Compile Include="Interfaces\internal\ISingleObjectiveEvaluationOperator.cs" />
     <Compile Include="Interfaces\IMultiObjectiveProblemDefinition.cs" />
-    <Compile Include="Interfaces\IMultiObjectiveProgrammableProblemAnalyzer.cs" />
-    <Compile Include="Interfaces\ISingleObjectiveProgrammableProblemAnalyzer.cs" />
-    <Compile Include="Interfaces\IMultiObjectiveProgrammableProblemEvaluator.cs" />
-    <Compile Include="Interfaces\ISingleObjectiveProgrammableProblemEvaluator.cs" />
+    <Compile Include="Interfaces\IEncodingOperator.cs" />
+    <Compile Include="New\ProgrammableProblem.cs" />
     <Compile Include="Operators\MultiEncodingManipulator.cs" />
     <Compile Include="Operators\MultiEncodingCrossover.cs" />
@@ -160,13 +162,13 @@
     <Compile Include="Interfaces\ISingleObjectiveProblemDefinition.cs" />
     <Compile Include="Operators\SingleObjectiveImprover.cs" />
-    <Compile Include="ProblemDefinition.cs" />
-    <Compile Include="ProblemScriptBase.cs" />
-    <Compile Include="ProblemScript.cs" />
-    <Compile Include="MultiObjectiveProblemDefinition.cs" />
-    <Compile Include="SingleObjectiveProblemDefinition.cs" />
-    <Compile Include="MultiObjectiveProblemScript.cs" />
-    <Compile Include="SingleObjectiveProblemScript.cs" />
-    <Compile Include="MultiObjectiveProgrammableProblem.cs" />
-    <Compile Include="SingleObjectiveProgrammableProblem.cs" />
+    <Compile Include="New\Scripts\CompiledProblemDefinition.cs" />
+    <Compile Include="New\Scripts\ProblemDefinitionScript.cs" />
+    <Compile Include="New\OneMaxNew.cs" />
+    <Compile Include="New\SingleObjectiveProgrammableProblem.cs" />
+    <Compile Include="New\SingleObjectiveScriptableProblem.cs" />
+    <Compile Include="New\Scripts\MultiObjectiveProblemDefinitionScript.cs" />
+    <Compile Include="New\Scripts\SingleObjectiveProblemDefinitionScript.cs" />
+    <Compile Include="OLD_MultiObjectiveProgrammableProblem.cs" />
+    <Compile Include="OLD_SingleObjectiveProgrammableProblem.cs" />
     <None Include="HeuristicLab.snk" />
     <None Include="Plugin.cs.frame" />
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncodingOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncodingOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncodingOperator.cs	(revision 11739)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.Programmable {
+  public interface IEncodingOperator : IOperator {
+    ILookupParameter<IEncoding> EncodingParameter { get; }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProblemDefinition.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProblemDefinition.cs	(revision 11739)
@@ -26,5 +26,5 @@
   public interface IMultiObjectiveProblemDefinition : IProblemDefinition {
     bool[] Maximization { get; }
-    double[] Evaluate(IRandom random, Individual individual);
+    double[] Evaluate(Individual individual, IRandom random);
     void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results);
   }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProgrammableProblemAnalyzer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProgrammableProblemAnalyzer.cs	(revision 11738)
+++ 	(revision )
@@ -1,33 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.Programmable {
-  public interface IMultiObjectiveProgrammableProblemAnalyzer : IAnalyzer {
-    ILookupParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter { get; }
-    ILookupParameter<IEncoding> EncodingParameter { get; }
-    IScopeTreeLookupParameter<DoubleArray> QualitiesParameter { get; }
-    ILookupParameter<ResultCollection> ResultsParameter { get; }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProgrammableProblemEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiObjectiveProgrammableProblemEvaluator.cs	(revision 11738)
+++ 	(revision )
@@ -1,30 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.Programmable {
-  public interface IMultiObjectiveProgrammableProblemEvaluator : IMultiObjectiveEvaluator {
-    ILookupParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter { get; }
-    ILookupParameter<IEncoding> EncodingParameter { get; }
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs	(revision 11739)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using HeuristicLab.Core;
@@ -27,7 +26,5 @@
   public interface IProblemDefinition : INamedItem {
     IEncoding Encoding { get; }
-    IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual);
-
-    event EventHandler ProblemDefinitionChanged;
+    IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random);
   }
 }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveMoveOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveMoveOperator.cs	(revision 11738)
+++ 	(revision )
@@ -1,6 +1,0 @@
-﻿using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.Programmable {
-  public interface ISingleObjectiveMoveOperator : IMoveOperator {
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs	(revision 11739)
@@ -25,6 +25,6 @@
 namespace HeuristicLab.Problems.Programmable {
   public interface ISingleObjectiveProblemDefinition : IProblemDefinition {
-    bool IsMaximizationProblem { get; }
-    double Evaluate(IRandom random, Individual individual);
+    bool Maximization { get; }
+    double Evaluate(Individual individual, IRandom random);
     void Analyze(Individual[] individuals, double[] qualities, ResultCollection results);
   }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProgrammableProblemAnalyzer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProgrammableProblemAnalyzer.cs	(revision 11738)
+++ 	(revision )
@@ -1,33 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.Programmable {
-  public interface ISingleObjectiveProgrammableProblemAnalyzer : IAnalyzer {
-    ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter { get; }
-    ILookupParameter<IEncoding> EncodingParameter { get; }
-    IScopeTreeLookupParameter<DoubleValue> QualityParameter { get; }
-    ILookupParameter<ResultCollection> ResultsParameter { get; }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProgrammableProblemEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProgrammableProblemEvaluator.cs	(revision 11738)
+++ 	(revision )
@@ -1,30 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.Programmable {
-  public interface ISingleObjectiveProgrammableProblemEvaluator : ISingleObjectiveEvaluator {
-    ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter { get; }
-    ILookupParameter<IEncoding> EncodingParameter { get; }
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveAnalysisOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveAnalysisOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveAnalysisOperator.cs	(revision 11739)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  internal interface IMultiObjectiveAnalysisOperator : IEncodingOperator, IAnalyzer {
+    Action<Individual[], double[][], ResultCollection> AnalyzeAction { get; set; }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveEvaluationOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveEvaluationOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/IMultiObjectiveEvaluationOperator.cs	(revision 11739)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  internal interface IMulitObjectiveEvaluationOperator : IMultiObjectiveEvaluator, IEncodingOperator {
+    Func<Individual, IRandom, double[]> EvaluateFunc { get; set; }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/INeighborBasedOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/INeighborBasedOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/INeighborBasedOperator.cs	(revision 11739)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.Programmable {
+  internal interface INeighborBasedOperator : IEncodingOperator {
+    Func<Individual, IRandom, IEnumerable<Individual>> GetNeighborsFunc { get; set; }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveAnalysisOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveAnalysisOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveAnalysisOperator.cs	(revision 11739)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  internal interface ISingleObjectiveAnalysisOperator : IEncodingOperator {
+    Action<Individual[], double[], ResultCollection> AnalyzeAction { get; set; }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveEvaluationOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveEvaluationOperator.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/internal/ISingleObjectiveEvaluationOperator.cs	(revision 11739)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  internal interface ISingleObjectiveEvaluationOperator : ISingleObjectiveEvaluator, IEncodingOperator {
+    Func<Individual, IRandom, double> EvaluateFunc { get; set; }
+  }
+}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProblemDefinition.cs	(revision 11738)
+++ 	(revision )
@@ -1,42 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Multi-objective Problem Definition", "Base class for custom multi-objective problem definitions.")]
-  public abstract class MultiObjectiveProblemDefinition : ProblemDefinition, IMultiObjectiveProblemDefinition {
-
-    public abstract bool[] Maximization { get; }
-    public abstract double[] Evaluate(IRandom random, Individual vector);
-    public virtual void Analyze(Individual[] vectors, double[][] qualities, ResultCollection results) { }
-
-    [StorableConstructor]
-    protected MultiObjectiveProblemDefinition(bool deserializing) : base(deserializing) { }
-    protected MultiObjectiveProblemDefinition(MultiObjectiveProblemDefinition original, Cloner cloner) : base(original, cloner) { }
-    protected MultiObjectiveProblemDefinition(IEncoding encoding) : this(encoding, "MultiObjectiveProblemDefinition", null) { }
-    protected MultiObjectiveProblemDefinition(IEncoding encoding, string name) : this(encoding, name, null) { }
-    protected MultiObjectiveProblemDefinition(IEncoding encoding, string name, string description) : base(encoding, name, description) { }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProblemScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProblemScript.cs	(revision 11738)
+++ 	(revision )
@@ -1,148 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Multi-objective Problem Definition Script", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
-  [StorableClass]
-  public class MultiObjectiveProblemScript : ProblemScript, IMultiObjectiveProblemDefinition, IStorableContent {
-    public string Filename { get; set; }
-
-    protected override string CodeTemplate {
-      get {
-        return @"using System;
-using System.Linq;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.Programmable;
-
-public class CustomProblemDefinition : ProblemScriptBase, IMultiObjectiveProblemDefinition {
-  public bool[] Maximization { get { return new [] { false, false }; } }
-
-  public CustomProblemDefinition() {
-    // Define the solution encoding which can also consist of multiple vectors, examples below
-    // Encoding = new BinaryEncoding(""b"", length: 5);
-    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
-    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
-    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
-    // Encoding = new MultiEncoding()
-      // .AddBinaryVector(""b"", length: 5)
-      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
-      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
-      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
-    ;
-  }
-
-  public override void Initialize() {
-    // when the definition is created here you can initialize variables in the variable store
-  }
-
-  public double[] Evaluate(IRandom random, Individual individual) {
-    var qualities = new [] { 0.0, 0.0 };
-    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
-    // qualities = new [] { individual.RealVector(""r"").Sum(x => x * x), individual.RealVector(""r"").Sum(x => x * x * x) };
-    return qualities;
-  }
-
-  public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
-    // write or update results given the range of vectors and resulting qualities
-    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
-  }
-
-  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
-    // Create new vectors, based on the given one that represent small changes
-    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
-    while (true) {
-      // this is not an infinite loop as only a finite amount of samples will be drawn
-      // it is possible to return a concrete amount of neighbors also
-      var neighbor = (Individual)individual.Clone();
-      //e.g. make a bit flip in a binary parameter
-      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
-      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
-      yield return neighbor;
-    }
-  }
-
-  // implement further classes and methods
-}";
-      }
-    }
-
-    [StorableConstructor]
-    protected MultiObjectiveProblemScript(bool deserializing) : base(deserializing) { }
-    protected MultiObjectiveProblemScript(MultiObjectiveProblemScript original, Cloner cloner)
-      : base(original, cloner) { }
-
-    public MultiObjectiveProblemScript() {
-      Code = CodeTemplate;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new MultiObjectiveProblemScript(this, cloner);
-    }
-
-    public new IMultiObjectiveProblemDefinition Instance {
-      get { return (IMultiObjectiveProblemDefinition)base.Instance; }
-      protected set { base.Instance = value; }
-    }
-
-    protected override void OnInstanceChanged() {
-      OnProblemDefinitionChanged();
-      base.OnInstanceChanged();
-    }
-
-    bool[] IMultiObjectiveProblemDefinition.Maximization {
-      get { return Instance != null ? Instance.Maximization : new bool[0]; }
-    }
-
-    IEncoding IProblemDefinition.Encoding {
-      get { return Instance != null ? Instance.Encoding : null; }
-    }
-
-    double[] IMultiObjectiveProblemDefinition.Evaluate(IRandom random, Individual individual) {
-      return Instance.Evaluate(random, individual);
-    }
-
-    void IMultiObjectiveProblemDefinition.Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
-      Instance.Analyze(individuals, qualities, results);
-    }
-
-    IEnumerable<Individual> IProblemDefinition.GetNeighbors(IRandom random, Individual individual) {
-      return Instance.GetNeighbors(random, individual);
-    }
-
-    public event EventHandler ProblemDefinitionChanged;
-    private void OnProblemDefinitionChanged() {
-      var handler = ProblemDefinitionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs	(revision 11738)
+++ 	(revision )
@@ -1,168 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Programmable Problem (multi-objective)", "Represents a multi-objective problem that can be programmed.")]
-  [Creatable("Problems")]
-  [StorableClass]
-  public class MultiObjectiveProgrammableProblem : MultiObjectiveHeuristicOptimizationProblem<IMultiObjectiveProgrammableProblemEvaluator, ISolutionCreator>, IParameterizedNamedItem, IStorableContent {
-    public string Filename { get; set; }
-
-    public static new Image StaticItemImage {
-      get { return Common.Resources.VSImageLibrary.Script; }
-    }
-
-    public new ParameterCollection Parameters {
-      get { return base.Parameters; }
-    }
-    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
-      get { return Parameters; }
-    }
-
-    public IValueParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (IValueParameter<IMultiObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
-    }
-
-    protected IValueParameter<IEncoding> EncodingParameter {
-      get { return (IValueParameter<IEncoding>)Parameters["Encoding"]; }
-    }
-
-    public IMultiObjectiveProblemDefinition ProblemDefinition {
-      get { return ProblemDefinitionParameter.Value; }
-      set { ProblemDefinitionParameter.Value = value; }
-    }
-
-    [Storable]
-    protected List<IParameter> DynamicEncodingParameters;
-
-    [StorableConstructor]
-    protected MultiObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
-    protected MultiObjectiveProgrammableProblem(MultiObjectiveProgrammableProblem original, Cloner cloner)
-      : base(original, cloner) {
-      DynamicEncodingParameters = original.DynamicEncodingParameters.Select(cloner.Clone).ToList();
-      RegisterEventHandlers();
-    }
-    public MultiObjectiveProgrammableProblem()
-      : base(new MultiObjectiveEvaluator(), new MultiEncodingCreator()) {
-      Parameters.Add(new ValueParameter<IMultiObjectiveProblemDefinition>("ProblemDefinition", "Defines the problem.", new MultiObjectiveProblemScript() { Name = Name }));
-      Parameters.Add(new ValueParameter<IEncoding>("Encoding", "Describes which parameters exist, what they're called, what type they are and their bounds if any."));
-
-      DynamicEncodingParameters = new List<IParameter>();
-
-      Operators.Add(new MultiObjectiveAnalyzer());
-      Operators.Add(Evaluator);
-
-      RegisterEventHandlers();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new MultiObjectiveProgrammableProblem(this, cloner);
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    // ReSharper disable UnusedMember.Local
-    private void AfterDeserialization() {
-      RegisterEventHandlers();
-    }
-    // ReSharper restore UnusedMember.Local
-
-    private void RegisterEventHandlers() {
-      ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
-      RegisterHostInstanceChanges();
-    }
-
-    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
-      RegisterHostInstanceChanges();
-      Parameterize();
-    }
-
-    private void RegisterHostInstanceChanges() {
-      ProblemDefinitionParameter.Value.ProblemDefinitionChanged += ProblemDefinitionChanged;
-      ProblemDefinitionParameter.Value.NameChanged += ProblemDefinitionHostOnNameChanged;
-    }
-
-    private void ProblemDefinitionHostOnNameChanged(object sender, EventArgs eventArgs) {
-      if (sender != ProblemDefinitionParameter.Value) return;
-      Name = ProblemDefinitionParameter.Value.Name;
-    }
-
-    protected override void OnNameChanged() {
-      base.OnNameChanged();
-      ProblemDefinitionParameter.Value.Name = Name;
-    }
-
-    protected override void OnEvaluatorChanged() {
-      base.OnEvaluatorChanged();
-      Parameterize();
-    }
-
-    protected virtual void ProblemDefinitionChanged(object sender, EventArgs eventArgs) {
-      Parameterize();
-    }
-
-    protected virtual void Parameterize() {
-      var definition = ProblemDefinitionParameter.Value;
-      if (definition == null) return;
-
-      IEncoding encoding = definition.Encoding;
-      EncodingParameter.Value = encoding;
-      Maximization = new BoolArray(definition.Maximization);
-
-      Evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
-      Evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      foreach (var evalOp in Operators.OfType<IMultiObjectiveProgrammableProblemEvaluator>()) {
-        evalOp.EncodingParameter.ActualName = EncodingParameter.Name;
-        evalOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      }
-      foreach (var analyzeOp in Operators.OfType<IMultiObjectiveProgrammableProblemAnalyzer>()) {
-        analyzeOp.EncodingParameter.ActualName = EncodingParameter.Name;
-        analyzeOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-        analyzeOp.QualitiesParameter.ActualName = Evaluator.QualitiesParameter.ActualName;
-      }
-
-      SolutionCreator = encoding.SolutionCreator;
-
-      foreach (var param in DynamicEncodingParameters)
-        if (Parameters.Contains(param)) Parameters.Remove(param);
-      DynamicEncodingParameters.Clear();
-
-      DynamicEncodingParameters.AddRange(encoding.Parameters);
-
-
-      foreach (var param in DynamicEncodingParameters) {
-        param.Hidden = true;
-        Parameters.Add(param);
-      }
-
-    }
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs	(revision 11739)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable.Problems {
+  [Item("One Max New", "Represents a single-objective problem that can be programmed.")]
+  [Creatable("1 Test")]
+  [StorableClass]
+  public class OneMaxNew : SingleObjectiveProgrammableProblem<BinaryEncoding> {
+    public override bool Maximization {
+      get { return true; }
+    }
+
+    public OneMaxNew()
+      : base() {
+      Encoding = new BinaryEncoding("BinaryVector", 10);
+    }
+
+    [StorableConstructor]
+    protected OneMaxNew(bool deserializing) : base(deserializing) { }
+
+    protected OneMaxNew(OneMaxNew original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OneMaxNew(this, cloner);
+    }
+    public override double Evaluate(Individual individual, IRandom random) {
+      return individual.BinaryVector("BinaryVector").Count(b => b);
+    }
+
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs	(revision 11739)
@@ -0,0 +1,109 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [StorableClass]
+  public abstract class ProgrammableProblem<TEncoding, TEvaluator> : HeuristicOptimizationProblem<TEvaluator, ISolutionCreator>, IProblemDefinition, IStorableContent
+    where TEncoding : class, IEncoding
+    where TEvaluator : class, IEvaluator {
+
+    public string Filename { get; set; }
+
+    protected IValueParameter<TEncoding> EncodingParameter {
+      get { return (IValueParameter<TEncoding>)Parameters["Encoding"]; }
+    }
+
+    IEncoding IProblemDefinition.Encoding { get { return Encoding; } }
+    public TEncoding Encoding {
+      get { return EncodingParameter.Value; }
+      protected set {
+        if (value == null) throw new ArgumentNullException("Encoding must not be null.");
+        if (Encoding != null) Parameters.RemoveRange(Encoding.Parameters);
+        EncodingParameter.Value = value;
+        Parameters.AddRange(Encoding.Parameters);
+      }
+    }
+
+    public virtual IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
+      return Enumerable.Empty<Individual>();
+    }
+
+    protected override IEnumerable<IItem> GetOperators() {
+      return base.GetOperators().Concat(Encoding.Operators);
+    }
+    public override IEnumerable<IParameterizedItem> ExecutionContextItems {
+      get { return base.ExecutionContextItems.Concat(new[] { Encoding }); }
+    }
+
+    public ProgrammableProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<TEncoding>("Encoding", "Describes the configuration of the encoding, what the variables are called, what type they are and their bounds if any."));
+      RegisterEvents();
+    }
+
+    protected ProgrammableProblem(ProgrammableProblem<TEncoding, TEvaluator> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEvents();
+    }
+
+    [StorableConstructor]
+    protected ProgrammableProblem(bool deserializing)
+      : base(deserializing) {
+      RegisterEvents();
+    }
+
+    private void RegisterEvents() {
+      EncodingParameter.ValueChanged += (o, e) => OnEncodingChanged();
+    }
+
+    protected virtual void OnEncodingChanged() {
+      var solutionCreatorType = Encoding.GetType().BaseType.GetGenericArguments();
+      var paramType = typeof(ValueParameter<>).MakeGenericType(solutionCreatorType);
+      var solutionCreatorParam = (IParameter)Activator.CreateInstance(paramType, SolutionCreatorParameter.Name, SolutionCreatorParameter.Description,
+        Encoding.SolutionCreator);
+      Parameters.Remove(SolutionCreatorParameter);
+      Parameters.Add(solutionCreatorParam);
+    }
+
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      Encoding.SolutionCreator = SolutionCreator;
+    }
+
+
+    protected virtual void ParameterizeOperators() {
+      foreach (var op in Operators.OfType<IEncodingOperator>())
+        op.EncodingParameter.ActualName = EncodingParameter.Name;
+      foreach (var op in Operators.OfType<INeighborBasedOperator>())
+        op.GetNeighborsFunc = GetNeighbors;
+    }
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs	(revision 11739)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  public abstract class CompiledProblemDefinition : NamedItem, IProblemDefinition {
+    [Storable(Name = "Encoding")]
+    private IEncoding encoding;
+    public IEncoding Encoding {
+      get { return encoding; }
+      protected set {
+        if (value == null) throw new ArgumentNullException("The encoding must not be null.");
+        if (encoding == value) return;
+        encoding = value;
+      }
+    }
+
+    public dynamic vars { get; set; }
+    public abstract void Initialize();
+
+    [StorableConstructor]
+    protected CompiledProblemDefinition(bool deserializing) : base(deserializing) { }
+    protected CompiledProblemDefinition(CompiledProblemDefinition original, Cloner cloner)
+      : base(original, cloner) {
+      this.encoding = cloner.Clone(original.encoding);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      throw new InvalidOperationException("ProblemScript instances cannot be cloned.");
+    }
+
+    protected CompiledProblemDefinition(IEncoding encoding) : this(encoding, "ProblemDefinition") { }
+    protected CompiledProblemDefinition(IEncoding encoding, string name) : this(encoding, name, string.Empty) { }
+    protected CompiledProblemDefinition(IEncoding encoding, string name, string description)
+      : base(name, description) {
+      Encoding = encoding;
+      //TODO call initialize and set refactor ctors
+    }
+
+    public abstract IEnumerable<Individual> GetNeighbors(Individual vector, IRandom random);
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs	(revision 11739)
@@ -0,0 +1,126 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("Multi-objective Problem Definition Script", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
+  [StorableClass]
+  public class MultiObjectiveProblemDefinitionScript : ProblemDefinitionScript, IMultiObjectiveProblemDefinition, IStorableContent {
+    public string Filename { get; set; }
+
+    protected override string CodeTemplate {
+      get {
+        return @"using System;
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Programmable;
+
+public class CustomProblemDefinition : CompiledProblemDefinition, IMultiObjectiveProblemDefinition {
+  public bool[] Maximization { get { return new [] { false, false }; } }
+
+  public CustomProblemDefinition() {
+    // Define the solution encoding which can also consist of multiple vectors, examples below
+    // Encoding = new BinaryEncoding(""b"", length: 5);
+    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
+    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
+    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
+    // Encoding = new MultiEncoding()
+      // .AddBinaryVector(""b"", length: 5)
+      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
+      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
+      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
+    ;
+  }
+
+  public override void Initialize() {
+    // when the definition is created here you can initialize variables in the variable store
+  }
+
+  public double[] Evaluate(IRandom random, Individual individual) {
+    var qualities = new [] { 0.0, 0.0 };
+    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
+    // qualities = new [] { individual.RealVector(""r"").Sum(x => x * x), individual.RealVector(""r"").Sum(x => x * x * x) };
+    return qualities;
+  }
+
+  public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
+    // write or update results given the range of vectors and resulting qualities
+    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
+  }
+
+  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
+    // Create new vectors, based on the given one that represent small changes
+    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
+    while (true) {
+      // this is not an infinite loop as only a finite amount of samples will be drawn
+      // it is possible to return a concrete amount of neighbors also
+      var neighbor = (Individual)individual.Clone();
+      //e.g. make a bit flip in a binary parameter
+      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
+      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
+      yield return neighbor;
+    }
+  }
+
+  // implement further classes and methods
+}";
+      }
+    }
+
+    [StorableConstructor]
+    protected MultiObjectiveProblemDefinitionScript(bool deserializing) : base(deserializing) { }
+    protected MultiObjectiveProblemDefinitionScript(MultiObjectiveProblemDefinitionScript original, Cloner cloner)
+      : base(original, cloner) { }
+
+    public MultiObjectiveProblemDefinitionScript() {
+      Code = CodeTemplate;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MultiObjectiveProblemDefinitionScript(this, cloner);
+    }
+
+    public new IMultiObjectiveProblemDefinition CompiledProblemDefinition {
+      get { return (IMultiObjectiveProblemDefinition)base.CompiledProblemDefinition; }
+    }
+
+    bool[] IMultiObjectiveProblemDefinition.Maximization {
+      get { return CompiledProblemDefinition != null ? CompiledProblemDefinition.Maximization : new bool[0]; }
+    }
+
+    double[] IMultiObjectiveProblemDefinition.Evaluate(Individual individual, IRandom random) {
+      return CompiledProblemDefinition.Evaluate(individual, random);
+    }
+
+    void IMultiObjectiveProblemDefinition.Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
+      CompiledProblemDefinition.Analyze(individuals, qualities, results);
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs	(revision 11739)
@@ -0,0 +1,103 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Scripting;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("ProblemDefinitionScript", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
+  [StorableClass]
+  public abstract class ProblemDefinitionScript : Script, IProblemDefinition {
+    protected bool SuppressEvents { get; set; }
+
+    [Storable]
+    private VariableStore variableStore;
+    public VariableStore VariableStore {
+      get { return variableStore; }
+    }
+
+    [StorableConstructor]
+    protected ProblemDefinitionScript(bool deserializing) : base(deserializing) { }
+    protected ProblemDefinitionScript(ProblemDefinitionScript original, Cloner cloner)
+      : base(original, cloner) {
+      variableStore = cloner.Clone(original.variableStore);
+    }
+    protected ProblemDefinitionScript() :base(){
+      variableStore = new VariableStore();
+    }
+
+    IEncoding IProblemDefinition.Encoding {
+      get { return CompiledProblemDefinition != null ? CompiledProblemDefinition.Encoding : null; }
+    }
+    IEnumerable<Individual> IProblemDefinition.GetNeighbors(Individual individual, IRandom random) {
+      return CompiledProblemDefinition.GetNeighbors(individual, random);
+    }
+
+    private readonly object locker = new object();
+    private volatile IProblemDefinition compiledProblemDefinition;
+    protected IProblemDefinition CompiledProblemDefinition {
+      get {
+          lock (locker) {
+            if (compiledProblemDefinition == null) {
+              Compile();
+            }
+          }
+        return compiledProblemDefinition;
+      }
+      private set {
+        compiledProblemDefinition = value;
+        OnProblemDefinitionChanged();
+      }
+    }
+
+    public override Assembly Compile() {
+      var assembly = base.Compile();
+      var types = assembly.GetTypes();
+      try {
+        var inst = (CompiledProblemDefinition)Activator.CreateInstance(types.First(x => typeof(CompiledProblemDefinition).IsAssignableFrom(x)));
+        inst.vars = new Variables(VariableStore);
+        inst.Initialize();
+        CompiledProblemDefinition = inst;
+      }
+      catch {
+        compiledProblemDefinition = null;
+      }
+      return assembly;
+    }
+
+    protected override void OnCodeChanged() {
+      base.OnCodeChanged();
+      compiledProblemDefinition = null;
+    }
+
+    public event EventHandler ProblemDefinitionChanged;
+    protected virtual void OnProblemDefinitionChanged() {
+      var handler = ProblemDefinitionChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs	(revision 11739)
@@ -0,0 +1,126 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("Single-objective Problem Definition Script", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
+  [StorableClass]
+  public sealed class SingleObjectiveProblemDefinitionScript : ProblemDefinitionScript, ISingleObjectiveProblemDefinition, IStorableContent {
+    public string Filename { get; set; }
+
+    protected override string CodeTemplate {
+      get {
+        return @"using System;
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Programmable;
+
+public class CustomProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition {
+  public bool IsMaximizationProblem { get { return false; } }
+
+  public CustomProblemDefinition() {
+    // Define the solution encoding which can also consist of multiple vectors, examples below
+    // Encoding = new BinaryEncoding(""b"", length: 5);
+    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
+    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
+    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
+    // Encoding = new MultiEncoding()
+      // .AddBinaryVector(""b"", length: 5)
+      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
+      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
+      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
+    ;
+  }
+
+  public override void Initialize() {
+    // when the definition is created here you can initialize variables in the variable store
+  }
+
+  public double Evaluate(IRandom random, Individual individual) {
+    var quality = 0.0;
+    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
+    // quality = individual.RealVector(""r"").Sum(x => x * x);
+    return quality;
+  }
+
+  public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
+    // write or update results given the range of vectors and resulting qualities
+    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
+  }
+
+  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
+    // Create new vectors, based on the given one that represent small changes
+    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
+    while (true) {
+      // this is not an infinite loop as only a finite amount of samples will be drawn
+      // it is possible to return a concrete amount of neighbors also
+      var neighbor = (Individual)individual.Clone();
+      //e.g. make a bit flip in a binary parameter
+      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
+      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
+      yield return neighbor;
+    }
+  }
+
+  // implement further classes and methods
+}";
+      }
+    }
+
+    [StorableConstructor]
+    private SingleObjectiveProblemDefinitionScript(bool deserializing) : base(deserializing) { }
+    private SingleObjectiveProblemDefinitionScript(SingleObjectiveProblemDefinitionScript original, Cloner cloner) : base(original, cloner) { }
+    public SingleObjectiveProblemDefinitionScript() :base(){
+      Code = CodeTemplate;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SingleObjectiveProblemDefinitionScript(this, cloner);
+    }
+
+    public new ISingleObjectiveProblemDefinition CompiledProblemDefinition {
+      get { return (ISingleObjectiveProblemDefinition)base.CompiledProblemDefinition; }
+    }
+
+    bool ISingleObjectiveProblemDefinition.Maximization {
+      get { return CompiledProblemDefinition != null && CompiledProblemDefinition.Maximization; }
+    }
+
+    double ISingleObjectiveProblemDefinition.Evaluate(Individual individual, IRandom random) {
+      return CompiledProblemDefinition.Evaluate(individual, random);
+    }
+
+    void ISingleObjectiveProblemDefinition.Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
+      CompiledProblemDefinition.Analyze(individuals, qualities, results);
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs	(revision 11739)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [StorableClass]
+  public abstract class SingleObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, SingleObjectiveEvaluator>, ISingleObjectiveProblemDefinition
+  where TEncoding : class, IEncoding {
+    [StorableConstructor]
+    protected SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+
+    protected SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem<TEncoding> original, Cloner cloner)
+      : base(original, cloner) {
+      ParameterizeOperators();
+    }
+
+    protected SingleObjectiveProgrammableProblem()
+      : base() {
+
+      Operators.Add(new BestScopeSolutionAnalyzer());
+      Operators.Add(new SingleObjectiveEvaluator());
+      Operators.Add(new SingleObjectiveAnalyzer());
+
+      ParameterizeOperators();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      ParameterizeOperators();
+    }
+
+    public abstract bool Maximization { get; }
+    public abstract double Evaluate(Individual individual, IRandom random);
+    public virtual void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) { }
+
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeOperators();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+      foreach (var op in Operators.OfType<ISingleObjectiveEvaluationOperator>())
+        op.EvaluateFunc = Evaluate;
+      foreach (var op in Operators.OfType<ISingleObjectiveAnalysisOperator>())
+        op.AnalyzeAction = Analyze;
+    }
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs	(revision 11739)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable.Problems {
+  [Item("Scriptable Problem (single-objective)", "Represents a single-objective problem that can be scripted.")]
+  [Creatable("1 Test")]
+  [StorableClass]
+  public sealed class SingleObjectiveScriptableProblem : SingleObjectiveProgrammableProblem<IEncoding> {
+
+    private FixedValueParameter<SingleObjectiveProblemDefinitionScript> SingleObjectiveProblemScriptParameter {
+      get { return (FixedValueParameter<SingleObjectiveProblemDefinitionScript>)Parameters["ProblemScript"]; }
+    }
+
+    private SingleObjectiveProblemDefinitionScript ProblemScript {
+      get { return SingleObjectiveProblemScriptParameter.Value; }
+    }
+
+    private ISingleObjectiveProblemDefinition ProblemDefinition {
+      get { return SingleObjectiveProblemScriptParameter.Value; }
+    }
+
+    private SingleObjectiveScriptableProblem(SingleObjectiveScriptableProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEvents();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveScriptableProblem(this, cloner); }
+
+
+    [StorableConstructor]
+    private SingleObjectiveScriptableProblem(bool deserializing) : base(deserializing) { }
+
+    public SingleObjectiveScriptableProblem()
+      : base() {
+      Parameters.Add(new FixedValueParameter<SingleObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name }));
+      RegisterEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEvents();
+    }
+
+    private void RegisterEvents() {
+      ProblemScript.ProblemDefinitionChanged += (o, e) => OnProblemDefinitionChanged();
+    }
+
+    private void OnProblemDefinitionChanged() {
+    }
+
+    public override bool Maximization {
+      get { return ProblemDefinition.Maximization; }
+    }
+
+    public override double Evaluate(Individual individual, IRandom random) {
+      return ProblemDefinition.Evaluate(individual, random);
+    }
+
+    public override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
+      ProblemDefinition.Analyze(individuals, qualities, results);
+    }
+    public override IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
+      return ProblemDefinition.GetNeighbors(individual, random);
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_MultiObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_MultiObjectiveProgrammableProblem.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_MultiObjectiveProgrammableProblem.cs	(revision 11739)
@@ -0,0 +1,168 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("Programmable Problem (multi-objective)", "Represents a multi-objective problem that can be programmed.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public class OLD_MultiObjectiveProgrammableProblem : MultiObjectiveHeuristicOptimizationProblem<MultiObjectiveEvaluator, ISolutionCreator>, IParameterizedNamedItem, IStorableContent {
+    public string Filename { get; set; }
+
+    public static new Image StaticItemImage {
+      get { return Common.Resources.VSImageLibrary.Script; }
+    }
+
+    public new ParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
+      get { return Parameters; }
+    }
+
+    public IValueParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter {
+      get { return (IValueParameter<IMultiObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
+    }
+
+    protected IValueParameter<IEncoding> EncodingParameter {
+      get { return (IValueParameter<IEncoding>)Parameters["Encoding"]; }
+    }
+
+    public IMultiObjectiveProblemDefinition ProblemDefinition {
+      get { return ProblemDefinitionParameter.Value; }
+      set { ProblemDefinitionParameter.Value = value; }
+    }
+
+    [Storable]
+    protected List<IParameter> DynamicEncodingParameters;
+
+    [StorableConstructor]
+    protected OLD_MultiObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+    protected OLD_MultiObjectiveProgrammableProblem(OLD_MultiObjectiveProgrammableProblem original, Cloner cloner)
+      : base(original, cloner) {
+      DynamicEncodingParameters = original.DynamicEncodingParameters.Select(cloner.Clone).ToList();
+      RegisterEventHandlers();
+    }
+    public OLD_MultiObjectiveProgrammableProblem()
+      : base(new MultiObjectiveEvaluator(), new MultiEncodingCreator()) {
+      Parameters.Add(new ValueParameter<IMultiObjectiveProblemDefinition>("ProblemDefinition", "Defines the problem.", new MultiObjectiveProblemDefinitionScript() { Name = Name }));
+      Parameters.Add(new ValueParameter<IEncoding>("Encoding", "Describes which parameters exist, what they're called, what type they are and their bounds if any."));
+
+      DynamicEncodingParameters = new List<IParameter>();
+
+      Operators.Add(new MultiObjectiveAnalyzer());
+      Operators.Add(Evaluator);
+
+      RegisterEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OLD_MultiObjectiveProgrammableProblem(this, cloner);
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    // ReSharper disable UnusedMember.Local
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+    // ReSharper restore UnusedMember.Local
+
+    private void RegisterEventHandlers() {
+      ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
+      RegisterHostInstanceChanges();
+    }
+
+    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
+      RegisterHostInstanceChanges();
+      Parameterize();
+    }
+
+    private void RegisterHostInstanceChanges() {
+      //ProblemDefinitionParameter.Value.ProblemDefinitionChanged += ProblemDefinitionChanged;
+      ProblemDefinitionParameter.Value.NameChanged += ProblemDefinitionHostOnNameChanged;
+    }
+
+    private void ProblemDefinitionHostOnNameChanged(object sender, EventArgs eventArgs) {
+      if (sender != ProblemDefinitionParameter.Value) return;
+      Name = ProblemDefinitionParameter.Value.Name;
+    }
+
+    protected override void OnNameChanged() {
+      base.OnNameChanged();
+      ProblemDefinitionParameter.Value.Name = Name;
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Parameterize();
+    }
+
+    protected virtual void ProblemDefinitionChanged(object sender, EventArgs eventArgs) {
+      Parameterize();
+    }
+
+    protected virtual void Parameterize() {
+      var definition = ProblemDefinitionParameter.Value;
+      if (definition == null) return;
+
+      IEncoding encoding = definition.Encoding;
+      EncodingParameter.Value = encoding;
+      Maximization = new BoolArray(definition.Maximization);
+
+      Evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
+      //Evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //foreach (var evalOp in Operators.OfType<IMultiObjectiveProgrammableProblemEvaluator>()) {
+      //  evalOp.EncodingParameter.ActualName = EncodingParameter.Name;
+      //  evalOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //}
+      //foreach (var analyzeOp in Operators.OfType<IMultiObjectiveProgrammableProblemAnalyzer>()) {
+      //  analyzeOp.EncodingParameter.ActualName = EncodingParameter.Name;
+      //  analyzeOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //  analyzeOp.QualitiesParameter.ActualName = Evaluator.QualitiesParameter.ActualName;
+      //}
+
+      SolutionCreator = encoding.SolutionCreator;
+
+      foreach (var param in DynamicEncodingParameters)
+        if (Parameters.Contains(param)) Parameters.Remove(param);
+      DynamicEncodingParameters.Clear();
+
+      DynamicEncodingParameters.AddRange(encoding.Parameters);
+
+
+      foreach (var param in DynamicEncodingParameters) {
+        param.Hidden = true;
+        Parameters.Add(param);
+      }
+
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_SingleObjectiveProgrammableProblem.cs	(revision 11739)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/OLD_SingleObjectiveProgrammableProblem.cs	(revision 11739)
@@ -0,0 +1,199 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("Programmable Problem (single-objective)", "Represents a single-objective problem that can be programmed.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public class OLD_SingleObjectiveProgrammableProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveEvaluator, ISolutionCreator>, IParameterizedNamedItem, IStorableContent {
+    public string Filename { get; set; }
+
+    public static new Image StaticItemImage {
+      get { return Common.Resources.VSImageLibrary.Script; }
+    }
+
+    public IValueParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
+      get { return (IValueParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
+    }
+
+    protected IValueParameter<IEncoding> EncodingParameter {
+      get { return (IValueParameter<IEncoding>)Parameters["Encoding"]; }
+    }
+
+    public ISingleObjectiveProblemDefinition ProblemDefinition {
+      get { return ProblemDefinitionParameter.Value; }
+      set { ProblemDefinitionParameter.Value = value; }
+    }
+
+
+    public override IEnumerable<IParameterizedItem> ExecutionContextItems {
+      get { return base.ExecutionContextItems.Concat(new[] { ProblemDefinition.Encoding }); }
+    }
+    protected override IEnumerable<IItem> GetOperators() {
+      return base.GetOperators().Concat(ProblemDefinition.Encoding.Operators);
+    }
+
+    [StorableConstructor]
+    protected OLD_SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+
+    protected OLD_SingleObjectiveProgrammableProblem(OLD_SingleObjectiveProgrammableProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    public OLD_SingleObjectiveProgrammableProblem()
+      : base(new SingleObjectiveEvaluator(), new MultiEncodingCreator()) {
+      Parameters.Add(new ValueParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name }));
+      Parameters.Add(new ValueParameter<IEncoding>("Encoding", "Describes the configuration of the encoding, what the variables are called, what type they are and their bounds if any."));
+
+
+      Operators.Add(new BestScopeSolutionAnalyzer());
+      Operators.Add(new SingleObjectiveAnalyzer());
+      Operators.Add(Evaluator);
+
+      RegisterEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OLD_SingleObjectiveProgrammableProblem(this, cloner);
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    // ReSharper disable UnusedMember.Local
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+    // ReSharper restore UnusedMember.Local
+
+    private void RegisterEventHandlers() {
+      ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
+      RegisterProblemDefinitionEventHandlers();
+    }
+
+    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
+      RegisterProblemDefinitionEventHandlers();
+      Parameterize();
+    }
+
+    private void RegisterProblemDefinitionEventHandlers() {
+      //ProblemDefinitionParameter.Value.ProblemDefinitionChanged += ProblemDefinitionChanged;
+      ProblemDefinitionParameter.Value.NameChanged += ProblemDefinitionNameChanged;
+    }
+
+    private void ProblemDefinitionNameChanged(object sender, EventArgs eventArgs) {
+      if (sender != ProblemDefinitionParameter.Value) return;
+      Name = ProblemDefinitionParameter.Value.Name;
+    }
+
+    protected override void OnNameChanged() {
+      base.OnNameChanged();
+      ProblemDefinitionParameter.Value.Name = Name;
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Parameterize();
+    }
+
+    protected virtual void ProblemDefinitionChanged(object sender, EventArgs eventArgs) {
+      Parameterize();
+    }
+
+    protected virtual void Parameterize() {
+      var definition = ProblemDefinitionParameter.Value;
+      if (definition == null) return;
+
+      IEncoding encoding = definition.Encoding;
+      SolutionCreator = encoding.SolutionCreator;
+
+      EncodingParameter.Value = encoding;
+      Maximization.Value = definition.Maximization;
+
+      //Evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
+      //Evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //foreach (var evalOp in Operators.OfType<ISingleObjectiveProgrammableProblemEvaluator>()) {
+      //  evalOp.EncodingParameter.ActualName = EncodingParameter.Name;
+      //  evalOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //}
+      //foreach (var analyzeOp in Operators.OfType<ISingleObjectiveProgrammableProblemAnalyzer>()) {
+      //  analyzeOp.EncodingParameter.ActualName = EncodingParameter.Name;
+      //  analyzeOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //  analyzeOp.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+      //}
+
+      ConfigureSingleEncodingOperators();
+      UpdateImprovementOperators();
+      UpdateMoveOperators();
+    }
+
+
+    protected virtual void ConfigureSingleEncodingOperators() {
+      foreach (var su in GetOperators().OfType<IRealVectorSwarmUpdater>()) {
+        su.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      }
+    }
+
+    protected virtual void UpdateImprovementOperators() {
+      if (!Operators.Any(x => x is SingleObjectiveImprover))
+        Operators.Add(new SingleObjectiveImprover());
+      //foreach (var improver in Operators.OfType<SingleObjectiveImprover>()) {
+      //  improver.EncodingParameter.ActualName = EncodingParameter.Name;
+      //  improver.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      //  improver.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      //  improver.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+      //}
+    }
+    protected virtual void UpdateMoveOperators() {
+      if (!Operators.Any(x => x is SingleObjectiveMoveGenerator))
+        Operators.Add(new SingleObjectiveMoveGenerator());
+      if (!Operators.Any(x => x is SingleObjectiveMoveEvaluator))
+        Operators.Add(new SingleObjectiveMoveEvaluator());
+      if (!Operators.Any(x => x is SingleObjectiveMoveMaker))
+        Operators.Add(new SingleObjectiveMoveMaker());
+
+      foreach (var generator in Operators.OfType<SingleObjectiveMoveGenerator>()) {
+        generator.EncodingParameter.ActualName = EncodingParameter.Name;
+        //generator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      }
+      foreach (var evaluator in Operators.OfType<SingleObjectiveMoveEvaluator>()) {
+        evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
+        evaluator.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        //evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
+      }
+      foreach (var maker in Operators.OfType<SingleObjectiveMoveMaker>()) {
+        maker.EncodingParameter.ActualName = EncodingParameter.Name;
+        maker.MoveQualityParameter.ActualName = Operators.OfType<SingleObjectiveMoveEvaluator>().First().MoveQualityParameter.ActualName;
+        maker.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+      }
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveAnalyzer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveAnalyzer.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveAnalyzer.cs	(revision 11739)
@@ -13,10 +13,6 @@
   [Item("Multi-objective Analyzer", "Calls the Analyze method of the problem definition.")]
   [StorableClass]
-  public class MultiObjectiveAnalyzer : SingleSuccessorOperator, IMultiObjectiveProgrammableProblemAnalyzer {
+  public class MultiObjectiveAnalyzer : SingleSuccessorOperator, IMultiObjectiveAnalysisOperator {
     public bool EnabledByDefault { get { return true; } }
-
-    public ILookupParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<IMultiObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
-    }
 
     public ILookupParameter<IEncoding> EncodingParameter {
@@ -32,4 +28,6 @@
     }
 
+    public Action<Individual[], double[][], ResultCollection> AnalyzeAction { get; set; }
+
     [StorableConstructor]
     protected MultiObjectiveAnalyzer(bool deserializing) : base(deserializing) { }
@@ -37,5 +35,4 @@
     public MultiObjectiveAnalyzer() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<IMultiObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>("Qualities", "The qualities of the parameter vector."));
@@ -48,6 +45,4 @@
 
     public override IOperation Apply() {
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var encoding = EncodingParameter.ActualValue;
       var results = ResultsParameter.ActualValue;
@@ -58,5 +53,5 @@
 
       var individuals = scopes.Select(encoding.GetIndividual).ToArray();
-      definition.Analyze(individuals, QualitiesParameter.ActualValue.Select(x => x.ToArray()).ToArray(), results);
+      AnalyzeAction(individuals, QualitiesParameter.ActualValue.Select(x => x.ToArray()).ToArray(), results);
       return base.Apply();
     }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveEvaluator.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiObjectiveEvaluator.cs	(revision 11739)
@@ -32,12 +32,8 @@
   [Item("Multi-objective Evaluator", "Calls the Evaluate method of the problem definition and writes the return value into the scope.")]
   [StorableClass]
-  public class MultiObjectiveEvaluator : SingleSuccessorOperator, IMultiObjectiveProgrammableProblemEvaluator, IStochasticOperator {
+  public class MultiObjectiveEvaluator : SingleSuccessorOperator, IMulitObjectiveEvaluationOperator, IStochasticOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<IMultiObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<IMultiObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
     }
 
@@ -50,4 +46,6 @@
     }
 
+    public Func<Individual, IRandom, double[]> EvaluateFunc { get; set; }
+
     [StorableConstructor]
     protected MultiObjectiveEvaluator(bool deserializing) : base(deserializing) { }
@@ -55,5 +53,4 @@
     public MultiObjectiveEvaluator() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<IMultiObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new LookupParameter<DoubleArray>("Qualities", "The qualities of the parameter vector."));
@@ -66,9 +63,7 @@
     public override IOperation Apply() {
       var random = RandomParameter.ActualValue;
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var encoding = EncodingParameter.ActualValue;
       var individual = encoding.GetIndividual(ExecutionContext.Scope);
-      QualitiesParameter.ActualValue = new DoubleArray(definition.Evaluate(random, individual));
+      QualitiesParameter.ActualValue = new DoubleArray(EvaluateFunc(individual, random));
       return base.Apply();
     }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveAnalyzer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveAnalyzer.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveAnalyzer.cs	(revision 11739)
@@ -13,10 +13,6 @@
   [Item("Single-objective Analyzer", "Calls the script's Analyze method to be able to write into the results collection.")]
   [StorableClass]
-  public class SingleObjectiveAnalyzer : SingleSuccessorOperator, ISingleObjectiveProgrammableProblemAnalyzer {
+  public sealed class SingleObjectiveAnalyzer : SingleSuccessorOperator, ISingleObjectiveAnalysisOperator, IAnalyzer {
     public bool EnabledByDefault { get { return true; } }
-
-    public ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
-    }
 
     public ILookupParameter<IEncoding> EncodingParameter {
@@ -32,10 +28,10 @@
     }
 
+    public Action<Individual[], double[], ResultCollection> AnalyzeAction { get; set; }
+
     [StorableConstructor]
-    protected SingleObjectiveAnalyzer(bool deserializing) : base(deserializing) { }
-    protected SingleObjectiveAnalyzer(SingleObjectiveAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    private SingleObjectiveAnalyzer(bool deserializing) : base(deserializing) { }
+    private SingleObjectiveAnalyzer(SingleObjectiveAnalyzer original, Cloner cloner) : base(original, cloner) { }
     public SingleObjectiveAnalyzer() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
@@ -48,6 +44,4 @@
 
     public override IOperation Apply() {
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null");
       var encoding = EncodingParameter.ActualValue;
       var results = ResultsParameter.ActualValue;
@@ -58,5 +52,5 @@
 
       var individuals = scopes.Select(encoding.GetIndividual).ToArray();
-      definition.Analyze(individuals, QualityParameter.ActualValue.Select(x => x.Value).ToArray(), results);
+      AnalyzeAction(individuals, QualityParameter.ActualValue.Select(x => x.Value).ToArray(), results);
       return base.Apply();
     }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs	(revision 11739)
@@ -32,12 +32,8 @@
   [Item("Single-objective Evaluator", "Calls the script's Evaluate method to get the quality value of the parameter vector.")]
   [StorableClass]
-  public class SingleObjectiveEvaluator : SingleSuccessorOperator, ISingleObjectiveProgrammableProblemEvaluator, IStochasticOperator {
+  public sealed class SingleObjectiveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
     }
 
@@ -50,25 +46,22 @@
     }
 
+    public Func<Individual, IRandom, double> EvaluateFunc { get; set; }
+
     [StorableConstructor]
-    protected SingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
-    protected SingleObjectiveEvaluator(SingleObjectiveEvaluator original, Cloner cloner) : base(original, cloner) { }
+    private SingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    private SingleObjectiveEvaluator(SingleObjectiveEvaluator original, Cloner cloner) : base(original, cloner) { }
     public SingleObjectiveEvaluator() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
     }
 
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SingleObjectiveEvaluator(this, cloner);
-    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveEvaluator(this, cloner); }
 
     public override IOperation Apply() {
       var random = RandomParameter.ActualValue;
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var encoding = EncodingParameter.ActualValue;
       var individual = encoding.GetIndividual(ExecutionContext.Scope);
-      QualityParameter.ActualValue = new DoubleValue(definition.Evaluate(random, individual));
+      QualityParameter.ActualValue = new DoubleValue(EvaluateFunc(individual, random));
       return base.Apply();
     }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveImprover.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveImprover.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveImprover.cs	(revision 11739)
@@ -1,3 +1,25 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Common;
@@ -12,15 +34,7 @@
   [Item("Single-objective Improver", "Improves a solution by calling GetNeighbors and Evaluate of the corresponding problem definition.")]
   [StorableClass]
-  public sealed class SingleObjectiveImprover : SingleSuccessorOperator, ISingleObjectiveImprovementOperator, IStochasticOperator {
-    public IValueLookupParameter<IItem> SolutionParameter {
-      get { return new ValueLookupParameter<IItem>("notused"); }
-    }
-
+  public sealed class SingleObjectiveImprover : SingleSuccessorOperator, INeighborBasedOperator, ISingleObjectiveEvaluationOperator, IStochasticOperator {
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
     }
 
@@ -49,4 +63,7 @@
     }
 
+    public Func<Individual, IRandom, double> EvaluateFunc { get; set; }
+    public Func<Individual, IRandom, IEnumerable<Individual>> GetNeighborsFunc { get; set; }
+
     [StorableConstructor]
     private SingleObjectiveImprover(bool deserializing) : base(deserializing) { }
@@ -54,5 +71,4 @@
     public SingleObjectiveImprover() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
@@ -69,6 +85,4 @@
     public override IOperation Apply() {
       var random = RandomParameter.ActualValue;
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var encoding = EncodingParameter.ActualValue;
       var maximize = MaximizationParameter.ActualValue.Value;
@@ -76,5 +90,5 @@
       var sampleSize = SampleSizeParameter.ActualValue.Value;
       var individual = encoding.GetIndividual(ExecutionContext.Scope);
-      var quality = QualityParameter.ActualValue == null ? definition.Evaluate(random, individual) : QualityParameter.ActualValue.Value;
+      var quality = QualityParameter.ActualValue == null ? EvaluateFunc(individual, random) : QualityParameter.ActualValue.Value;
 
       var count = 0;
@@ -82,6 +96,6 @@
         Individual best = null;
         var bestQuality = quality;
-        foreach (var neighbor in definition.GetNeighbors(random, individual).Take(sampleSize)) {
-          var q = definition.Evaluate(random, neighbor);
+        foreach (var neighbor in GetNeighborsFunc(individual, random).Take(sampleSize)) {
+          var q = EvaluateFunc(neighbor, random);
           count++;
           if (maximize && bestQuality > q || !maximize && bestQuality < q) continue;
@@ -95,4 +109,5 @@
 
       LocalEvaluatedSolutionsParameter.ActualValue = new IntValue(count);
+      QualityParameter.ActualValue = new DoubleValue(quality);
       individual.Copy(ExecutionContext.Scope);
       return base.Apply();
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs	(revision 11739)
@@ -32,12 +32,8 @@
   [Item("Single-objective MoveEvaluator", "Evaluates a parameter vector that results from a move.")]
   [StorableClass]
-  public class SingleObjectiveMoveEvaluator : InstrumentedOperator, ISingleObjectiveMoveOperator, ISingleObjectiveMoveEvaluator, IStochasticOperator {
+  public class SingleObjectiveMoveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, ISingleObjectiveMoveEvaluator, IStochasticOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
     }
 
@@ -54,4 +50,6 @@
     }
 
+    public Func<Individual, IRandom, double> EvaluateFunc { get; set; }
+
     [StorableConstructor]
     protected SingleObjectiveMoveEvaluator(bool deserializing) : base(deserializing) { }
@@ -59,5 +57,4 @@
     public SingleObjectiveMoveEvaluator() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
@@ -69,12 +66,10 @@
     }
 
-    public override IOperation InstrumentedApply() {
+    public override IOperation Apply() {
       var random = RandomParameter.ActualValue;
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var encoding = EncodingParameter.ActualValue;
       var individual = encoding.GetIndividual(ExecutionContext.Scope);
-      MoveQualityParameter.ActualValue = new DoubleValue(definition.Evaluate(random, individual));
-      return base.InstrumentedApply();
+      MoveQualityParameter.ActualValue = new DoubleValue(EvaluateFunc(individual, random));
+      return base.Apply();
     }
   }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs	(revision 11739)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
@@ -34,6 +35,5 @@
   [Item("Single-objective MoveGenerator", "Calls the GetNeighbors method of the problem definition to obtain the moves.")]
   [StorableClass]
-  public class SingleObjectiveMoveGenerator : InstrumentedOperator, ISingleObjectiveMoveOperator, IMultiMoveGenerator, IStochasticOperator {
-
+  public class SingleObjectiveMoveGenerator : SingleSuccessorOperator, INeighborBasedOperator, IMultiMoveGenerator, IStochasticOperator {
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
@@ -44,11 +44,9 @@
     }
 
-    public ILookupParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (ILookupParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
-    }
-
     public ILookupParameter<IEncoding> EncodingParameter {
       get { return (ILookupParameter<IEncoding>)Parameters["Encoding"]; }
     }
+
+    public Func<Individual, IRandom, IEnumerable<Individual>> GetNeighborsFunc { get; set; }
 
     [StorableConstructor]
@@ -59,5 +57,4 @@
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
       Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to sample."));
-      Parameters.Add(new LookupParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "The host that holds the problem definition."));
       Parameters.Add(new LookupParameter<IEncoding>("Encoding", "An item that holds the problem's encoding."));
     }
@@ -67,12 +64,10 @@
     }
 
-    public override IOperation InstrumentedApply() {
+    public override IOperation Apply() {
       var random = RandomParameter.ActualValue;
-      var definition = ProblemDefinitionParameter.ActualValue;
-      if (definition == null) throw new InvalidOperationException("Problem definition is null.");
       var sampleSize = SampleSizeParameter.ActualValue.Value;
       var encoding = EncodingParameter.ActualValue;
       var individual = encoding.GetIndividual(ExecutionContext.Scope);
-      var nbhood = definition.GetNeighbors(random, individual).Take(sampleSize).ToList();
+      var nbhood = GetNeighborsFunc(individual, random).Take(sampleSize).ToList();
 
       var moveScopes = new Scope[nbhood.Count];
@@ -83,5 +78,5 @@
       ExecutionContext.Scope.SubScopes.AddRange(moveScopes);
 
-      return base.InstrumentedApply();
+      return base.Apply();
     }
   }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs	(revision 11738)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs	(revision 11739)
@@ -32,5 +32,5 @@
   [Item("Single-objective MoveMaker", "Applies a move.")]
   [StorableClass]
-  public class SingleObjectiveMoveMaker : InstrumentedOperator, ISingleObjectiveMoveOperator, IMoveMaker {
+  public class SingleObjectiveMoveMaker : InstrumentedOperator, IMoveMaker {
     public ILookupParameter<IEncoding> EncodingParameter {
       get { return (ILookupParameter<IEncoding>)Parameters["Encoding"]; }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemDefinition.cs	(revision 11738)
+++ 	(revision )
@@ -1,65 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("ProblemDefinition", "Base class for problem definitions.")]
-  [StorableClass]
-  public abstract class ProblemDefinition : NamedItem, IProblemDefinition {
-    [Storable(Name = "Encoding")]
-    private IEncoding encoding;
-    public IEncoding Encoding {
-      get { return encoding; }
-      protected set {
-        if (value == null) throw new ArgumentNullException("The encoding must not be null.");
-        if (encoding == value) return;
-        encoding = value;
-        OnProblemDefinitionChanged();
-      }
-    }
-
-    [StorableConstructor]
-    protected ProblemDefinition(bool deserializing) : base(deserializing) { }
-    protected ProblemDefinition(ProblemDefinition original, Cloner cloner)
-      : base(original, cloner) {
-      this.encoding = cloner.Clone(original.encoding);
-    }
-    protected ProblemDefinition(IEncoding encoding) : this(encoding, "ProblemDefinition") { }
-    protected ProblemDefinition(IEncoding encoding, string name) : this(encoding, name, string.Empty) { }
-    protected ProblemDefinition(IEncoding encoding, string name, string description)
-      : base(name, description) {
-      Encoding = encoding;
-    }
-
-    public event EventHandler ProblemDefinitionChanged;
-    protected void OnProblemDefinitionChanged() {
-      var handler = ProblemDefinitionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    public abstract IEnumerable<Individual> GetNeighbors(IRandom random, Individual vector);
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemScript.cs	(revision 11738)
+++ 	(revision )
@@ -1,106 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using System.Reflection;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Scripting;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("ProblemDefinitionScript", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
-  [StorableClass]
-  public abstract class ProblemScript : Script {
-    protected bool SuppressEvents { get; set; }
-
-    [Storable]
-    private VariableStore variableStore;
-    public VariableStore VariableStore {
-      get { return variableStore; }
-    }
-
-    [StorableConstructor]
-    protected ProblemScript(bool deserializing) : base(deserializing) { }
-    protected ProblemScript(ProblemScript original, Cloner cloner)
-      : base(original, cloner) {
-      variableStore = cloner.Clone(original.variableStore);
-    }
-    protected ProblemScript() {
-      variableStore = new VariableStore();
-    }
-
-    private volatile IProblemDefinition instance;
-    private object locker = new object();
-    public IProblemDefinition Instance {
-      get {
-        SuppressEvents = true;
-        try {
-          var oldInstance = instance;
-          var compilationNecessary = false;
-          if (instance == null) {
-            lock (locker) {
-              if (instance == null) {
-                compilationNecessary = true;
-                Compile();
-              }
-            }
-          }
-          if (compilationNecessary && (oldInstance != null || instance != null))
-            OnInstanceChanged();
-          return instance;
-        } finally {
-          SuppressEvents = false;
-        }
-      }
-      protected set {
-        instance = value;
-        if (!SuppressEvents) OnInstanceChanged();
-      }
-    }
-
-    public override Assembly Compile() {
-      var assembly = base.Compile();
-      var types = assembly.GetTypes();
-      try {
-        var inst = (ProblemScriptBase)Activator.CreateInstance(types.First(x => typeof(ProblemScriptBase).IsAssignableFrom(x)));
-        inst.vars = new Variables(VariableStore);
-        inst.Initialize();
-        Instance = inst;
-      } catch {
-        Instance = null;
-      }
-      return assembly;
-    }
-
-    protected override void OnCodeChanged() {
-      base.OnCodeChanged();
-      instance = null;
-    }
-
-    public event EventHandler InstanceChanged;
-    protected virtual void OnInstanceChanged() {
-      var handler = InstanceChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemScriptBase.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemScriptBase.cs	(revision 11738)
+++ 	(revision )
@@ -1,37 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-
-namespace HeuristicLab.Problems.Programmable {
-  public abstract class ProblemScriptBase : ProblemDefinition {
-    protected ProblemScriptBase()
-      : base(new MultiEncoding()) { }
-
-    public dynamic vars { get; set; }
-    public abstract void Initialize();
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      throw new InvalidOperationException("ProblemScript instances cannot be cloned.");
-    }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemDefinition.cs	(revision 11738)
+++ 	(revision )
@@ -1,42 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Single-objective Problem Definition", "Base class for custom single-objective problem definitions.")]
-  public abstract class SingleObjectiveProblemDefinition : ProblemDefinition, ISingleObjectiveProblemDefinition {
-
-    public abstract bool IsMaximizationProblem { get; }
-    public abstract double Evaluate(IRandom random, Individual vector);
-    public virtual void Analyze(Individual[] vectors, double[] qualities, ResultCollection results) { }
-
-    [StorableConstructor]
-    protected SingleObjectiveProblemDefinition(bool deserializing) : base(deserializing) { }
-    protected SingleObjectiveProblemDefinition(SingleObjectiveProblemDefinition original, Cloner cloner) : base(original, cloner) { }
-    protected SingleObjectiveProblemDefinition(IEncoding encoding) : this(encoding, "SingleObjectiveProblemDefinition", null) { }
-    protected SingleObjectiveProblemDefinition(IEncoding encoding, string name) : this(encoding, name, null) { }
-    protected SingleObjectiveProblemDefinition(IEncoding encoding, string name, string description) : base(encoding, name, description) { }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemScript.cs	(revision 11738)
+++ 	(revision )
@@ -1,146 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Single-objective Problem Definition Script", "Script that defines the parameter vector and evaluates the solution for a programmable problem.")]
-  [StorableClass]
-  public sealed class SingleObjectiveProblemScript : ProblemScript, ISingleObjectiveProblemDefinition, IStorableContent {
-    public string Filename { get; set; }
-
-    protected override string CodeTemplate {
-      get {
-        return @"using System;
-using System.Linq;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.Programmable;
-
-public class CustomProblemDefinition : ProblemScriptBase, ISingleObjectiveProblemDefinition {
-  public bool IsMaximizationProblem { get { return false; } }
-
-  public CustomProblemDefinition() {
-    // Define the solution encoding which can also consist of multiple vectors, examples below
-    // Encoding = new BinaryEncoding(""b"", length: 5);
-    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
-    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
-    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
-    // Encoding = new MultiEncoding()
-      // .AddBinaryVector(""b"", length: 5)
-      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
-      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
-      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
-    ;
-  }
-
-  public override void Initialize() {
-    // when the definition is created here you can initialize variables in the variable store
-  }
-
-  public double Evaluate(IRandom random, Individual individual) {
-    var quality = 0.0;
-    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
-    // quality = individual.RealVector(""r"").Sum(x => x * x);
-    return quality;
-  }
-
-  public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
-    // write or update results given the range of vectors and resulting qualities
-    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
-  }
-
-  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
-    // Create new vectors, based on the given one that represent small changes
-    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
-    while (true) {
-      // this is not an infinite loop as only a finite amount of samples will be drawn
-      // it is possible to return a concrete amount of neighbors also
-      var neighbor = (Individual)individual.Clone();
-      //e.g. make a bit flip in a binary parameter
-      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
-      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
-      yield return neighbor;
-    }
-  }
-
-  // implement further classes and methods
-}";
-      }
-    }
-
-    [StorableConstructor]
-    private SingleObjectiveProblemScript(bool deserializing) : base(deserializing) { }
-    private SingleObjectiveProblemScript(SingleObjectiveProblemScript original, Cloner cloner) : base(original, cloner) { }
-    public SingleObjectiveProblemScript() {
-      Code = CodeTemplate;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SingleObjectiveProblemScript(this, cloner);
-    }
-
-    public new ISingleObjectiveProblemDefinition Instance {
-      get { return (ISingleObjectiveProblemDefinition)base.Instance; }
-      private set { base.Instance = value; }
-    }
-
-    protected override void OnInstanceChanged() {
-      OnProblemDefinitionChanged();
-      base.OnInstanceChanged();
-    }
-
-    bool ISingleObjectiveProblemDefinition.IsMaximizationProblem {
-      get { return Instance != null && Instance.IsMaximizationProblem; }
-    }
-
-    IEncoding IProblemDefinition.Encoding {
-      get { return Instance != null ? Instance.Encoding : null; }
-    }
-
-    double ISingleObjectiveProblemDefinition.Evaluate(IRandom random, Individual individual) {
-      return Instance.Evaluate(random, individual);
-    }
-
-    void ISingleObjectiveProblemDefinition.Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
-      Instance.Analyze(individuals, qualities, results);
-    }
-
-    IEnumerable<Individual> IProblemDefinition.GetNeighbors(IRandom random, Individual individual) {
-      return Instance.GetNeighbors(random, individual);
-    }
-
-    public event EventHandler ProblemDefinitionChanged;
-    private void OnProblemDefinitionChanged() {
-      var handler = ProblemDefinitionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs	(revision 11738)
+++ 	(revision )
@@ -1,206 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [Item("Programmable Problem (single-objective)", "Represents a single-objective problem that can be programmed.")]
-  [Creatable("Problems")]
-  [StorableClass]
-  public class SingleObjectiveProgrammableProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveProgrammableProblemEvaluator, ISolutionCreator>, IParameterizedNamedItem, IStorableContent {
-    public string Filename { get; set; }
-
-    public static new Image StaticItemImage {
-      get { return Common.Resources.VSImageLibrary.Script; }
-    }
-
-    public new ParameterCollection Parameters {
-      get { return base.Parameters; }
-    }
-    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
-      get { return Parameters; }
-    }
-
-    public IValueParameter<ISingleObjectiveProblemDefinition> ProblemDefinitionParameter {
-      get { return (IValueParameter<ISingleObjectiveProblemDefinition>)Parameters["ProblemDefinition"]; }
-    }
-
-    protected IValueParameter<IEncoding> EncodingParameter {
-      get { return (IValueParameter<IEncoding>)Parameters["Encoding"]; }
-    }
-
-    public ISingleObjectiveProblemDefinition ProblemDefinition {
-      get { return ProblemDefinitionParameter.Value; }
-      set { ProblemDefinitionParameter.Value = value; }
-    }
-
-
-    public override IEnumerable<IParameterizedItem> ExecutionContextItems {
-      get { return base.ExecutionContextItems.Concat(new[] { ProblemDefinition.Encoding }); }
-    }
-    protected override IEnumerable<IItem> GetOperators() {
-      return base.GetOperators().Concat(ProblemDefinition.Encoding.Operators);
-    }
-
-    [StorableConstructor]
-    protected SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
-
-    protected SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem original, Cloner cloner)
-      : base(original, cloner) {
-      RegisterEventHandlers();
-    }
-    public SingleObjectiveProgrammableProblem()
-      : base(new SingleObjectiveEvaluator(), new MultiEncodingCreator()) {
-      Parameters.Add(new ValueParameter<ISingleObjectiveProblemDefinition>("ProblemDefinition", "Defines the problem.", new SingleObjectiveProblemScript() { Name = Name }));
-      Parameters.Add(new ValueParameter<IEncoding>("Encoding", "Describes the configuration of the encoding, what the variables are called, what type they are and their bounds if any."));
-
-
-      Operators.Add(new BestScopeSolutionAnalyzer());
-      Operators.Add(new SingleObjectiveAnalyzer());
-      Operators.Add(Evaluator);
-
-      RegisterEventHandlers();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SingleObjectiveProgrammableProblem(this, cloner);
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    // ReSharper disable UnusedMember.Local
-    private void AfterDeserialization() {
-      RegisterEventHandlers();
-    }
-    // ReSharper restore UnusedMember.Local
-
-    private void RegisterEventHandlers() {
-      ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
-      RegisterProblemDefinitionEventHandlers();
-    }
-
-    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
-      RegisterProblemDefinitionEventHandlers();
-      Parameterize();
-    }
-
-    private void RegisterProblemDefinitionEventHandlers() {
-      ProblemDefinitionParameter.Value.ProblemDefinitionChanged += ProblemDefinitionChanged;
-      ProblemDefinitionParameter.Value.NameChanged += ProblemDefinitionNameChanged;
-    }
-
-    private void ProblemDefinitionNameChanged(object sender, EventArgs eventArgs) {
-      if (sender != ProblemDefinitionParameter.Value) return;
-      Name = ProblemDefinitionParameter.Value.Name;
-    }
-
-    protected override void OnNameChanged() {
-      base.OnNameChanged();
-      ProblemDefinitionParameter.Value.Name = Name;
-    }
-
-    protected override void OnEvaluatorChanged() {
-      base.OnEvaluatorChanged();
-      Parameterize();
-    }
-
-    protected virtual void ProblemDefinitionChanged(object sender, EventArgs eventArgs) {
-      Parameterize();
-    }
-
-    protected virtual void Parameterize() {
-      var definition = ProblemDefinitionParameter.Value;
-      if (definition == null) return;
-
-      IEncoding encoding = definition.Encoding;
-      SolutionCreator = encoding.SolutionCreator;
-
-      EncodingParameter.Value = encoding;
-      Maximization.Value = definition.IsMaximizationProblem;
-
-      Evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
-      Evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      foreach (var evalOp in Operators.OfType<ISingleObjectiveProgrammableProblemEvaluator>()) {
-        evalOp.EncodingParameter.ActualName = EncodingParameter.Name;
-        evalOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      }
-      foreach (var analyzeOp in Operators.OfType<ISingleObjectiveProgrammableProblemAnalyzer>()) {
-        analyzeOp.EncodingParameter.ActualName = EncodingParameter.Name;
-        analyzeOp.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-        analyzeOp.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-      }
-
-      ConfigureSingleEncodingOperators();
-      UpdateImprovementOperators();
-      UpdateMoveOperators();
-    }
-
-
-    protected virtual void ConfigureSingleEncodingOperators() {
-      foreach (var su in GetOperators().OfType<IRealVectorSwarmUpdater>()) {
-        su.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      }
-    }
-
-    protected virtual void UpdateImprovementOperators() {
-      if (!Operators.Any(x => x is SingleObjectiveImprover))
-        Operators.Add(new SingleObjectiveImprover());
-      foreach (var improver in Operators.OfType<SingleObjectiveImprover>()) {
-        improver.EncodingParameter.ActualName = EncodingParameter.Name;
-        improver.MaximizationParameter.ActualName = MaximizationParameter.Name;
-        improver.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-        improver.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-      }
-    }
-    protected virtual void UpdateMoveOperators() {
-      if (!Operators.Any(x => x is SingleObjectiveMoveGenerator))
-        Operators.Add(new SingleObjectiveMoveGenerator());
-      if (!Operators.Any(x => x is SingleObjectiveMoveEvaluator))
-        Operators.Add(new SingleObjectiveMoveEvaluator());
-      if (!Operators.Any(x => x is SingleObjectiveMoveMaker))
-        Operators.Add(new SingleObjectiveMoveMaker());
-
-      foreach (var generator in Operators.OfType<SingleObjectiveMoveGenerator>()) {
-        generator.EncodingParameter.ActualName = EncodingParameter.Name;
-        generator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      }
-      foreach (var evaluator in Operators.OfType<SingleObjectiveMoveEvaluator>()) {
-        evaluator.EncodingParameter.ActualName = EncodingParameter.Name;
-        evaluator.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-        evaluator.ProblemDefinitionParameter.ActualName = ProblemDefinitionParameter.Name;
-      }
-      foreach (var maker in Operators.OfType<SingleObjectiveMoveMaker>()) {
-        maker.EncodingParameter.ActualName = EncodingParameter.Name;
-        maker.MoveQualityParameter.ActualName = Operators.OfType<SingleObjectiveMoveEvaluator>().First().MoveQualityParameter.ActualName;
-        maker.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-      }
-    }
-  }
-}
