Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs	(revision 2381)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs	(revision 2385)
@@ -68,4 +68,8 @@
       individualProc.AddSubOperator(validationEvaluator);
 
+      Counter bestValidationSolutionAgeCounter = new Counter();
+      bestValidationSolutionAgeCounter.Name = "BestSolutionAgeCounter";
+      bestValidationSolutionAgeCounter.GetVariableInfo("Value").ActualName = "BestValidationSolutionAge";
+
       BestSolutionStorer solutionStorer = new BestSolutionStorer();
       solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
@@ -88,4 +92,5 @@
 
       seq.AddSubOperator(subScopesProc);
+      seq.AddSubOperator(bestValidationSolutionAgeCounter);
       seq.AddSubOperator(solutionStorer);
       seq.AddSubOperator(validationQualityCalculator);
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs	(revision 2381)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs	(revision 2385)
@@ -33,4 +33,5 @@
 using HeuristicLab.DataAnalysis;
 using HeuristicLab.Operators.Programmable;
+using HeuristicLab.GP.Algorithms;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -100,4 +101,9 @@
       get { return GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data; }
       set { GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data = value; }
+    }
+
+    public virtual int MaxBestValidationSolutionAge {
+      get { return GetVariableInjector().GetVariable("MaxBestValidationSolutionAge").GetValue<IntData>().Data; }
+      set { GetVariableInjector().GetVariable("MaxBestValidationSolutionAge").GetValue<IntData>().Data = value; }
     }
 
@@ -116,4 +122,5 @@
       : base() {
       PunishmentFactor = 10.0;
+      MaxBestValidationSolutionAge = 10;
     }
 
@@ -160,6 +167,13 @@
       selectionPressureStorer.GetVariableInfo("Output").ActualName = "SelectionPressure";
 
+      ProgrammableOperator resetBestSolutionAge = new ProgrammableOperator();
+      resetBestSolutionAge.RemoveVariable("Result");
+      resetBestSolutionAge.AddVariableInfo(
+        new VariableInfo("BestValidationSolutionAge", "Age of best validation solution", typeof(IntData), VariableKind.In | VariableKind.Out));
+      resetBestSolutionAge.Code = "BestValidationSolutionAge.Data = 0;";
+
       seq.AddSubOperator(evaluatedSolutionsStorer);
       seq.AddSubOperator(selectionPressureStorer);
+      seq.AddSubOperator(resetBestSolutionAge);
 
       op.OperatorGraph.AddOperator(seq);
@@ -171,4 +185,6 @@
       VariableInjector injector = base.CreateGlobalInjector();
       injector.AddVariable(new HeuristicLab.Core.Variable("PunishmentFactor", new DoubleData()));
+      injector.AddVariable(new HeuristicLab.Core.Variable("BestValidationSolutionAge", new IntData()));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxBestValidationSolutionAge", new IntData()));
       return injector;
     }
@@ -203,4 +219,19 @@
     }
 
+    protected override IOperator CreateTerminationCondition() {
+      CombinedOperator terminationCritertion = new CombinedOperator();
+      terminationCritertion.Name = "TerminationCondition";
+      GreaterThanComparator bestSolutionAge = new GreaterThanComparator();
+      bestSolutionAge.GetVariableInfo("LeftSide").ActualName = "BestValidationSolutionAge";
+      bestSolutionAge.GetVariableInfo("RightSide").ActualName = "MaxBestValidationSolutionAge";
+      bestSolutionAge.GetVariableInfo("Result").ActualName = "TerminationCriterion";
+
+      IOperator combinedTerminationCriterion = AlgorithmBase.CombineTerminationCriterions(base.CreateTerminationCondition(), bestSolutionAge);
+
+      terminationCritertion.OperatorGraph.AddOperator(combinedTerminationCriterion);
+      terminationCritertion.OperatorGraph.InitialOperator = combinedTerminationCriterion;
+      return terminationCritertion;
+    }
+
     protected override IOperator CreatePostProcessingOperator() {
       CombinedOperator op = new CombinedOperator();
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGPRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGPRegression.cs	(revision 2381)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGPRegression.cs	(revision 2385)
@@ -32,4 +32,5 @@
 using HeuristicLab.DataAnalysis;
 using HeuristicLab.Operators.Programmable;
+using HeuristicLab.GP.Algorithms;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -101,4 +102,9 @@
       get { return GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data; }
       set { GetVariableInjector().GetVariable("PunishmentFactor").GetValue<DoubleData>().Data = value; }
+    }
+
+    public virtual int MaxBestValidationSolutionAge {
+      get { return GetVariableInjector().GetVariable("MaxBestValidationSolutionAge").GetValue<IntData>().Data; }
+      set { GetVariableInjector().GetVariable("MaxBestValidationSolutionAge").GetValue<IntData>().Data = value; }
     }
 
@@ -116,6 +122,6 @@
     public StandardGPRegression()
       : base() {
-
       PunishmentFactor = 10.0;
+      MaxBestValidationSolutionAge = 15;
     }
 
@@ -156,5 +162,12 @@
       evaluatedSolutionsStorer.Code = "Output.Data = Input.Data;";
 
+      ProgrammableOperator resetBestSolutionAge = new ProgrammableOperator();
+      resetBestSolutionAge.RemoveVariable("Result");
+      resetBestSolutionAge.AddVariableInfo(
+        new VariableInfo("BestValidationSolutionAge", "Age of best validation solution", typeof(IntData), VariableKind.In | VariableKind.Out));
+      resetBestSolutionAge.Code = "BestValidationSolutionAge.Data = 0;";
+
       seq.AddSubOperator(evaluatedSolutionsStorer);
+      seq.AddSubOperator(resetBestSolutionAge);
 
       op.OperatorGraph.AddOperator(seq);
@@ -167,4 +180,6 @@
       VariableInjector injector = base.CreateGlobalInjector();
       injector.AddVariable(new HeuristicLab.Core.Variable("PunishmentFactor", new DoubleData()));
+      injector.AddVariable(new HeuristicLab.Core.Variable("BestValidationSolutionAge", new IntData()));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxBestValidationSolutionAge", new IntData()));
       return injector;
     }
@@ -197,4 +212,20 @@
     }
 
+    protected override IOperator CreateTerminationCondition() {
+      CombinedOperator terminationCritertion = new CombinedOperator();
+      terminationCritertion.Name = "TerminationCondition";
+      GreaterThanComparator bestSolutionAge = new GreaterThanComparator();
+      bestSolutionAge.GetVariableInfo("LeftSide").ActualName = "BestValidationSolutionAge";
+      bestSolutionAge.GetVariableInfo("RightSide").ActualName = "MaxBestValidationSolutionAge";
+      bestSolutionAge.GetVariableInfo("Result").ActualName = "TerminationCriterion";
+
+      IOperator combinedTerminationCriterion = AlgorithmBase.CombineTerminationCriterions(base.CreateTerminationCondition(), bestSolutionAge);
+      
+      terminationCritertion.OperatorGraph.AddOperator(combinedTerminationCriterion);
+      terminationCritertion.OperatorGraph.InitialOperator = combinedTerminationCriterion;
+      return terminationCritertion;
+    }
+
+
     protected override IOperator CreatePostProcessingOperator() {
       CombinedOperator op = new CombinedOperator();
