Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/20/15 20:25:00 (9 years ago)
Author:
gkronber
Message:

#2283: separated value-states from done-states in GenericGrammarPolicy and removed disabling of actions from bandit policies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/SymbolicRegressionPoly10Problem.cs

    r11803 r11806  
    9292
    9393        sb.Append(CanonicalTerm(terms[terms.Length - 1]));
    94         sb.Append(phrase.Length - sb.Length);
    9594        canonicalPhrase = sb.ToString();
    9695        canonicalPhraseCache.Add(phrase, canonicalPhrase);
     
    109108        var sb = new StringBuilder(chars.Length);
    110109        // we want to have the up-case characters last
    111         for (int i = chars.Length - 1; i >= 0; i--) {
    112           if (chars[i] != '*') sb.Append(chars[i]);
     110        for (int i = chars.Length - 1; i > 0; i--) {
     111          if (chars[i] != '*') {
     112            sb.Append(chars[i]);
     113            if (chars[i - 1] != '*') sb.Append('*');
     114          }
    113115        }
     116        if (chars[0] != '*') sb.Append(chars[0]); // last term
    114117        canonicalTerm = sb.ToString();
    115118        canonicalTermDictionary.Add(term, canonicalTerm);
Note: See TracChangeset for help on using the changeset viewer.