Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 2136)
@@ -37,5 +37,5 @@
       }
     }
-    
+
     public override string Description {
       get {
@@ -46,10 +46,10 @@
 
     public override double Evaluate(double[,] values) {
-
-      double quality = SimpleR2Evaluator.Calculate(values);
-      if (double.IsNaN(quality) || double.IsInfinity(quality))
-        quality = double.MaxValue;
-
-      return quality;
+      try {
+        return SimpleR2Evaluator.Calculate(values);
+      }
+      catch (ArgumentException) {
+        return double.NegativeInfinity;
+      }
     }
   }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 2136)
@@ -46,9 +46,10 @@
 
     public override double Evaluate(double[,] values) {
-      double quality = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(values);
-      if (double.IsNaN(quality) || double.IsInfinity(quality))
-        quality = double.MaxValue;
-
-      return quality;
+      try {
+        return SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(values);
+      }
+      catch (ArgumentException) {
+        return double.PositiveInfinity;
+      }
     }
   }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 2136)
@@ -45,9 +45,8 @@
 
     public override double Evaluate(double[,] values) {
-      double quality = SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate(values);
-      if (double.IsNaN(quality) || double.IsInfinity(quality))
-        quality = double.MaxValue;
-
-      return quality;
+      try { return SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.Calculate(values); }
+      catch (ArgumentException) {
+        return double.PositiveInfinity;
+      }
     }
   }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 2136)
@@ -45,11 +45,8 @@
 
     public override double Evaluate(double[,] values) {
-      double quality = SimpleMSEEvaluator.Calculate(values);
-
-      if (double.IsNaN(quality) || double.IsInfinity(quality)) {
-        quality = double.MaxValue;
+      try { return SimpleMSEEvaluator.Calculate(values); }
+      catch (ArgumentException) {
+        return double.PositiveInfinity;
       }
-
-      return quality;
     }
   }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs	(revision 2136)
@@ -46,11 +46,16 @@
       evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, tree);
 
-      double[,] result = new double[end - start,2];
+      double[,] result = new double[end - start, 2];
       for (int i = start; i < end; i++) {
         result[i - start, 0] = dataset.GetValue(i, targetVariable);
-        result[i - start,1] = evaluator.Evaluate(i);
+        result[i - start, 1] = evaluator.Evaluate(i);
       }
 
-      return HeuristicLab.Modeling.SimpleMSEEvaluator.Calculate(result);
+      try {
+        return HeuristicLab.Modeling.SimpleMSEEvaluator.Calculate(result);
+      }
+      catch (ArgumentException) {
+        return double.PositiveInfinity;
+      }
     }
   }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs	(revision 2130)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs	(revision 2136)
@@ -54,10 +54,8 @@
 
     public override double Evaluate(double[,] values) {
-      double quality = SimpleVarianceAccountedForEvaluator.Calculate(values);
-
-      if (double.IsNaN(quality) || double.IsInfinity(quality)) {
-        quality = double.MaxValue;
+      try { return SimpleVarianceAccountedForEvaluator.Calculate(values); }
+      catch (ArgumentException) {
+        return double.NegativeInfinity;
       }
-      return quality;
     }
   }
