Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/17 21:36:03 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed small issues, testet benchmark suite, added INX Expressions

Location:
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/CodeGeneratorUtils.cs

    r15017 r15189  
    3838      IRandom random,
    3939      IReadOnlyErcOptions ercOptions) {
    40       var x = random.NextDouble();
    41       Expression expression = null;
     40      //var x = random.NextDouble();
     41      //Expression expression = null;
    4242
    43       if (x < ercOptions.ErcProbability) {
    44         var expressionType = ExpressionTable.NameToTypeTable[expressionName];
    45         expression = CreateRandomErcExpression(
    46             ExpressionTable.TypeToAttributeTable[expressionType].StackType,
    47             random,
    48             ercOptions);
    49       }
     43      //if (x < ercOptions.ErcProbability) {
     44      //  var expressionType = ExpressionTable.NameToTypeTable[expressionName];
     45      //  expression = CreateRandomErcExpression(
     46      //      ExpressionTable.TypeToAttributeTable[expressionType].StackType,
     47      //      random,
     48      //      ercOptions);
     49      //}
    5050
    51       if (expression == null || expression is ExecNoopExpression) {
    52         expression = ExpressionTable.GetExpression(expressionName);
    53       }
     51      //if (expression == null || expression is ExecNoopExpression) {
     52      //  expression = ExpressionTable.GetExpression(expressionName);
     53      //}
     54
     55      //return expression;
     56
     57      var expression = ExpressionTable.GetExpression(expressionName);
    5458
    5559      return expression;
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/RecursiveCodeGenerator.cs

    r14834 r15189  
    2323      var code = RandomCode(maxPoints, random, pushGpConfiguration, customExpressions);
    2424
    25       return PushProgram.Create(pool, code.ToArray());
     25      return PushProgram.Create(pool, code.ToList());
    2626    }
    2727
     
    2929      var code = RandomCode(maxPoints, random, pushGpConfiguration, customExpressions);
    3030
    31       return new PushProgram(code.ToArray());
     31      return new PushProgram(code.ToList());
    3232    }
    3333
Note: See TracChangeset for help on using the changeset viewer.