Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs	(revision 7845)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs	(revision 9047)
@@ -23,39 +23,27 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [Item("Generational Sliding Window GP Analyzer", "Analyzer which moves a sliding window every n-th generation over the training partition.")]
+  [Item("Offspring Selection Sliding Window GP Analyzer", "Analyzer which moves a sliding window whenever the selection pressure exceeds a certain threshold.")]
   [StorableClass]
-  public class GenerationalSlidingWindowAnalyzer<T> : SlidingWindowAnalyzer<T>, IIterationBasedOperator
+  public class OffspringSelectionSlidingWindowAnalyzer<T> : SlidingWindowAnalyzer<T>
     where T : class, IDataAnalysisProblemData {
-    private const string GenerationsIntervalParameterName = "Generation Interval";
-    private const string GenerationsIntervalStartParameterName = "Generation Interval Start";
-    private const string IterationsParameterName = "Iterations";
-    private const string MaximumIterationsParameterName = "Maximum Iterations";
+    private const string SelectionPressureParameterName = "SelectionPressure";
+    private const string SelectionPressureThresholdParameterName = "SelectionPressureThreshold";
 
     #region parameter properties
-    public ILookupParameter<IntValue> IterationsParameter {
-      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    public ILookupParameter<IntValue> SelectionPressureParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[SelectionPressureParameterName]; }
     }
-    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
-    }
-    public IFixedValueParameter<IntValue> GenerationsIntervalParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[GenerationsIntervalParameterName]; }
-    }
-    public IFixedValueParameter<IntValue> GenerationsIntervalStartParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[GenerationsIntervalStartParameterName]; }
+    public IFixedValueParameter<IntValue> SelectionPressureThresholdParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[SelectionPressureThresholdParameterName]; }
     }
     #endregion
 
     #region properties
-    public IntValue GenerationsInterval {
-      get { return GenerationsIntervalParameter.Value; }
-    }
-    public IntValue GenerationsIntervalStart {
-      get { return GenerationsIntervalStartParameter.Value; }
+    public IntValue SelectionPressureThreshold {
+      get { return SelectionPressureThresholdParameter.Value; }
     }
     #endregion
@@ -63,26 +51,20 @@
 
     [StorableConstructor]
-    protected GenerationalSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
-    protected GenerationalSlidingWindowAnalyzer(GenerationalSlidingWindowAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
+    protected OffspringSelectionSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
+    protected OffspringSelectionSlidingWindowAnalyzer(OffspringSelectionSlidingWindowAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new GenerationalSlidingWindowAnalyzer<T>(this, cloner);
+      return new OffspringSelectionSlidingWindowAnalyzer<T>(this, cloner);
     }
 
-    public GenerationalSlidingWindowAnalyzer() {
-      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, ""));
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, ""));
-      Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalParameterName, "", new IntValue(0)));
-      Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalStartParameterName, "", new IntValue(10)));
+    public OffspringSelectionSlidingWindowAnalyzer() {
+      Parameters.Add(new LookupParameter<IntValue>(SelectionPressureParameterName, ""));
+      Parameters.Add(new FixedValueParameter<IntValue>(SelectionPressureThresholdParameterName, "", new IntValue(20)));
     }
 
     protected override bool CheckForUpdate() {
-      var iteration = IterationsParameter.ActualValue.Value;
-      var start = GenerationsIntervalStart.Value;
-      var step = GenerationsInterval.Value;
-      if (iteration < start) return false;
+      var currentSelectionPressure = SelectionPressureParameter.ActualValue.Value;
+      var selectionPressureThreshold = SelectionPressureThresholdParameter.Value.Value;
 
-      if ((iteration - start) % step == 0) return true;
-
-      return false;
+      return selectionPressureThreshold <= currentSelectionPressure;
     }
 
