Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/EgoUtilities.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/EgoUtilities.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/EgoUtilities.cs	(revision 14894)
@@ -93,5 +93,5 @@
 
     public static IRegressionSolution BuildModel(CancellationToken cancellationToken, IEnumerable<Tuple<RealVector, double>> samples, IDataAnalysisAlgorithm<IRegressionProblem> regressionAlgorithm, IRandom random, bool removeDuplicates = true, IRegressionSolution oldSolution = null) {
-      var dataset = EgoUtilities.GetDataSet(samples.ToList(), removeDuplicates);
+      var dataset = GetDataSet(samples.ToList(), removeDuplicates);
       var problemdata = new RegressionProblemData(dataset, dataset.VariableNames.Where(x => !x.Equals("output")), "output");
       problemdata.TrainingPartition.Start = 0;
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/HeuristicLab.Algorithms.SAPBA-3.4.csproj
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/HeuristicLab.Algorithms.SAPBA-3.4.csproj	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/HeuristicLab.Algorithms.SAPBA-3.4.csproj	(revision 14894)
@@ -42,4 +42,8 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.EvolutionStrategy-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
@@ -120,4 +124,5 @@
   <ItemGroup>
     <Compile Include="EgoUtilities.cs" />
+    <Compile Include="Strategies\IndividualStrategy.cs" />
     <Compile Include="Strategies\GenerationalStrategy.cs" />
     <Compile Include="SurrogateAssistedPopulationBasedAlgorithm.cs" />
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Plugin.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Plugin.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Plugin.cs	(revision 14894)
@@ -20,9 +20,12 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
+using System.Text;
 using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Algorithms.SAPBA {
-  [Plugin("HeuristicLab.Algorithms.SAPBA", "3.4.5.14833")]
-  [PluginFile("HeuristicLab.Algorithms.EGO-3.4.dll", PluginFileType.Assembly)]
+  [Plugin("HeuristicLab.Algorithms.SAPBA", "3.4.5.14893")]
+  [PluginFile("HeuristicLab.Algorithms.SAPBA-3.4.dll", PluginFileType.Assembly)]
   [PluginFile("displayModelFrame.html", PluginFileType.Data)]
   [PluginDependency("HeuristicLab.Algorithms.CMAEvolutionStrategy", "3.4")]
@@ -35,8 +38,8 @@
   [PluginDependency("HeuristicLab.Data", "3.3")]
   [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
-  [PluginDependency("HeuristicLab.Operators", "3.3")]
-  [PluginDependency("HeuristicLab.Optimization", "3.3")]
-  [PluginDependency("HeuristicLab.Parameters", "3.3")]
-  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Operators","3.3")]
+  [PluginDependency("HeuristicLab.Optimization","3.3")]
+  [PluginDependency("HeuristicLab.Parameters","3.3")]
+  [PluginDependency("HeuristicLab.Persistence","3.3")]
   [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Properties/AssemblyInfo.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Properties/AssemblyInfo.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Properties/AssemblyInfo.cs	(revision 14894)
@@ -53,3 +53,3 @@
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("3.4.0.0")]
-[assembly: AssemblyFileVersion("3.4.0.14833")]
+[assembly: AssemblyFileVersion("3.4.0.14893")]
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/GenerationalStrategy.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/GenerationalStrategy.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/GenerationalStrategy.cs	(revision 14894)
@@ -37,5 +37,5 @@
       if (RegressionSolution != null && Generations < NoGenerations.Value) Generations++;
       else {
-        foreach (var indi in individuals) Evaluate(indi.RealVector(), random);
+        foreach (var indi in individuals) EvaluateSample(indi.RealVector(), random);
         BuildRegressionSolution(random);
         Generations = 0;
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/IndividualStrategy.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/IndividualStrategy.cs	(revision 14894)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/IndividualStrategy.cs	(revision 14894)
@@ -0,0 +1,43 @@
+﻿using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Algorithms.SAPBA.Strategies {
+  public class IndividualStrategy : StrategyBase {
+    public const string SampledIndividualsParameterName = "SampledIndividals";
+    public IFixedValueParameter<IntValue> SampledIndividualsParameter => Parameters[SampledIndividualsParameterName] as IFixedValueParameter<IntValue>;
+    public IntValue SampledIndividuals => SampledIndividualsParameter.Value;
+
+    #region Constructors
+    private IndividualStrategy(IndividualStrategy original, Cloner cloner) : base(original, cloner) {
+    }
+    public IndividualStrategy() {
+      Parameters.Add(new FixedValueParameter<IntValue>(SampledIndividualsParameterName, "The number of individuals that are sampled each generation", new IntValue(3)));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IndividualStrategy(this, cloner);
+    }
+    #endregion
+
+    public override double Evaluate(RealVector r, IRandom random) {
+      return EstimateSample(r, random).Item2;
+    }
+
+    protected override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, ResultCollection globalResults, IRandom random) {
+    }
+
+    protected override void ProcessPopulation(Individual[] individuals, double[] qualities, IRandom random) {
+      var samples = individuals.Zip(qualities, (individual, d) => new Tuple<Individual, double>(individual, d)).OrderBy(t => Algorithm.Problem.Maximization ? -t.Item2 : t.Item2).Take(SampledIndividuals.Value).Select(t => t.Item1.RealVector());
+      foreach (var indi in samples) EvaluateSample(indi, random);
+      BuildRegressionSolution(random);
+    }
+
+    protected override void Initialize() {
+    }
+  }
+}
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/StrategyBase.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/StrategyBase.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/Strategies/StrategyBase.cs	(revision 14894)
@@ -38,5 +38,5 @@
     #region Properties
     [Storable]
-    private SurrogateAssistedPopulationBasedAlgorithm Algorithm;
+    protected SurrogateAssistedPopulationBasedAlgorithm Algorithm;
     [Storable]
     private List<Tuple<RealVector, double>> Samples;
@@ -92,7 +92,7 @@
 
         if (!globalResults.ContainsKey(BestQualityResultName)) globalResults.Add(new Result(BestQualityResultName, new DoubleValue(0.0)));
-        ((DoubleValue)globalResults[BestQualityResultName].Value).Value = qualities[bestIdx];
-        if (!globalResults.ContainsKey(BestSolutionResultName)) globalResults.Add(new Result(BestQualityResultName, new RealVector()));
-        globalResults[BestSolutionResultName].Value = individuals[bestIdx].RealVector();
+        ((DoubleValue)globalResults[BestQualityResultName].Value).Value = Samples[bestIdx].Item2;
+        if (!globalResults.ContainsKey(BestSolutionResultName)) globalResults.Add(new Result(BestSolutionResultName, new RealVector()));
+        globalResults[BestSolutionResultName].Value = Samples[bestIdx].Item1;
 
         DataTable table;
@@ -135,4 +135,6 @@
     }
     protected Tuple<RealVector, double> EvaluateSample(RealVector point, IRandom random) {
+      Cancellation.ThrowIfCancellationRequested();
+      if (Samples.Count >= Algorithm.MaximumEvaluations) { Algorithm.OptimizationAlgorithm.Stop(); return new Tuple<RealVector, double>(point, 0.0); }
       var p = new Tuple<RealVector, double>(point, Algorithm.Problem.Evaluate(GetIndividual(point), random));
       Samples.Add(p);
@@ -140,4 +142,5 @@
     }
     protected Tuple<RealVector, double> EstimateSample(RealVector point, IRandom random) {
+      if (Samples.Count == Algorithm.InitialEvaluations && RegressionSolution == null) BuildRegressionSolution(random);
       return Samples.Count < Algorithm.InitialEvaluations ? EvaluateSample(point, random) : new Tuple<RealVector, double>(point, RegressionSolution.Model.GetEstimation(point));
     }
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/SurrogateAssistedPopulationBasedAlgorithm.cs
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/SurrogateAssistedPopulationBasedAlgorithm.cs	(revision 14893)
+++ branches/SAPBA/HeuristicLab.Algorithms.SAPBA/SurrogateAssistedPopulationBasedAlgorithm.cs	(revision 14894)
@@ -44,5 +44,6 @@
     public override bool SupportsPause => true;
     public override Type ProblemType => typeof(SingleObjectiveBasicProblem<IEncoding>);
-    public new SingleObjectiveBasicProblem<IEncoding> Problem {
+    public new SingleObjectiveBasicProblem<IEncoding> Problem
+    {
       get { return (SingleObjectiveBasicProblem<IEncoding>)base.Problem; }
       set { base.Problem = value; }
@@ -51,5 +52,4 @@
 
     #region ParameterNames
-    private const string GenerationSizeParameterName = "GenerationSize";
     private const string InitialEvaluationsParameterName = "Initial Evaluations";
     private const string MaximalDataSetSizeParameterName = "Maximal Dataset Size";
@@ -57,5 +57,4 @@
     private const string MaximumRuntimeParameterName = "Maximum Runtime";
     private const string OptimizationAlgorithmParameterName = "Optimization Algorithm";
-    private const string OptimizationRestartsParameterName = "Optimization Restarts";
     private const string RemoveDuplicatesParamterName = "RemoveDuplicates";
     private const string RegressionAlgorithmParameterName = "RegressionAlgorithm";
@@ -66,5 +65,4 @@
 
     #region ParameterProperties
-    public IFixedValueParameter<IntValue> GenerationSizeParemeter => Parameters[GenerationSizeParameterName] as IFixedValueParameter<IntValue>;
     public IFixedValueParameter<IntValue> InitialEvaluationsParameter => Parameters[InitialEvaluationsParameterName] as IFixedValueParameter<IntValue>;
     public IFixedValueParameter<IntValue> MaximalDataSetSizeParameter => Parameters[MaximalDataSetSizeParameterName] as IFixedValueParameter<IntValue>;
@@ -72,5 +70,4 @@
     public IFixedValueParameter<IntValue> MaximumRuntimeParameter => Parameters[MaximumRuntimeParameterName] as IFixedValueParameter<IntValue>;
     public IValueParameter<Algorithm> OptimizationAlgorithmParameter => Parameters[OptimizationAlgorithmParameterName] as IValueParameter<Algorithm>;
-    public IFixedValueParameter<IntValue> OptimizationRestartsParemeter => Parameters[OptimizationRestartsParameterName] as IFixedValueParameter<IntValue>;
     public IValueParameter<IDataAnalysisAlgorithm<IRegressionProblem>> RegressionAlgorithmParameter => Parameters[RegressionAlgorithmParameterName] as IValueParameter<IDataAnalysisAlgorithm<IRegressionProblem>>;
     public IFixedValueParameter<BoolValue> RemoveDuplicatesParameter => Parameters[RemoveDuplicatesParamterName] as IFixedValueParameter<BoolValue>;
@@ -81,5 +78,4 @@
 
     #region Properties
-    public int GenerationSize => GenerationSizeParemeter.Value.Value;
     public int InitialEvaluations => InitialEvaluationsParameter.Value.Value;
     public int MaximalDatasetSize => MaximalDataSetSizeParameter.Value.Value;
@@ -87,5 +83,4 @@
     public int MaximumRuntime => MaximumRuntimeParameter.Value.Value;
     public Algorithm OptimizationAlgorithm => OptimizationAlgorithmParameter.Value;
-    public int OptimizationRestarts => OptimizationRestartsParemeter.Value.Value;
     public IDataAnalysisAlgorithm<IRegressionProblem> RegressionAlgorithm => RegressionAlgorithmParameter.Value;
     public bool RemoveDuplicates => RemoveDuplicatesParameter.Value.Value;
@@ -121,7 +116,8 @@
     public override IDeepCloneable Clone(Cloner cloner) { return new SurrogateAssistedPopulationBasedAlgorithm(this, cloner); }
     public SurrogateAssistedPopulationBasedAlgorithm() {
-      var cmaes = new CMAEvolutionStrategy.CMAEvolutionStrategy {
-        MaximumGenerations = 300,
-        PopulationSize = 50
+      surrogateProblem = new SurrogateProblem();
+      var geneticAlgorithm = new GeneticAlgorithm.GeneticAlgorithm {
+        PopulationSize = { Value = 50 },
+        Problem = surrogateProblem
       };
       var model = new GaussianProcessRegression {
@@ -130,5 +126,4 @@
       model.CovarianceFunctionParameter.Value = new CovarianceRationalQuadraticIso();
 
-      cmaes.Problem = new SurrogateProblem();
       Parameters.Add(new FixedValueParameter<IntValue>(MaximumEvaluationsParameterName, "", new IntValue(int.MaxValue)));
       Parameters.Add(new FixedValueParameter<IntValue>(InitialEvaluationsParameterName, "", new IntValue(10)));
@@ -137,11 +132,9 @@
       Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyParameterName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
       Parameters.Add(new ValueParameter<IDataAnalysisAlgorithm<IRegressionProblem>>(RegressionAlgorithmParameterName, "The model used to approximate the problem", model));
-      Parameters.Add(new ValueParameter<Algorithm>(OptimizationAlgorithmParameterName, "The algorithm used to solve the expected improvement subproblem", cmaes));
-      Parameters.Add(new FixedValueParameter<IntValue>(OptimizationRestartsParameterName, "Number of restarts of the SubAlgortihm to avoid local optima", new IntValue(1)));
-      Parameters.Add(new FixedValueParameter<IntValue>(GenerationSizeParameterName, "Number points that are sampled every iteration (stadard EGO: 1)", new IntValue(1)));
+      Parameters.Add(new ValueParameter<Algorithm>(OptimizationAlgorithmParameterName, "The algorithm used to solve the expected improvement subproblem", geneticAlgorithm));
       Parameters.Add(new FixedValueParameter<IntValue>(MaximalDataSetSizeParameterName, "The maximum number of sample points used to generate the model. Set 0 or less to use always all samples ", new IntValue(-1)));
       Parameters.Add(new FixedValueParameter<BoolValue>(RemoveDuplicatesParamterName, "Wether duplicate samples should be replaced by a single sample with an averaged quality. This GREATLY decreases the chance of ill conditioned models (unbuildable models) but is not theoretically sound as the model ignores the increasing certainty in this region"));
-      var strategies = new ItemSet<ISurrogateStrategy> { new GenerationalStrategy() };
-      Parameters.Add(new ConstrainedValueParameter<ISurrogateStrategy>(StrategyParameterName, "The surrogate strategy that dictates how the optimization alg is assisted", strategies));
+      var strategies = new ItemSet<ISurrogateStrategy> { new GenerationalStrategy(), new IndividualStrategy() };
+      Parameters.Add(new ConstrainedValueParameter<ISurrogateStrategy>(StrategyParameterName, "The surrogate strategy that dictates how the optimization alg is assisted", strategies, strategies.First()));
       RegisterEventhandlers();
     }
Index: branches/SAPBA/HeuristicLab.Algorithms.SAPBA/new 2.txt
===================================================================
--- branches/SAPBA/HeuristicLab.Algorithms.SAPBA/new 2.txt	(revision 14893)
+++ 	(revision )
@@ -1,2 +1,0 @@
-IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
-IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
