Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/29/19 15:04:12 (6 years ago)
Author:
mkommend
Message:

#3005: Adapted genetic programming problems to disallow modifications of the grammar.

Location:
trunk/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs

    r16565 r16873  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    2829using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2930using HeuristicLab.Parameters;
    30 using HEAL.Attic;
    3131
    3232
  • trunk/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs

    r16565 r16873  
    2424using System.Diagnostics.Contracts;
    2525using System.Linq;
     26using HEAL.Attic;
    2627using HeuristicLab.Common;
    2728using HeuristicLab.Core;
     
    2930using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3031using HeuristicLab.Parameters;
    31 using HEAL.Attic;
    3232
    3333
     
    8888      var g = new SimpleSymbolicExpressionGrammar(); // will be replaced in update grammar
    8989      Encoding = new SymbolicExpressionTreeEncoding(g, 100, 17);
     90      Encoding.GrammarParameter.ReadOnly = true;
    9091
    9192      UpdateGrammar();
     
    110111        g.AddTerminalSymbol(string.Format("d{0}", i));
    111112
     113      Encoding.GrammarParameter.ReadOnly = false;
    112114      Encoding.Grammar = g;
     115      Encoding.GrammarParameter.ReadOnly = true;
    113116
    114117      BestKnownQuality = Math.Pow(2, NumberOfBits); // this is a benchmark problem (the best achievable quality is known for a given number of bits)
Note: See TracChangeset for help on using the changeset viewer.