Index: /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/ChangeNodeTypeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/ChangeNodeTypeManipulation.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/ChangeNodeTypeManipulation.cs	(revision 23)
@@ -38,5 +38,5 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to mutate", typeof(IOperator), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
@@ -49,5 +49,5 @@
       MersenneTwister random = GetVariableValue<MersenneTwister>("Random", scope, true);
       GPOperatorLibrary library = GetVariableValue<GPOperatorLibrary>("OperatorLibrary", scope, true);
-      bool balanceTrees = GetVariableValue<BoolData>("BalanceTrees", scope, true).Data;
+      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
       IntData treeSize = GetVariableValue<IntData>("TreeSize", scope, false);
       IntData treeHeight = GetVariableValue<IntData>("TreeHeight", scope, false);
@@ -87,5 +87,5 @@
       } else {
         List<IOperator> uninitializedOperators;
-        IOperator newFunction = ChangeFunctionType(parent, selectedChild, selectedChildIndex, gardener, random, balanceTrees, out uninitializedOperators);
+        IOperator newFunction = ChangeFunctionType(parent, selectedChild, selectedChildIndex, gardener, random, balancedTreesRate, out uninitializedOperators);
 
         if (parent == null) {
@@ -139,5 +139,5 @@
 
     private IOperator ChangeFunctionType(IOperator parent, IOperator child, int childIndex, TreeGardener gardener, MersenneTwister random,
-      bool balanceTrees, out List<IOperator> uninitializedOperators) {
+      double balancedTreesRate, out List<IOperator> uninitializedOperators) {
       // since there are suboperators, we have to check which 
       // and how many of the existing suboperators we can reuse
@@ -197,5 +197,10 @@
           availableSubOperators.Remove(selectedSubOperator); // the operator shouldn't be available for the following slots
         } else {
-          IOperator freshOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, balanceTrees);
+          IOperator freshOperatorTree;
+          if(random.NextDouble() <= balancedTreesRate) {
+            freshOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, true);
+          } else {
+            freshOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, false);
+          }
           freshSubTrees.AddRange(gardener.GetAllOperators(freshOperatorTree));
 
Index: /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/CutOutNodeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/CutOutNodeManipulation.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/CutOutNodeManipulation.cs	(revision 23)
@@ -52,5 +52,5 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to mutate", typeof(IOperator), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
@@ -65,5 +65,5 @@
       int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
       int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-      bool balanceTrees = GetVariableValue<BoolData>("BalanceTrees", scope, true).Data;
+      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
 
       TreeGardener gardener = new TreeGardener(random, library);
@@ -95,5 +95,10 @@
         } else {
           // create a new random tree
-          IOperator newOperator = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, balanceTrees);
+          IOperator newOperator;
+          if(random.NextDouble() <= balancedTreesRate) {
+            newOperator = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, true);
+          } else {
+            newOperator = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, false);
+          }
 
           GetVariableValue<IntData>("TreeSize", scope, true).Data = gardener.GetTreeSize(newOperator);
Index: /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/DeleteSubTreeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/DeleteSubTreeManipulation.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/DeleteSubTreeManipulation.cs	(revision 23)
@@ -42,5 +42,4 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to mutate", typeof(IOperator), VariableKind.In | VariableKind.Out));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In | VariableKind.Out));
Index: /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/SubstituteSubTreeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/SubstituteSubTreeManipulation.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/Manipulation/SubstituteSubTreeManipulation.cs	(revision 23)
@@ -41,5 +41,5 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to manipulate", typeof(IOperator), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
@@ -54,5 +54,5 @@
       int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
       int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-      bool balanceTrees = GetVariableValue<BoolData>("BalanceTrees", scope, true).Data;
+      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
       int treeSize = GetVariableValue<IntData>("TreeSize", scope, true).Data;
       int treeHeight = GetVariableValue<IntData>("TreeHeight", scope, true).Data;
@@ -66,5 +66,11 @@
 
         // create a new random operator tree
-        IOperator newOperatorTree = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, balanceTrees);
+
+        IOperator newOperatorTree;
+        if(random.NextDouble() <= balancedTreesRate) {
+          newOperatorTree = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, true);
+        } else {
+          newOperatorTree = gardener.CreateRandomTree(gardener.AllOperators, maxTreeSize, maxTreeHeight, false);
+        }
 
         if(!gardener.IsValidTree(newOperatorTree)) {
@@ -100,5 +106,10 @@
 
         // get a random operatorTree
-        IOperator newOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, balanceTrees);
+        IOperator newOperatorTree;
+        if(random.NextDouble() <= balancedTreesRate) {
+          newOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, true);
+        } else {
+          newOperatorTree = gardener.CreateRandomTree(allowedOperators, maxSubTreeSize, maxSubTreeHeight, false);
+        }
 
         IOperator oldChild = parent.SubOperators[childIndex];
Index: /trunk/sources/HeuristicLab.StructureIdentification/RandomTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/RandomTreeCreator.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/RandomTreeCreator.cs	(revision 23)
@@ -39,5 +39,5 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("BalancedTreesRate", "Determines how many trees should be balanced", typeof(DoubleData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to mutate", typeof(IOperator), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
@@ -50,5 +50,5 @@
       int maxTreeHeight = GetVariableValue<IntData>("MaxTreeHeight", scope, true).Data;
       int maxTreeSize = GetVariableValue<IntData>("MaxTreeSize", scope, true).Data;
-      bool balanceTrees = GetVariableValue<BoolData>("BalanceTrees", scope, true).Data;
+      double balancedTreesRate = GetVariableValue<DoubleData>("BalancedTreesRate", scope, true).Data;
 
       TreeGardener gardener = new TreeGardener(random, opLibrary);
@@ -56,6 +56,10 @@
       int treeHeight = random.Next(1, maxTreeHeight + 1);
       int treeSize = random.Next(1, maxTreeSize + 1);
-
-      IOperator rootOperator = gardener.CreateRandomTree(treeSize, treeHeight, balanceTrees);
+      IOperator rootOperator;
+      if(random.NextDouble() <= balancedTreesRate) {
+        rootOperator = gardener.CreateRandomTree(treeSize, treeHeight, true);
+      } else {
+        rootOperator = gardener.CreateRandomTree(treeSize, treeHeight, false);
+      }
 
       int actualTreeSize = gardener.GetTreeSize(rootOperator);
Index: /trunk/sources/HeuristicLab.StructureIdentification/Recombination/SinglePointCrossOver.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/Recombination/SinglePointCrossOver.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/Recombination/SinglePointCrossOver.cs	(revision 23)
@@ -44,5 +44,4 @@
       AddVariableInfo(new VariableInfo("MaxTreeHeight", "The maximal allowed height of the tree", typeof(IntData), VariableKind.In));
       AddVariableInfo(new VariableInfo("MaxTreeSize", "The maximal allowed size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
-      AddVariableInfo(new VariableInfo("BalanceTrees", "Determines if the trees should be balanced", typeof(BoolData), VariableKind.In));
       AddVariableInfo(new VariableInfo("OperatorTree", "The tree to mutate", typeof(IOperator), VariableKind.In));
       AddVariableInfo(new VariableInfo("TreeSize", "The size (number of nodes) of the tree", typeof(IntData), VariableKind.In));
Index: /trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs
===================================================================
--- /trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs	(revision 22)
+++ /trunk/sources/HeuristicLab.StructureIdentification/TreeGardener.cs	(revision 23)
@@ -96,5 +96,5 @@
     internal IOperator CreateRandomTree(int maxTreeSize, int maxTreeHeight, bool balanceTrees) {
       if (balanceTrees) {
-        if (maxTreeHeight == 1) {
+        if (maxTreeHeight == 1 || maxTreeSize==1) {
           IOperator selectedTerminal = (IOperator)terminals[random.Next(terminals.Count())].Clone();
           return selectedTerminal;
