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.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs

    r14952 r15017  
    11namespace HeuristicLab.BenchmarkSuite.Problems {
     2  using System.Globalization;
     3
    24  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Float;
    35  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
     
    1517
    1618    public override ProblemData CreateProblemData() {
    17       return new ProblemData {
     19      return new ProblemData(ProblemType.NumberIO) {
    1820        Name = Name,
    1921        Description = Description,
     
    2224        WorstResult = 400,
    2325        InputArgumentTypes = new[] { ExampleArgumentType.Float, ExampleArgumentType.Integer },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.Float },
     26        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2527        TrainingCount = 25,
    2628        TestCount = 1000,
     
    3941
    4042    protected override Example ParseExample(string[] input, string[] output) {
     43      var estimedFloatValue = double.Parse(output[0], CultureInfo.InvariantCulture);
    4144      return new Example {
    4245        InputArgs = input,
     
    4447        InputFloat = ExampleArgumentConverter.ConvertDoubles(input[0]),
    4548        InputInteger = ExampleArgumentConverter.ConvertIntegers(input[1]),
    46         OutputFloat = ExampleArgumentConverter.ConvertDoubles(output[0]),
    47         //OutputPrint = output[0]
     49        //OutputFloat = new[] { estimedFloatValue },
     50        OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
    4851      };
    4952    }
Note: See TracChangeset for help on using the changeset viewer.