Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/21 16:07:45 (2 years ago)
Author:
mkommend
Message:

#2521: Merged trunk changes into branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/BalancedTreeCreator.cs

    r17654 r18086  
    5151    private void AfterDeserialization() {
    5252      if (!Parameters.ContainsKey(IrregularityBiasParameterName)) {
    53         Parameters.Add(new FixedValueParameter<PercentValue>(IrregularityBiasParameterName, new PercentValue(0.0)));
     53        Parameters.Add(new FixedValueParameter<PercentValue>(IrregularityBiasParameterName, "Allows to bias tree initialization towards less balanced/regular shapes. Set to 0% for most balanced and 100% for least balanced trees. (default = 0%)", new PercentValue(0.0)));
    5454      }
    5555    }
     
    106106      var grammar = root.Grammar;
    107107      var minSubtreeCount = grammar.GetMinimumSubtreeCount(root.Symbol);
    108       var maxSubtreeCount = grammar.GetMinimumSubtreeCount(root.Symbol);
     108      var maxSubtreeCount = grammar.GetMaximumSubtreeCount(root.Symbol);
    109109      var arity = random.Next(minSubtreeCount, maxSubtreeCount + 1);
    110110      int openSlots = arity;
     
    169169    }
    170170
    171     protected override ISymbolicExpressionTree Create(IRandom random) {
    172       var maxLength = MaximumSymbolicExpressionTreeLengthParameter.ActualValue.Value;
    173       var maxDepth = MaximumSymbolicExpressionTreeDepthParameter.ActualValue.Value;
    174       var grammar = ClonedSymbolicExpressionTreeGrammarParameter.ActualValue;
    175       return Create(random, grammar, maxLength, maxDepth);
    176     }
    177 
    178171    #region helpers
    179172    private class NodeInfo {
Note: See TracChangeset for help on using the changeset viewer.