Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11560)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11561)
@@ -27,5 +27,7 @@
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.Programmable {
@@ -33,42 +35,71 @@
   [StorableClass]
   public class IntegerEncoding : Encoding<IIntegerVectorCreator> {
+    #region Encoding Parameters
     [Storable]
-    private IntValue length;
-    public IntValue Length {
-      get { return length; }
+    private IFixedValueParameter<IntValue> lengthParameter;
+    public IFixedValueParameter<IntValue> LengthParameter {
+      get { return lengthParameter; }
       set {
-        if (length == value) return;
-        length = value;
-        OnParameterConfigurationChanged();
+        if (value == null) throw new ArgumentNullException("Length parameter must not be null.");
+        if (lengthParameter == value) return;
+        lengthParameter = value;
+        OnLengthParameterChanged();
       }
     }
 
     [Storable]
-    private IntMatrix bounds;
+    private IValueParameter<IntMatrix> boundsParameter;
+    public IValueParameter<IntMatrix> BoundsParameter {
+      get { return boundsParameter; }
+      set {
+        if (value == null) throw new ArgumentNullException("Bounds parameter must not be null.");
+        if (boundsParameter == value) return;
+        boundsParameter = value;
+        OnBoundsParameterChanged();
+      }
+    }
+
+    public override IEnumerable<IValueParameter> Parameters {
+      get { return base.Parameters.Concat(new IValueParameter[] { LengthParameter, BoundsParameter }); }
+    }
+    #endregion
+
+    public int Length {
+      get { return LengthParameter.Value.Value; }
+      set { LengthParameter.Value.Value = value; }
+    }
     public IntMatrix Bounds {
-      get { return bounds; }
-      set {
-        if (bounds == value) return;
-        bounds = value;
-        OnParameterConfigurationChanged();
-      }
+      get { return BoundsParameter.Value; }
+      set { BoundsParameter.Value = value; }
     }
 
     [StorableConstructor]
     protected IntegerEncoding(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterParameterEvents();
+      DiscoverOperators();
+    }
+
     protected IntegerEncoding(IntegerEncoding original, Cloner cloner)
       : base(original, cloner) {
-      length = cloner.Clone(original.length);
-      bounds = cloner.Clone(original.bounds);
-    }
+      lengthParameter = cloner.Clone(original.lengthParameter);
+      boundsParameter = cloner.Clone(original.boundsParameter);
+      RegisterParameterEvents();
+      DiscoverOperators();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new IntegerEncoding(this, cloner); }
+
     public IntegerEncoding(string name, int length, int min, int max, int? step = null)
       : base(name) {
       if (min >= max) throw new ArgumentException("min must be less than max", "min");
       if (step.HasValue && step.Value <= 0) throw new ArgumentException("step must be greater than zero or null", "step");
-      this.length = new IntValue(length);
-      bounds = new IntMatrix(1, step.HasValue ? 3 : 2);
-      bounds[0, 0] = min;
-      bounds[0, 1] = max;
-      if (step.HasValue) bounds[0, 2] = step.Value;
+      Length = length;
+      Bounds = new IntMatrix(1, step.HasValue ? 3 : 2);
+      Bounds[0, 0] = min;
+      Bounds[0, 1] = max;
+      if (step.HasValue) Bounds[0, 2] = step.Value;
+      RegisterParameterEvents();
+      DiscoverOperators();
     }
     public IntegerEncoding(string name, int length, IList<int> min, IList<int> max, IList<int> step = null)
@@ -78,17 +109,143 @@
       if (step != null && min.Count != step.Count) throw new ArgumentException("step must be of the same length as min or null", "step");
       if (min.Zip(max, (mi, ma) => mi >= ma).Any(x => x)) throw new ArgumentException("min must be less than max in each dimension", "min");
-      this.length = new IntValue(length);
-      bounds = new IntMatrix(min.Count, step != null ? 3 : 2);
+      Length = length;
+      Bounds = new IntMatrix(min.Count, step != null ? 3 : 2);
       for (int i = 0; i < min.Count; i++) {
-        bounds[i, 0] = min[i];
-        bounds[i, 1] = max[i];
-        if (step != null) bounds[i, 2] = step[i];
-      }
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new IntegerEncoding(this, cloner);
-    }
-
+        Bounds[i, 0] = min[i];
+        Bounds[i, 1] = max[i];
+        if (step != null) Bounds[i, 2] = step[i];
+      }
+      RegisterParameterEvents();
+      DiscoverOperators();
+    }
+
+    private void OnLengthParameterChanged() {
+      RegisterLengthParameterEvents();
+      ConfigureOperators(Operators);
+    }
+    private void OnBoundsParameterChanged() {
+      RegisterBoundsParameterEvents();
+      ConfigureOperators(Operators);
+    }
+
+    private void RegisterParameterEvents() {
+      RegisterLengthParameterEvents();
+      RegisterBoundsParameterEvents();
+    }
+    private void RegisterLengthParameterEvents() {
+      LengthParameter.ValueChanged += (o, s) => ConfigureOperators(Operators);
+      LengthParameter.Value.ValueChanged += (o, s) => ConfigureOperators(Operators);
+    }
+    private void RegisterBoundsParameterEvents() {
+      BoundsParameter.ValueChanged += (o, s) => ConfigureOperators(Operators);
+      boundsParameter.Value.ToStringChanged += (o, s) => ConfigureOperators(Operators);
+    }
+
+
+    #region Operator Discovery
+    private static readonly IEnumerable<Type> encodingSpecificOperatorTypes;
+    static IntegerEncoding() {
+      encodingSpecificOperatorTypes = new List<Type>() {
+        typeof (IIntegerVectorOperator),
+        typeof (IIntegerVectorCreator),
+        typeof (IIntegerVectorCrossover),
+        typeof (IIntegerVectorManipulator),
+        typeof (IIntegerVectorStdDevStrategyParameterOperator),
+        typeof (IIntegerVectorMultiNeighborhoodShakingOperator),
+      };
+    }
+    private void DiscoverOperators() {
+      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, true, false, false);
+      var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
+      var newOperators = operators.Except(encodingOperators, new TypeEqualityComparer<IOperator>()).ToList();
+
+      ConfigureOperators(newOperators);
+      encodingOperators.AddRange(newOperators);
+    }
+    #endregion
+
+    public override void ConfigureOperators(IEnumerable<IOperator> operators) {
+      ConfigureBoundedOperators(Operators.OfType<IBoundedIntegerVectorOperator>());
+      ConfigureCreators(Operators.OfType<IIntegerVectorCreator>());
+      ConfigureCrossovers(Operators.OfType<IIntegerVectorCrossover>());
+      ConfigureManipulators(Operators.OfType<IIntegerVectorManipulator>());
+      ConfigureShakingOperators(Operators.OfType<IIntegerVectorMultiNeighborhoodShakingOperator>());
+      ConfigureStrategyVectorOperator(Operators.OfType<IIntegerVectorStdDevStrategyParameterOperator>());
+    }
+
+    #region Specific Operator Wiring
+    private void ConfigureBoundedOperators(IEnumerable<IBoundedIntegerVectorOperator> boundedOperators) {
+      foreach (var boundedOperator in boundedOperators) {
+        boundedOperator.BoundsParameter.ActualName = BoundsParameter.Name;
+      }
+    }
+
+    private void ConfigureCreators(IEnumerable<IIntegerVectorCreator> creators) {
+      foreach (var creator in creators) {
+        creator.IntegerVectorParameter.ActualName = Name;
+        creator.BoundsParameter.ActualName = BoundsParameter.Name;
+        creator.LengthParameter.ActualName = LengthParameter.Name;
+      }
+    }
+
+    private void ConfigureCrossovers(IEnumerable<IIntegerVectorCrossover> crossovers) {
+      foreach (var crossover in crossovers) {
+        crossover.ChildParameter.ActualName = Name;
+        crossover.ParentsParameter.ActualName = Name;
+      }
+    }
+
+    private void ConfigureManipulators(IEnumerable<IIntegerVectorManipulator> manipulators) {
+      foreach (var manipulator in manipulators) {
+        manipulator.IntegerVectorParameter.ActualName = Name;
+        manipulator.IntegerVectorParameter.Hidden = true;
+        var sm = manipulator as ISelfAdaptiveManipulator;
+        if (sm != null) {
+          var p = sm.StrategyParameterParameter as ILookupParameter;
+          if (p != null) {
+            p.ActualName = Name + "Strategy";
+          }
+        }
+      }
+    }
+
+    private void ConfigureShakingOperators(IEnumerable<IIntegerVectorMultiNeighborhoodShakingOperator> shakingOperators) {
+      foreach (var shakingOperator in shakingOperators) {
+        shakingOperator.IntegerVectorParameter.ActualName = Name;
+      }
+    }
+
+    private void ConfigureStrategyVectorOperator(IEnumerable<IIntegerVectorStdDevStrategyParameterOperator> strategyVectorOperators) {
+      var bounds = new DoubleMatrix(Bounds.Rows, Bounds.Columns);
+      for (var i = 0; i < bounds.Rows; i++) {
+        bounds[i, 1] = (int)Math.Ceiling(0.33 * (Bounds[i, 1] - Bounds[i, 0]));
+        bounds[i, 0] = 0;
+        if (bounds.Columns > 2) bounds[i, 2] = Bounds[i, 2];
+      }
+      foreach (var s in strategyVectorOperators) {
+        var c = s as IIntegerVectorStdDevStrategyParameterCreator;
+        if (c != null) {
+          c.BoundsParameter.Value = (DoubleMatrix)bounds.Clone();
+          c.LengthParameter.ActualName = Name;
+          c.StrategyParameterParameter.ActualName = Name + "Strategy";
+        }
+        var m = s as IIntegerVectorStdDevStrategyParameterManipulator;
+        if (m != null) {
+          m.BoundsParameter.Value = (DoubleMatrix)bounds.Clone();
+          m.StrategyParameterParameter.ActualName = Name + "Strategy";
+        }
+        var mm = s as StdDevStrategyVectorManipulator;
+        if (mm != null) {
+          mm.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Length));
+          mm.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(Length)));
+        }
+        var x = s as IIntegerVectorStdDevStrategyParameterCrossover;
+        if (x != null) {
+          x.ParentsParameter.ActualName = Name + "Strategy";
+          x.StrategyParameterParameter.ActualName = Name + "Strategy";
+        }
+      }
+    }
+    #endregion
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11560)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11561)
@@ -148,17 +148,17 @@
     static RealEncoding() {
       encodingSpecificOperatorTypes = new List<Type>() {
-  typeof (IRealVectorOperator),
-  typeof (IRealVectorCreator),
-  typeof (IRealVectorCrossover),
-  typeof (IRealVectorManipulator),
-  typeof (IRealVectorStdDevStrategyParameterOperator),
-  typeof (IRealVectorSwarmUpdater),
-  typeof (IRealVectorParticleCreator),
-  typeof (IRealVectorParticleUpdater),
-  typeof (IRealVectorMultiNeighborhoodShakingOperator),
-  typeof (IRealVectorBoundsChecker),
-  typeof (IRealVectorMoveOperator),
-  typeof (IRealVectorMoveGenerator)
-  };
+          typeof (IRealVectorOperator),
+          typeof (IRealVectorCreator),
+          typeof (IRealVectorCrossover),
+          typeof (IRealVectorManipulator),
+          typeof (IRealVectorStdDevStrategyParameterOperator),
+          typeof (IRealVectorSwarmUpdater),
+          typeof (IRealVectorParticleCreator),
+          typeof (IRealVectorParticleUpdater),
+          typeof (IRealVectorMultiNeighborhoodShakingOperator),
+          typeof (IRealVectorBoundsChecker),
+          typeof (IRealVectorMoveOperator),
+          typeof (IRealVectorMoveGenerator)
+      };
     }
     private void DiscoverOperators() {
@@ -223,5 +223,4 @@
           if (p != null) {
             p.ActualName = Name + "Strategy";
-            p.Hidden = true;
           }
         }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs	(revision 11560)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs	(revision 11561)
@@ -190,4 +190,11 @@
       }
       #endregion
+      #region Configure IntegerVector Creator
+      var intEnc = encoding as IntegerEncoding;
+      if (intEnc != null) {
+        DynamicEncodingParameters.AddRange(intEnc.Parameters);
+        return intEnc.DefaultSolutionCreator;
+      }
+      #endregion
       #region Configure MultiEncoding Creator
       var multiEncoding = encoding as MultiEncoding;
@@ -198,19 +205,4 @@
           creator.Operators.Add(ConfigureCreator(enc));
         }
-        return creator;
-      }
-      #endregion
-      #region Configure IntegerVector Creator
-      var intEnc = encoding as IntegerEncoding;
-      if (intEnc != null) {
-        var l = new ValueParameter<IntValue>(intEnc.Name + "Length", intEnc.Length);
-        var b = new ValueParameter<IntMatrix>(intEnc.Name + "Bounds", intEnc.Bounds);
-        DynamicEncodingParameters.Add(l);
-        DynamicEncodingParameters.Add(b);
-
-        var creator = new UniformRandomIntegerVectorCreator();
-        creator.IntegerVectorParameter.ActualName = intEnc.Name;
-        creator.LengthParameter.ActualName = l.Name;
-        creator.BoundsParameter.ActualName = b.Name;
         return creator;
       }
@@ -342,5 +334,5 @@
           .Union(ApplicationManager.Manager.GetInstances<IIntegerVectorStdDevStrategyParameterOperator>(), new TypeEqualityComparer<IIntegerVectorStdDevStrategyParameterOperator>())
           .ToList();
-        var problemSize = ((IntegerEncoding)encoding).Length.Value;
+        var problemSize = ((IntegerEncoding)encoding).Length;
         var b = ((IntegerEncoding)encoding).Bounds;
         var bounds = new DoubleMatrix(b.Rows, b.Columns);
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs	(revision 11560)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs	(revision 11561)
@@ -201,4 +201,11 @@
       }
       #endregion
+      #region Configure IntegerVector Creator
+      var intEnc = encoding as IntegerEncoding;
+      if (intEnc != null) {
+        DynamicEncodingParameters.AddRange(intEnc.Parameters);
+        return intEnc.DefaultSolutionCreator;
+      }
+      #endregion
       #region Configure MultiEncoding Creator
       var multiEncoding = encoding as MultiEncoding;
@@ -209,19 +216,4 @@
           creator.Operators.Add(ConfigureCreator(enc));
         }
-        return creator;
-      }
-      #endregion
-      #region Configure IntegerVector Creator
-      var intEnc = encoding as IntegerEncoding;
-      if (intEnc != null) {
-        var l = new ValueParameter<IntValue>(intEnc.Name + "Length", intEnc.Length);
-        var b = new ValueParameter<IntMatrix>(intEnc.Name + "Bounds", intEnc.Bounds);
-        DynamicEncodingParameters.Add(l);
-        DynamicEncodingParameters.Add(b);
-
-        var creator = new UniformRandomIntegerVectorCreator();
-        creator.IntegerVectorParameter.ActualName = intEnc.Name;
-        creator.LengthParameter.ActualName = l.Name;
-        creator.BoundsParameter.ActualName = b.Name;
         return creator;
       }
@@ -280,107 +272,12 @@
       #endregion
       #region Configure Operators for IntegerVectorEncoding
-      var intCreator = newCreator as IIntegerVectorCreator;
-      if (intCreator != null) {
-        var paramName = intCreator.IntegerVectorParameter.ActualName;
+      var intEncoding = encoding as IntegerEncoding;
+      if (intEncoding != null) {
         // do not replace an integer vector creator that was manually set
         if (!(SolutionCreator is IIntegerVectorCreator)
-          || ((IIntegerVectorCreator)SolutionCreator).IntegerVectorParameter.ActualName != intCreator.IntegerVectorParameter.ActualName) {
+          || ((IIntegerVectorCreator)SolutionCreator).IntegerVectorParameter.ActualName != intEncoding.Name) {
           Operators.Remove(SolutionCreator);
           SolutionCreator = newCreator;
-          Operators.Add(SolutionCreator);
-        }
-
-        #region Wire IntegerVector Crossovers
-        var crossovers = Operators.OfType<IIntegerVectorCrossover>()
-          .Union(ApplicationManager.Manager.GetInstances<IIntegerVectorCrossover>(), new TypeEqualityComparer<IIntegerVectorCrossover>())
-          .ToList();
-        foreach (var xo in crossovers) {
-          xo.ChildParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
-          xo.ChildParameter.Hidden = true;
-          xo.ParentsParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
-          xo.ParentsParameter.Hidden = true;
-          var bx = xo as IBoundedIntegerVectorOperator;
-          if (bx != null) {
-            bx.BoundsParameter.ActualName = intCreator.BoundsParameter.ActualName;
-            bx.BoundsParameter.Hidden = true;
-          }
-        }
-        Operators.AddRange(crossovers.Except(Operators.OfType<IIntegerVectorCrossover>()));
-        #endregion
-        #region Wire IntegerVector Manipulators
-        var manipulators = Operators.OfType<IIntegerVectorManipulator>()
-          .Union(ApplicationManager.Manager.GetInstances<IIntegerVectorManipulator>(), new TypeEqualityComparer<IIntegerVectorManipulator>())
-          .ToList();
-        foreach (var m in manipulators) {
-          m.IntegerVectorParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
-          m.IntegerVectorParameter.Hidden = true;
-          var sm = m as ISelfAdaptiveManipulator;
-          if (sm != null) {
-            var p = sm.StrategyParameterParameter as ILookupParameter;
-            if (p != null) {
-              p.ActualName = paramName + "Strategy";
-              p.Hidden = true;
-            }
-          }
-          var bm = m as IBoundedIntegerVectorOperator;
-          if (bm != null) {
-            bm.BoundsParameter.ActualName = intCreator.BoundsParameter.ActualName;
-            bm.BoundsParameter.Hidden = true;
-          }
-        }
-        Operators.AddRange(manipulators.Except(Operators.OfType<IIntegerVectorManipulator>()));
-        #region Wire IntegerVector StrategyParameters for SelfAdaptiveManipulators
-        var strategyOperators = Operators.OfType<IIntegerVectorStdDevStrategyParameterOperator>()
-          .Union(ApplicationManager.Manager.GetInstances<IIntegerVectorStdDevStrategyParameterOperator>(), new TypeEqualityComparer<IIntegerVectorStdDevStrategyParameterOperator>())
-          .ToList();
-        var problemSize = ((IntegerEncoding)encoding).Length.Value;
-        var b = ((IntegerEncoding)encoding).Bounds;
-        var bounds = new DoubleMatrix(b.Rows, b.Columns);
-        for (var i = 0; i < bounds.Rows; i++) {
-          bounds[i, 1] = (int)Math.Ceiling(0.33 * (b[i, 1] - b[i, 0]));
-          bounds[i, 0] = 0;
-          if (bounds.Columns > 2) bounds[i, 2] = b[i, 2];
-        }
-        foreach (var s in strategyOperators) {
-          var c = s as IIntegerVectorStdDevStrategyParameterCreator;
-          if (c != null) {
-            c.BoundsParameter.Value = (DoubleMatrix)bounds.Clone();
-            c.LengthParameter.ActualName = intCreator.LengthParameter.ActualName;
-            c.StrategyParameterParameter.ActualName = paramName + "Strategy";
-          }
-          var m = s as IIntegerVectorStdDevStrategyParameterManipulator;
-          if (m != null) {
-            m.BoundsParameter.Value = (DoubleMatrix)bounds.Clone();
-            m.StrategyParameterParameter.ActualName = paramName + "Strategy";
-          }
-          var mm = s as Encodings.IntegerVectorEncoding.StdDevStrategyVectorManipulator;
-          if (mm != null) {
-            mm.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * problemSize));
-            mm.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(problemSize)));
-          }
-          var x = s as IIntegerVectorStdDevStrategyParameterCrossover;
-          if (x != null) {
-            x.ParentsParameter.ActualName = paramName + "Strategy";
-            x.StrategyParameterParameter.ActualName = paramName + "Strategy";
-          }
-        }
-        Operators.AddRange(strategyOperators.Except(Operators.OfType<IIntegerVectorStdDevStrategyParameterOperator>()));
-        #endregion
-        #endregion
-        #region Wire IntegerVector ShakingOperators
-        var shakingOperators = Operators.OfType<IIntegerVectorMultiNeighborhoodShakingOperator>()
-          .Union(ApplicationManager.Manager.GetInstances<IIntegerVectorMultiNeighborhoodShakingOperator>(), new TypeEqualityComparer<IIntegerVectorMultiNeighborhoodShakingOperator>())
-          .ToList();
-        foreach (var so in shakingOperators) {
-          so.IntegerVectorParameter.ActualName = paramName;
-          so.IntegerVectorParameter.Hidden = true;
-        }
-        Operators.AddRange(shakingOperators.Except(Operators.OfType<IIntegerVectorMultiNeighborhoodShakingOperator>()));
-        #endregion
-      } else {
-        Operators.RemoveAll(x => x is IIntegerVectorCrossover
-          || x is IIntegerVectorManipulator
-          || x is IIntegerVectorStdDevStrategyParameterOperator
-          || x is IIntegerVectorMultiNeighborhoodShakingOperator);
+        }
       }
       #endregion
