Changeset 12867 for branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Timestamp:
- 08/17/15 15:35:20 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12844-12846,12851,12855
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding merged: 12844
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs
r12422 r12867 77 77 rootNode.AddSubtree(startNode); 78 78 79 Create(random, startNode, maxTreeDepth - 2);79 Create(random, startNode, maxTreeDepth-1); 80 80 tree.Root = rootNode; 81 81 return tree; … … 99 99 for (var i = 0; i < arity; i++) { 100 100 var possibleSymbols = allowedSymbols 101 .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i)) 101 .Where(s => seedNode.Grammar.IsAllowedChildSymbol(seedNode.Symbol, s, i) 102 && seedNode.Grammar.GetMinimumExpressionDepth(s) <= maxDepth 103 && seedNode.Grammar.GetMaximumExpressionDepth(s) >= maxDepth) 102 104 .ToList(); 103 105 var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList(); … … 142 144 var selectedSymbol = possibleSymbols.SelectRandom(weights, random); 143 145 #pragma warning restore 612, 618 144 146 145 147 var tree = selectedSymbol.CreateTreeNode(); 146 148 if (tree.HasLocalParameters) tree.ResetLocalParameters(random); -
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/GrowTreeCreator.cs
r12422 r12867 74 74 rootNode.AddSubtree(startNode); 75 75 76 Create(random, startNode, maxTreeDepth - 2);76 Create(random, startNode, maxTreeDepth - 1); 77 77 tree.Root = rootNode; 78 78 return tree;
Note: See TracChangeset
for help on using the changeset viewer.