Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs	(revision 4980)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs	(revision 5014)
@@ -156,6 +156,6 @@
       : base(original, cloner) {
       operators = original.operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
+      RegisterParameterValueEvents();
       RegisterParameterEvents();
-      RegisterParameterValueEvents();
     }
     public SymbolicRegressionProblemBase()
@@ -171,5 +171,5 @@
       Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("FunctionTreeGrammar", "The grammar that should be used for symbolic regression models.", globalGrammar));
       Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the symbolic expression.", new IntValue(100)));
-      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the symbolic expression.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the symbolic expression. The minimum depth needed for the algorithm is 3 because two levels are reserved for the ProgramRoot and the Start symbol.", new IntValue(10)));
       Parameters.Add(new ValueParameter<IntValue>("MaxFunctionDefiningBranches", "Maximal number of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
       Parameters.Add(new ValueParameter<IntValue>("MaxFunctionArguments", "Maximal number of arguments of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
@@ -182,19 +182,21 @@
       UpdateEstimationLimits();
       InitializeOperators();
+      RegisterParameterValueEvents();
       RegisterParameterEvents();
-      RegisterParameterValueEvents();
-    }
-
-    private void RegisterParameterValueEvents() {
+    }
+
+    private void RegisterParameterEvents() {
       MaxFunctionArgumentsParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
       MaxFunctionDefiningBranchesParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
+      MaxExpressionDepthParameter.ValueChanged += new EventHandler(MaxExpressionDepthParameter_ValueChanged);
       SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
       FunctionTreeGrammarParameter.ValueChanged += new EventHandler(FunctionTreeGrammarParameter_ValueChanged);
-    }
-
-    private void RegisterParameterEvents() {
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+    }
+
+    private void RegisterParameterValueEvents() {
       MaxFunctionArgumentsParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
       MaxFunctionDefiningBranchesParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
-      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      MaxExpressionDepthParameter.Value.ValueChanged += new EventHandler(MaxExpressionDepthParameterValue_ValueChanged);
     }
 
@@ -252,4 +254,13 @@
       OnArchitectureParameterChanged(e);
     }
+
+    private void MaxExpressionDepthParameter_ValueChanged(object sender, EventArgs e) {
+      MaxExpressionDepthParameterValue_ValueChanged(sender, e);
+      MaxExpressionDepthParameter.Value.ValueChanged += MaxExpressionDepthParameterValue_ValueChanged;
+    }
+    private void MaxExpressionDepthParameterValue_ValueChanged(object sender, EventArgs e) {
+      if (MaxExpressionDepth != null && MaxExpressionDepth.Value < 3)
+        MaxExpressionDepth.Value = 3;
+    }
     #endregion
 
@@ -261,6 +272,6 @@
       if (operators == null) InitializeOperators();
       #endregion
+      RegisterParameterValueEvents();
       RegisterParameterEvents();
-      RegisterParameterValueEvents();
     }
 
