Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 7107)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs	(revision 7108)
@@ -148,6 +148,8 @@
         throw new ArgumentException("Cannot grow tree. Seed node shouldn't have arity zero.");
 
+      var allowedSymbols = seedNode.Grammar.AllowedSymbols.Where(s => s.InitialFrequency > 0.0 && seedNode.Grammar.GetMaximumSubtreeCount(s) > 0).ToList();
+
       for (var i = 0; i != arity; ++i) {
-        var possibleSymbols = seedNode.Grammar.GetAllowedChildSymbols(seedNode.Symbol, i).Where(s => s.InitialFrequency > 0.0 && seedNode.Grammar.GetMaximumSubtreeCount(s) > 0);
+        var possibleSymbols = allowedSymbols.Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i)).ToList();
         var selectedSymbol = possibleSymbols.SelectRandom(random);
         var tree = selectedSymbol.CreateTreeNode();
@@ -158,5 +160,5 @@
       // Only iterate over the non-terminal nodes (those which have arity > 0)
       // Start from depth 2 since the first two levels are formed by the rootNode and the seedNode
-      foreach (var subTree in seedNode.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) != 0))
+      foreach (var subTree in seedNode.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0))
         RecursiveGrowFull(random, subTree, 2, maxDepth);
     }
@@ -168,12 +170,13 @@
         throw new ArgumentException("Cannot grow node of arity zero. Expected a function node.");
 
+      var allowedSymbols = root.Grammar.AllowedSymbols.Where(s => s.InitialFrequency > 0.0).ToList(); ;
+
       for (var i = 0; i != arity; ++i) {
-        var possibleSymbols = root.Grammar.GetAllowedChildSymbols(root.Symbol, i);
-        possibleSymbols = possibleSymbols.Where(s => s.InitialFrequency > 0.0 &&
-                                          root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth &&
-                                          root.Grammar.GetMaximumExpressionDepth(s) > maxDepth - currentDepth);
+        var possibleSymbols = allowedSymbols.Where(s => root.Grammar.IsAllowedChildSymbol(root.Symbol, s, i) &&
+                                                   root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth &&
+                                                   root.Grammar.GetMaximumExpressionDepth(s) > maxDepth - currentDepth).ToList();
+        if (!possibleSymbols.Any())
+          throw new InvalidOperationException("No symbols are available for the tree.");
 
-
-        if (!possibleSymbols.Any()) throw new InvalidOperationException("No symbols are available for the tree.");
         var selectedSymbol = possibleSymbols.SelectRandom(random);
         var tree = selectedSymbol.CreateTreeNode();
@@ -182,5 +185,5 @@
       }
 
-      foreach (var subTree in root.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) != 0))
+      foreach (var subTree in root.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0))
         RecursiveGrowFull(random, subTree, currentDepth + 1, maxDepth);
     }
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 7107)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs	(revision 7108)
@@ -146,7 +146,8 @@
         throw new ArgumentException("Cannot grow tree. Seed node shouldn't have arity zero.");
 
+      var allowedSymbols = seedNode.Grammar.AllowedSymbols.Where(s => s.InitialFrequency > 0.0).ToList();
 
       for (var i = 0; i != arity; ++i) {
-        var possibleSymbols = seedNode.Grammar.GetAllowedChildSymbols(seedNode.Symbol, i).Where(s => s.InitialFrequency > 0.0);
+        var possibleSymbols = allowedSymbols.Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i)).ToList();
         var selectedSymbol = possibleSymbols.SelectRandom(random);
         var tree = selectedSymbol.CreateTreeNode();
@@ -157,5 +158,5 @@
       // Only iterate over the non-terminal nodes (those which have arity > 0)
       // Start from depth 2 since the first two levels are formed by the rootNode and the seedNode
-      foreach (var subTree in seedNode.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) != 0))
+      foreach (var subTree in seedNode.Subtrees.Where(subTree => subTree.Grammar.GetMaximumSubtreeCount(subTree.Symbol) > 0))
         RecursiveGrow(random, subTree, 2, maxDepth);
     }
@@ -166,9 +167,10 @@
         throw new ArgumentException("Cannot grow node of arity zero. Expected a function node.");
 
+      var allowedSymbols = root.Grammar.AllowedSymbols.Where(s => s.InitialFrequency > 0.0).ToList();
+
       for (var i = 0; i != arity; ++i) {
-        var possibleSymbols = root.Grammar.GetAllowedChildSymbols(root.Symbol, i);
-        possibleSymbols = possibleSymbols.Where(s => s.InitialFrequency > 0.0 &&
-                                          root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth);
-        if (!possibleSymbols.Any()) throw new InvalidOperationException("No symbols are available for the tree.");
+        var possibleSymbols = allowedSymbols.Where(s => root.Grammar.IsAllowedChildSymbol(root.Symbol, s, i) && root.Grammar.GetMinimumExpressionDepth(s) - 1 <= maxDepth - currentDepth).ToList();
+        if (!possibleSymbols.Any())
+          throw new InvalidOperationException("No symbols are available for the tree.");
         var selectedSymbol = possibleSymbols.SelectRandom(random);
         var tree = selectedSymbol.CreateTreeNode();
