Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPR.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPR.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPR.cs	(revision 14450)
@@ -24,10 +24,9 @@
 using System.Linq;
 using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
-using HeuristicLab.Optimization.SolutionModel;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
@@ -38,5 +37,5 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 999)]
-  public class BinaryMemPR : MemPRAlgorithm<BinaryVector, BinaryMemPRContext, BinarySingleSolutionMemPRContext> {
+  public class BinaryMemPR : MemPRAlgorithm<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector, BinaryMemPRPopulationContext, BinaryMemPRSolutionContext> {
     private const double UncommonBitSubsetMutationProbabilityMagicConst = 0.05;
     
@@ -45,17 +44,9 @@
     protected BinaryMemPR(BinaryMemPR original, Cloner cloner) : base(original, cloner) { }
     public BinaryMemPR() {
-      foreach (var trainer in ApplicationManager.Manager.GetInstances<IBinarySolutionModelTrainer<BinaryMemPRContext>>())
+      foreach (var trainer in ApplicationManager.Manager.GetInstances<ISolutionModelTrainer<BinaryMemPRPopulationContext>>())
         SolutionModelTrainerParameter.ValidValues.Add(trainer);
       
-      foreach (var localSearch in ApplicationManager.Manager.GetInstances<IBinaryLocalSearch<BinarySingleSolutionMemPRContext>>()) {
-        // only use local search operators that can deal with a restricted solution space
-        var lsType = localSearch.GetType();
-        var genTypeDef = lsType.GetGenericTypeDefinition();
-        // TODO: By convention, context type must be put last
-        // TODO: Fails with non-generic types
-        if (genTypeDef.GetGenericArguments().Last().GetGenericParameterConstraints().Any(x => typeof(IBinarySolutionSubspaceContext).IsAssignableFrom(x))) {
-          localSearch.EvaluateFunc = EvaluateFunc;
-          LocalSearchParameter.ValidValues.Add(localSearch);
-        }
+      foreach (var localSearch in ApplicationManager.Manager.GetInstances<ILocalSearch<BinaryMemPRSolutionContext>>()) {
+        LocalSearchParameter.ValidValues.Add(localSearch);
       }
     }
@@ -63,10 +54,4 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       return new BinaryMemPR(this, cloner);
-    }
-
-    protected double EvaluateFunc(BinaryVector solution) {
-      var scope = ToScope(solution);
-      Evaluate(scope, CancellationToken.None);
-      return scope.Fitness;
     }
 
@@ -98,5 +83,5 @@
     }
 
-    protected override ISolutionSubspace CalculateSubspace(IEnumerable<BinaryVector> solutions, bool inverse = false) {
+    protected override ISolutionSubspace<BinaryVector> CalculateSubspace(IEnumerable<BinaryVector> solutions, bool inverse = false) {
       var pop = solutions.ToList();
       var N = pop[0].Length;
@@ -112,11 +97,5 @@
     }
 
-    protected override ISingleObjectiveSolutionScope<BinaryVector> Create(CancellationToken token) {
-      var child = ToScope(null);
-      RunOperator(Problem.SolutionCreator, child, token);
-      return child;
-    }
-
-    protected override void TabuWalk(ISingleObjectiveSolutionScope<BinaryVector> scope, int steps, CancellationToken token, ISolutionSubspace subspace = null) {
+    protected override void TabuWalk(ISingleObjectiveSolutionScope<BinaryVector> scope, int steps, CancellationToken token, ISolutionSubspace<BinaryVector> subspace = null) {
       var subset = subspace != null ? ((BinarySolutionSubspace)subspace).Subspace : null;
       if (double.IsNaN(scope.Fitness)) Evaluate(scope, token);
@@ -183,9 +162,8 @@
       var lastbp = 0;
       for (var i = 0; i < code.Length; i++) {
-        if (code[i] == p2Code[i]) continue; // common bit
         if (bp % 2 == 1) {
           code[i] = p2Code[i];
         }
-        if (Context.Random.Next(code.Length) < i - lastbp) {
+        if (Context.Random.Next(code.Length) < i - lastbp + 1) {
           bp = (bp + 1) % 2;
           lastbp = i;
@@ -195,5 +173,5 @@
     }
 
-    protected override void Mutate(ISingleObjectiveSolutionScope<BinaryVector> offspring, CancellationToken token, ISolutionSubspace subspace = null) {
+    protected override void Mutate(ISingleObjectiveSolutionScope<BinaryVector> offspring, CancellationToken token, ISolutionSubspace<BinaryVector> subspace = null) {
       var subset = subspace != null ? ((BinarySolutionSubspace)subspace).Subspace : null;
       offspring.Fitness = double.NaN;
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPRContext.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPRContext.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPRContext.cs	(revision 14450)
@@ -20,4 +20,5 @@
 #endregion
 
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -28,27 +29,27 @@
 
 namespace HeuristicLab.Algorithms.MemPR.Binary {
-  [Item("BinaryMemPRContext", "MemPR context for binary encoded problems.")]
+  [Item("MemPR Population Context (binary)", "MemPR population context for binary encoded problems.")]
   [StorableClass]
-  public sealed class BinaryMemPRContext : MemPRContext<BinaryVector, BinaryMemPRContext, BinarySingleSolutionMemPRContext> {
+  public sealed class BinaryMemPRPopulationContext : MemPRPopulationContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector, BinaryMemPRPopulationContext, BinaryMemPRSolutionContext> {
 
     [StorableConstructor]
-    private BinaryMemPRContext(bool deserializing) : base(deserializing) { }
-    private BinaryMemPRContext(BinaryMemPRContext original, Cloner cloner)
+    private BinaryMemPRPopulationContext(bool deserializing) : base(deserializing) { }
+    private BinaryMemPRPopulationContext(BinaryMemPRPopulationContext original, Cloner cloner)
       : base(original, cloner) { }
-    public BinaryMemPRContext() : base("BinaryMemPRContext") { }
-    public BinaryMemPRContext(string name) : base(name) { }
+    public BinaryMemPRPopulationContext() : base("BinaryMemPRPopulationContext") { }
+    public BinaryMemPRPopulationContext(string name) : base(name) { }
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new BinaryMemPRContext(this, cloner);
+      return new BinaryMemPRPopulationContext(this, cloner);
     }
 
-    public override BinarySingleSolutionMemPRContext CreateSingleSolutionContext(ISingleObjectiveSolutionScope<BinaryVector> solution) {
-      return new BinarySingleSolutionMemPRContext(this, solution);
+    public override BinaryMemPRSolutionContext CreateSingleSolutionContext(ISingleObjectiveSolutionScope<BinaryVector> solution) {
+      return new BinaryMemPRSolutionContext(this, solution);
     }
   }
 
-  [Item("BinarySingleSolutionMemPRContext", "Single solution MemPR context for binary encoded problems.")]
+  [Item("MemPR Solution Context (binary)", "MemPR solution context for binary encoded problems.")]
   [StorableClass]
-  public sealed class BinarySingleSolutionMemPRContext : SingleSolutionMemPRContext<BinaryVector, BinaryMemPRContext, BinarySingleSolutionMemPRContext>, IBinarySolutionSubspaceContext {
+  public sealed class BinaryMemPRSolutionContext : MemPRSolutionContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector, BinaryMemPRPopulationContext, BinaryMemPRSolutionContext>, IBinaryVectorSubspaceContext {
 
     [Storable]
@@ -57,15 +58,15 @@
       get { return subspace.Value; }
     }
-    ISolutionSubspace ISolutionSubspaceContext.Subspace {
+    ISolutionSubspace<BinaryVector> ISolutionSubspaceContext<BinaryVector>.Subspace {
       get { return Subspace; }
     }
 
     [StorableConstructor]
-    private BinarySingleSolutionMemPRContext(bool deserializing) : base(deserializing) { }
-    private BinarySingleSolutionMemPRContext(BinarySingleSolutionMemPRContext original, Cloner cloner)
+    private BinaryMemPRSolutionContext(bool deserializing) : base(deserializing) { }
+    private BinaryMemPRSolutionContext(BinaryMemPRSolutionContext original, Cloner cloner)
       : base(original, cloner) {
 
     }
-    public BinarySingleSolutionMemPRContext(BinaryMemPRContext baseContext, ISingleObjectiveSolutionScope<BinaryVector> solution)
+    public BinaryMemPRSolutionContext(BinaryMemPRPopulationContext baseContext, ISingleObjectiveSolutionScope<BinaryVector> solution)
       : base(baseContext, solution) {
 
@@ -74,5 +75,5 @@
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new BinarySingleSolutionMemPRContext(this, cloner);
+      return new BinaryMemPRSolutionContext(this, cloner);
     }
   }
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinarySolutionSubspace.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinarySolutionSubspace.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinarySolutionSubspace.cs	(revision 14450)
@@ -20,7 +20,8 @@
 #endregion
 
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -28,5 +29,5 @@
   [Item("Solution subspace (binary)", "")]
   [StorableClass]
-  public sealed class BinarySolutionSubspace : Item, ISolutionSubspace {
+  public sealed class BinarySolutionSubspace : Item, ISolutionSubspace<BinaryVector> {
 
     [Storable]
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflip.cs	(revision 14450)
@@ -20,22 +20,26 @@
 #endregion
 
+using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
+using HeuristicLab.Algorithms.MemPR.Util;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.Binary.LocalSearch;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local Search (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.LocalSearch {
+  [Item("Exhaustive Bitflip Local Search (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class ExhaustiveBitflip<TContext> : ExhaustiveBitflipOperator, IBinaryLocalSearch<TContext> 
-      where TContext : ISingleObjectiveSolutionContext<BinaryVector>, IStochasticContext, IMaximizationContext,
-                       IEvaluatedSolutionsContext, IIterationsManipulationContext {
+  public class ExhaustiveBitflip<TContext> : NamedItem, ILocalSearch<TContext> where TContext : ISingleSolutionHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector> {
     
     [StorableConstructor]
     protected ExhaustiveBitflip(bool deserializing) : base(deserializing) { }
     protected ExhaustiveBitflip(ExhaustiveBitflip<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflip() { }
+    public ExhaustiveBitflip() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -44,9 +48,10 @@
 
     public void Optimize(TContext context) {
+      var evalWrapper = new EvaluationWrapper<BinaryVector>(context.Problem, context.Solution);
       var quality = context.Solution.Fitness;
       try {
-        var result = Heuristic.ExhaustiveBitFlipSearch(context.Random, context.Solution.Solution, ref quality,
-          context.Maximization, EvaluateFunc, CancellationToken);
-        context.EvaluatedSolutions = result.Item1;
+        var result = ExhaustiveBitflip.Optimize(context.Random, context.Solution.Solution, ref quality,
+          context.Problem.Maximization, evalWrapper.Evaluate, CancellationToken.None);
+        context.IncrementEvaluatedSolutions(result.Item1);
         context.Iterations = result.Item2;
       } finally {
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipOperator.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipOperator.cs	(revision 14429)
+++ 	(revision )
@@ -1,89 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local Search Operator (binary)", "")]
-  [StorableClass]
-  public class ExhaustiveBitflipOperator : SingleSuccessorOperator, ILocalSearch<BinaryVector>, ISingleObjectiveOperator, IStochasticOperator {
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-    
-    public ILookupParameter<BinaryVector> SolutionParameter {
-      get { return (ILookupParameter<BinaryVector>)Parameters["Solution"]; }
-    }
-
-    public ILookupParameter<BoolValue> MaximizationParameter {
-      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
-    }
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-
-    public ILookupParameter<BoolArray> SubspaceParameter {
-      get { return (ILookupParameter<BoolArray>)Parameters["Subspace"]; }
-    }
-
-    public Func<BinaryVector, double> EvaluateFunc { get; set; }
-
-    [StorableConstructor]
-    protected ExhaustiveBitflipOperator(bool deserializing) : base(deserializing) { }
-    protected ExhaustiveBitflipOperator(ExhaustiveBitflipOperator original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflipOperator() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<BinaryVector>("Solution", "The solution that is to be optimized"));
-      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether the solution's quality should be maximized or minimized."));
-      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
-      Parameters.Add(new LookupParameter<BoolArray>("Subspace", "Whether the local search should be confined to a sub-space of the solution space (indicated by true in this vector)."));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ExhaustiveBitflipOperator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      var quality = QualityParameter.ActualValue.Value;
-      var subspace = SubspaceParameter.ActualValue != null ? SubspaceParameter.ActualValue.ToArray() : null;
-      try {
-        Heuristic.ExhaustiveBitFlipSearch(RandomParameter.ActualValue,
-          SolutionParameter.ActualValue, ref quality, MaximizationParameter.ActualValue.Value,
-          EvaluateFunc, CancellationToken, subspace);
-      } finally {
-        QualityParameter.ActualValue.Value = quality;
-      }
-      return base.Apply();
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/ExhaustiveBitflipSubspace.cs	(revision 14450)
@@ -20,22 +20,26 @@
 #endregion
 
+using System.Threading;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.Binary.LocalSearch;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.LocalSearch;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  [Item("Exhaustive Bitflip Local (Subspace) Search (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.LocalSearch {
+  [Item("Exhaustive Bitflip Local (Subspace) Search (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class ExhaustiveBitflipSubspace<TContext> : ExhaustiveBitflipOperator, IBinaryLocalSearch<TContext>
-      where TContext : ISingleObjectiveSolutionContext<BinaryVector>, IStochasticContext, IMaximizationContext,
-                       IEvaluatedSolutionsContext, IIterationsManipulationContext, IBinarySolutionSubspaceContext {
+  public class ExhaustiveBitflipSubspace<TContext> : NamedItem, ILocalSearch<TContext>
+      where TContext : ISingleSolutionHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector>, IBinaryVectorSubspaceContext {
 
     [StorableConstructor]
     protected ExhaustiveBitflipSubspace(bool deserializing) : base(deserializing) { }
     protected ExhaustiveBitflipSubspace(ExhaustiveBitflipSubspace<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public ExhaustiveBitflipSubspace() { }
+    public ExhaustiveBitflipSubspace() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -44,9 +48,10 @@
 
     public void Optimize(TContext context) {
+      var evalWrapper = new EvaluationWrapper(context);
       var quality = context.Solution.Fitness;
       try {
-        var result = Heuristic.ExhaustiveBitFlipSearch(context.Random, context.Solution.Solution, ref quality,
-          context.Maximization, EvaluateFunc, CancellationToken, context.Subspace != null ? context.Subspace.Subspace : null);
-        context.EvaluatedSolutions = result.Item1;
+        var result = ExhaustiveBitflip.Optimize(context.Random, context.Solution.Solution, ref quality,
+          context.Problem.Maximization, evalWrapper.Evaluate, CancellationToken.None, context.Subspace.Subspace);
+        context.IncrementEvaluatedSolutions(result.Item1);
         context.Iterations = result.Item2;
       } finally {
@@ -54,4 +59,24 @@
       }
     }
+
+    public sealed class EvaluationWrapper {
+      private readonly TContext context;
+      private readonly ISingleObjectiveSolutionScope<BinaryVector> scope;
+      private readonly SingleEncodingIndividual individual;
+
+      public EvaluationWrapper(TContext context) {
+        this.context = context;
+        // don't clone the solution, which is thrown away again
+        var cloner = new Cloner();
+        cloner.RegisterClonedObject(context.Solution.Solution, null);
+        this.scope = (ISingleObjectiveSolutionScope<BinaryVector>)context.Solution.Clone(cloner);
+        this.individual = new SingleEncodingIndividual(context.Problem.Encoding, this.scope);
+      }
+
+      public double Evaluate(BinaryVector b) {
+        scope.Solution = b;
+        return context.Problem.Evaluate(individual, null);
+      }
+    }
   }
 }
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/Heuristic.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/Heuristic.cs	(revision 14429)
+++ 	(revision )
@@ -1,71 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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.Threading;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Encodings.Binary.LocalSearch {
-  public static class Heuristic {
-    private static bool IsBetter(bool maximization, double a, double b) {
-      return maximization && a > b
-        || !maximization && a < b;
-    }
-
-    public static Tuple<int, int> ExhaustiveBitFlipSearch(IRandom random, BinaryVector solution, ref double quality, bool maximization, Func<BinaryVector, double> evalFunc, CancellationToken token, bool[] subspace = null) {
-      if (double.IsNaN(quality)) quality = evalFunc(solution);
-      var improved = false;
-      var order = Enumerable.Range(0, solution.Length).Shuffle(random).ToArray();
-      var lastImp = -1;
-      var steps = 0;
-      var evaluations = 0;
-      do {
-        improved = false;
-        for (var i = 0; i < solution.Length; i++) {
-          // in case we didn't make an improvement this round and arrived at the index of the last improvement
-          // break means we don't need to try the remaining moves again as they have brought no improvement
-          if (!improved && lastImp == i) break;
-          var idx = order[i];
-          if (subspace != null && !subspace[idx]) continue;
-          // bitflip the solution
-          solution[idx] = !solution[idx];
-          var after = evalFunc(solution);
-          evaluations++;
-          if (IsBetter(maximization, after, quality)) {
-            steps++;
-            quality = after;
-            lastImp = i;
-            improved = true;
-          } else {
-            // undo the bitflip in case no improvement was made
-            solution[idx] = !solution[idx];
-          }
-          token.ThrowIfCancellationRequested();
-        }
-      } while (improved);
-      
-      return Tuple.Create(evaluations, steps);
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs	(revision 14450)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/LocalSearch/StaticAPI/ExhaustiveBitflip.cs	(revision 14450)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Threading;
+using HeuristicLab.Algorithms.MemPR.Util;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Encodings.Binary.LocalSearch {
+  public static class ExhaustiveBitflip {
+    public static Tuple<int, int> Optimize(IRandom random, BinaryVector solution, ref double quality, bool maximization, Func<BinaryVector, double> evalFunc, CancellationToken token, bool[] subspace = null) {
+      if (double.IsNaN(quality)) quality = evalFunc(solution);
+      var improved = false;
+      var order = Enumerable.Range(0, solution.Length).Shuffle(random).ToArray();
+      var lastImp = -1;
+      var steps = 0;
+      var evaluations = 0;
+      do {
+        improved = false;
+        for (var i = 0; i < solution.Length; i++) {
+          // in case we didn't make an improvement this round and arrived at the index of the last improvement
+          // break means we don't need to try the remaining moves again as they have brought no improvement
+          if (!improved && lastImp == i) break;
+          var idx = order[i];
+          if (subspace != null && !subspace[idx]) continue;
+          // bitflip the solution
+          solution[idx] = !solution[idx];
+          var after = evalFunc(solution);
+          evaluations++;
+          if (FitnessComparer.IsBetter(maximization, after, quality)) {
+            steps++;
+            quality = after;
+            lastImp = i;
+            improved = true;
+          } else {
+            // undo the bitflip in case no improvement was made
+            solution[idx] = !solution[idx];
+          }
+          token.ThrowIfCancellationRequested();
+        }
+      } while (improved);
+
+      return Tuple.Create(evaluations, steps);
+    }
+  }
+}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/BiasedModelTrainer.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/BiasedModelTrainer.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/BiasedModelTrainer.cs	(revision 14450)
@@ -21,21 +21,35 @@
 
 using System.Linq;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.SolutionModel;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
-  [Item("Biased Univariate Model Trainer (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.SolutionModel.Univariate {
+  [Item("Biased Univariate Model Trainer (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class BiasedModelTrainer<TContext> : BiasedModelTrainerOperator, IBinarySolutionModelTrainer<TContext>, IBinaryVectorOperator
-    where TContext : ISingleObjectivePopulationContext<BinaryVector>, ISolutionModelContext<BinaryVector>, IStochasticContext, IMaximizationContext {
+  public class BiasedModelTrainer<TContext> : ParameterizedNamedItem, ISolutionModelTrainer<TContext>
+    where TContext : IPopulationBasedHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector>, ISolutionModelContext<BinaryVector> {
     
+    [Storable]
+    private IValueParameter<EnumValue<ModelBiasOptions>> modelBiasParameter;
+    public ModelBiasOptions ModelBias {
+      get { return modelBiasParameter.Value.Value; }
+      set { modelBiasParameter.Value.Value = value; }
+    }
+
     [StorableConstructor]
     protected BiasedModelTrainer(bool deserializing) : base(deserializing) { }
-    protected BiasedModelTrainer(BiasedModelTrainer<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public BiasedModelTrainer() { }
+    protected BiasedModelTrainer(BiasedModelTrainer<TContext> original, Cloner cloner)
+      : base(original, cloner) {
+      modelBiasParameter = cloner.Clone(original.modelBiasParameter);
+    }
+    public BiasedModelTrainer() {
+      Parameters.Add(modelBiasParameter = new ValueParameter<EnumValue<ModelBiasOptions>>("Model Bias", "What kind of bias towards better individuals is chosen."));
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -44,5 +58,5 @@
 
     public void TrainModel(TContext context) {
-      context.Model = Trainer.TrainBiased(ModelBias, context.Random, context.Maximization, context.Population.Select(x => x.Solution), context.Population.Select(x => x.Fitness));
+      context.Model = Trainer.TrainBiased(ModelBias, context.Random, context.Problem.Maximization, context.Population.Select(x => x.Solution), context.Population.Select(x => x.Fitness));
     }
   }
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/BiasedModelTrainerOperator.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/BiasedModelTrainerOperator.cs	(revision 14429)
+++ 	(revision )
@@ -1,94 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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.Data;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization.SolutionModel;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
-  [Item("Biased Univariate Model Trainer Operator (binary)", "")]
-  [StorableClass]
-  public class BiasedModelTrainerOperator : SingleSuccessorOperator, ISolutionModelTrainer<BinaryVector> {
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<BoolValue> MaximizationParameter {
-      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
-    }
-
-    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
-      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-
-    public IScopeTreeLookupParameter<BinaryVector> SolutionParameter {
-      get { return (IScopeTreeLookupParameter<BinaryVector>)Parameters["Solution"]; }
-    }
-
-    public ILookupParameter<ISolutionModel<BinaryVector>> SamplingModelParameter {
-      get { return (ILookupParameter<ISolutionModel<BinaryVector>>)Parameters["SamplingModel"]; }
-    }
-
-    private IValueParameter<EnumValue<ModelBiasOptions>> ModelBiasParameter {
-      get { return (IValueParameter<EnumValue<ModelBiasOptions>>)Parameters["ModelBias"]; }
-    }
-
-    public ModelBiasOptions ModelBias {
-      get { return ModelBiasParameter.Value.Value; }
-      set { ModelBiasParameter.Value.Value = value; }
-    }
-
-    [StorableConstructor]
-    protected BiasedModelTrainerOperator(bool deserializing) : base(deserializing) { }
-    protected BiasedModelTrainerOperator(BiasedModelTrainerOperator original, Cloner cloner) : base(original, cloner) { }
-    public BiasedModelTrainerOperator() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "Whether to maximize fitness or minimize it (only used when bias is not 'None')."));
-      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The solution quality (only used when bias is not 'None')."));
-      Parameters.Add(new ScopeTreeLookupParameter<BinaryVector>("Solution", "The binary vectors that are used to create the sampling model."));
-      Parameters.Add(new LookupParameter<ISolutionModel<BinaryVector>>("SamplingModel", "The model that can be used to sample new solutions."));
-      Parameters.Add(new ValueParameter<EnumValue<ModelBiasOptions>>("ModelBias",
-@"What kind of bias should be used when creating the model, e.g. 
-no bias (all solutions are considered equally), rank-based bias 
-(higher ranked solutions contribute more), or fitness-based bias 
-(fitness proportional bias)", new EnumValue<ModelBiasOptions>(ModelBiasOptions.Rank)));
-
-      SolutionParameter.ActualName = "BinaryVector";
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new BiasedModelTrainerOperator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      SamplingModelParameter.ActualValue = Trainer.TrainBiased(ModelBias, RandomParameter.ActualValue,
-        MaximizationParameter.ActualValue.Value, SolutionParameter.ActualValue, QualityParameter.ActualValue.Select(x => x.Value));
-      return base.Apply();
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/StaticAPI/Trainer.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/StaticAPI/Trainer.cs	(revision 14450)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/StaticAPI/Trainer.cs	(revision 14450)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Algorithms.MemPR.Interfaces;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+
+namespace HeuristicLab.Algorithms.MemPR.Binary.SolutionModel.Univariate {
+  public enum ModelBiasOptions { Rank, Fitness }
+
+  public static class Trainer {
+    public static ISolutionModel<BinaryVector> TrainBiased(ModelBiasOptions modelBias, IRandom random, bool maximization, IEnumerable<BinaryVector> population, IEnumerable<double> qualities) {
+      switch (modelBias) {
+        case ModelBiasOptions.Rank:
+          return UnivariateModel.CreateWithRankBias(random, maximization, population, qualities);
+        case ModelBiasOptions.Fitness:
+          return UnivariateModel.CreateWithFitnessBias(random, maximization, population, qualities);
+        default:
+          throw new InvalidOperationException(string.Format("Unknown bias option {0}", modelBias));
+      }
+    }
+
+    public static ISolutionModel<BinaryVector> TrainUnbiased(IRandom random, IEnumerable<BinaryVector> population) {
+      return UnivariateModel.CreateWithoutBias(random, population);
+    }
+  }
+}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/Trainer.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/Trainer.cs	(revision 14429)
+++ 	(revision )
@@ -1,47 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Optimization.SolutionModel;
-
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
-  public enum ModelBiasOptions { Rank, Fitness }
-
-  public static class Trainer {
-    public static ISolutionModel<BinaryVector> TrainBiased(ModelBiasOptions modelBias, IRandom random, bool maximization, IEnumerable<BinaryVector> population, IEnumerable<double> qualities) {
-      switch (modelBias) {
-        case ModelBiasOptions.Rank:
-          return UnivariateModel.CreateWithRankBias(random, maximization, population, qualities);
-        case ModelBiasOptions.Fitness:
-          return UnivariateModel.CreateWithFitnessBias(random, maximization, population, qualities);
-        default:
-          throw new InvalidOperationException(string.Format("Unknown bias option {0}", modelBias));
-      }
-    }
-
-    public static ISolutionModel<BinaryVector> TrainUnbiased(IRandom random, IEnumerable<BinaryVector> population) {
-      return UnivariateModel.CreateWithoutBias(random, population);
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnbiasedModelTrainer.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnbiasedModelTrainer.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnbiasedModelTrainer.cs	(revision 14450)
@@ -21,28 +21,31 @@
 
 using System.Linq;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.SolutionModel;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
-  [Item("Uniased Univariate Model Trainer (binary)", "")]
+namespace HeuristicLab.Algorithms.MemPR.Binary.SolutionModel.Univariate {
+  [Item("Unbiased Univariate Model Trainer (binary)", "", ExcludeGenericTypeInfo = true)]
   [StorableClass]
-  public class UnbiasedModelTrainer<TContext> : UnbiasedModelTrainerOperator, IBinarySolutionModelTrainer<TContext>
-    where TContext : ISolutionModelContext<BinaryVector>, IPopulationContext<BinaryVector>, IStochasticContext {
+  public class UniasedModelTrainer<TContext> : NamedItem, ISolutionModelTrainer<TContext>
+    where TContext : IPopulationBasedHeuristicAlgorithmContext<SingleObjectiveBasicProblem<BinaryVectorEncoding>, BinaryVector>, ISolutionModelContext<BinaryVector> {
     
     [StorableConstructor]
-    protected UnbiasedModelTrainer(bool deserializing) : base(deserializing) { }
-    protected UnbiasedModelTrainer(UnbiasedModelTrainer<TContext> original, Cloner cloner) : base(original, cloner) { }
-    public UnbiasedModelTrainer() { }
+    protected UniasedModelTrainer(bool deserializing) : base(deserializing) { }
+    protected UniasedModelTrainer(UniasedModelTrainer<TContext> original, Cloner cloner) : base(original, cloner) { }
+    public UniasedModelTrainer() {
+      Name = ItemName;
+      Description = ItemDescription;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new UnbiasedModelTrainer<TContext>(this, cloner);
+      return new UniasedModelTrainer<TContext>(this, cloner);
     }
 
     public void TrainModel(TContext context) {
-      context.Model = UnivariateModel.CreateWithoutBias(context.Random, context.Population.Select(x => x.Solution));
+      context.Model = Trainer.TrainUnbiased(context.Random, context.Population.Select(x => x.Solution));
     }
   }
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnbiasedModelTrainerOperator.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnbiasedModelTrainerOperator.cs	(revision 14429)
+++ 	(revision )
@@ -1,67 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 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.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization.SolutionModel;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
-  [Item("Uniased Univariate Model Trainer Operator (binary)", "")]
-  [StorableClass]
-  public class UnbiasedModelTrainerOperator : SingleSuccessorOperator, ISolutionModelTrainer<BinaryVector> {
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-    
-    public IScopeTreeLookupParameter<BinaryVector> SolutionParameter {
-      get { return (IScopeTreeLookupParameter<BinaryVector>)Parameters["Solution"]; }
-    }
-
-    public ILookupParameter<ISolutionModel<BinaryVector>> SamplingModelParameter {
-      get { return (ILookupParameter<ISolutionModel<BinaryVector>>)Parameters["SamplingModel"]; }
-    }
-
-    [StorableConstructor]
-    protected UnbiasedModelTrainerOperator(bool deserializing) : base(deserializing) { }
-    protected UnbiasedModelTrainerOperator(UnbiasedModelTrainerOperator original, Cloner cloner) : base(original, cloner) { }
-    public UnbiasedModelTrainerOperator() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new ScopeTreeLookupParameter<BinaryVector>("Solution", "The binary vectors that are used to create the sampling model."));
-      Parameters.Add(new LookupParameter<ISolutionModel<BinaryVector>>("SamplingModel", "The model that can be used to sample new solutions."));
-
-      SolutionParameter.ActualName = "BinaryVector";
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new UnbiasedModelTrainerOperator(this, cloner);
-    }
-    
-    public override IOperation Apply() {
-      SamplingModelParameter.ActualValue = UnivariateModel.CreateWithoutBias(RandomParameter.ActualValue, SolutionParameter.ActualValue);
-      return base.Apply();
-    }
-  }
-}
Index: branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnivariateSolutionModel.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnivariateSolutionModel.cs	(revision 14429)
+++ branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/SolutionModel/Univariate/UnivariateSolutionModel.cs	(revision 14450)
@@ -23,13 +23,13 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Algorithms.MemPR.Interfaces;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Optimization.SolutionModel;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Random;
 
-namespace HeuristicLab.Encodings.Binary.SolutionModel.Univariate {
+namespace HeuristicLab.Algorithms.MemPR.Binary.SolutionModel.Univariate {
   [Item("Univariate solution model (binary)", "")]
   [StorableClass]
