Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/17 19:34:13 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed analyzer, fixed Plush encoding + operators, adpated print evaluation according to McPhee

Location:
branches/PushGP/HeuristicLab.PushGP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP

    • Property svn:ignore set to
      *.user
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Individual/IndividualExtensions.cs

    r15273 r15289  
    11namespace HeuristicLab.Problems.ProgramSynthesis.Push.Individual {
    22  using System.Collections.Generic;
    3 
    4   using HeuristicLab.Core;
    53  using HeuristicLab.Encodings.IntegerVectorEncoding;
    64  using HeuristicLab.Optimization;
    75  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
    86  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    9   using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator;
    107  using HeuristicLab.Problems.ProgramSynthesis.Push.SolutionCreator;
    118
    129  public static class IndividualExtensions {
    1310
    14     public static PushProgram ToPushProgram(this Individual individual, IReadOnlyPushConfiguration config, IRandom random) {
    15       return individual.IntegerVector().ToPushProgram(config, random);
     11    public static PushProgram ToPushProgram(this Individual individual, IReadOnlyPushConfiguration config) {
     12      return individual.IntegerVector().ToPushProgram(config);
    1613    }
    1714
    18     public static PushProgram ToPushProgram(this IntegerVector vector, IReadOnlyPushConfiguration config, IRandom random) {
     15    public static PushProgram ToPushProgram(this IntegerVector vector, IReadOnlyPushConfiguration config) {
    1916      //var currentIndex = 0;
    2017      //var close = 0;
     
    2421        var index = vector[i];
    2522
    26         if (index == PushSolutionEncoding.End)
    27           break;
     23        if (index == PushSolutionEncoding.End) break;
     24        if (index == PushSolutionEncoding.Noop) continue;
    2825
    29         // skip noops
    30         if (index == PushSolutionEncoding.Noop)
    31           continue;
     26        var name = config.EnabledExpressions[index];
     27        var expression = ExpressionTable.GetExpression(name);
    3228
    33         var expression = CodeGeneratorUtils.MapToExpression(
    34           index,
    35           random,
    36           config.ErcOptions,
    37           config);
     29        //var expression = CodeGeneratorUtils.MapToExpression(
     30        //  index,
     31        //  random,
     32        //  config.ErcOptions,
     33        //  config);
    3834
    3935        expressions.Add(expression);
Note: See TracChangeset for help on using the changeset viewer.