Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/01/17 09:28:34 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed Benchmark Problem Definition, Converted LoopExpressions to stateless expressions, Added several unit test to ensure funcionality, Fixed UI bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs

    r14952 r15017  
    55
    66  using HeuristicLab.BenchmarkSuite;
    7   using HeuristicLab.Encodings.IntegerVectorEncoding;
     7  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    88
    99  using Instances;
     
    3838      PushEvaluator.LoadData(data);
    3939
    40       BestKnownQuality = data.BestResult;
    41       MaxPointsInProgram = data.MaxSize;
    42       MinPointsInProgram = data.MaxSize;
    43       EvalPushLimit = data.EvalLimit;
    44       ErcOptions = data.ErcOptions;
    4540      Name = "Push Problem: " + data.Name;
    4641      Description = data.Description;
     42      BestKnownQuality = data.BestResult;
     43      config.MaxPointsInProgram = data.MaxSize;
     44      config.EvalPushLimit = data.EvalLimit;
     45      config.ErcOptions = data.ErcOptions;
     46      config.FloatStringFormat = data.FloatStringFormat;
    4747
    4848      config.SetEnabledStacks((StackTypes)data.EnabledDataTypes);
     
    5050      Encoding.Bounds[0, 0] = 0;
    5151      Encoding.Bounds[0, 1] = config.EnabledExpressions.Count;
    52       Encoding.Length = config.MaxPointsInProgram;
     52
     53      InitProgramLength = data.MaxSize / 2;
    5354    }
    5455
    5556    protected override PushSolution CreatePushSolution(
    56       IntegerVector vector,
     57      PushProgram program,
    5758      double bestQuality,
    5859      IRandom random,
    5960      IReadOnlyPushConfiguration config,
    6061      IPushEvaluator evaluator) {
    61       return new PushBenchmarkSuiteSolution(vector, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone());
     62      return new PushBenchmarkSuiteSolution(program, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone());
    6263    }
    6364  }
Note: See TracChangeset for help on using the changeset viewer.