Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/13/19 15:16:40 (6 years ago)
Author:
mkommend
Message:

#2521: Adapted GP basic problems to use read-only value parameters.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs

    r16813 r16947  
    9696        g.AddTerminalSymbol(string.Format("{0}", i));
    9797
     98      Encoding.GrammarParameter.ReadOnly = false;
    9899      Encoding.Grammar = g;
     100      Encoding.GrammarParameter.ReadOnly = true;
    99101
     102      BestKnownQualityParameter.ReadOnly = false;
    100103      BestKnownQuality = Math.Pow(2, NumberOfBits); // this is a benchmark problem (the best achievable quality is known for a given number of bits)
     104      BestKnownQualityParameter.ReadOnly = true;
    101105    }
    102106
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs

    r16946 r16947  
    8686        new IntValue(11)));
    8787
    88       var g = new SimpleSymbolicExpressionGrammar(); // will be replaced in update grammar
    89       Encoding = new SymbolicExpressionTreeEncoding(g, 100, 17);
    90       Encoding.GrammarParameter.ReadOnly = true;
     88      Encoding.TreeLength = 100;
     89      Encoding.TreeDepth = 17;
    9190
    9291      UpdateGrammar();
     
    115114      Encoding.GrammarParameter.ReadOnly = true;
    116115
     116      BestKnownQualityParameter.ReadOnly = false;
    117117      BestKnownQuality = Math.Pow(2, NumberOfBits); // this is a benchmark problem (the best achievable quality is known for a given number of bits)
     118      BestKnownQualityParameter.ReadOnly = true;
    118119    }
    119120
Note: See TracChangeset for help on using the changeset viewer.