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

File:
1 edited

Legend:

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

    r15032 r15189  
    5353      var example = Evaluator.Data.Examples[exampleComboBox.SelectedIndex];
    5454
    55       interpreter.BooleanStack.Push(example.InputBoolean);
    56       interpreter.IntegerStack.Push(example.InputInteger);
    57       interpreter.FloatStack.Push(example.InputFloat);
    58       interpreter.CharStack.Push(example.InputChar);
    59       interpreter.StringStack.Push(example.InputString);
    60       interpreter.IntegerVectorStack.Push(example.InputIntegerVector.Select(x => x.ToList()).ToArray());
    61       interpreter.FloatVectorStack.Push(example.InputFloatVector.Select(x => x.ToList()).ToArray());
    62       interpreter.StringVectorStack.Push(example.InputStringVector.Select(x => x.ToList()).ToArray());
    63       interpreter.BooleanVectorStack.Push(example.InputBooleanVector.Select(x => x.ToList()).ToArray());
     55      interpreter.SetInput(
     56        integers: example.InputInteger,
     57        floats: example.InputFloat,
     58        booleans: example.InputBoolean,
     59        chars: example.InputChar,
     60        strings: example.InputString,
     61        integerVectors: example.InputIntegerVector,
     62        floatVectors: example.InputFloatVector,
     63        stringVectors: example.InputStringVector);
     64
     65      //interpreter.BooleanStack.Push(example.InputBoolean);
     66      //interpreter.IntegerStack.Push(example.InputInteger);
     67      //interpreter.FloatStack.Push(example.InputFloat);
     68      //interpreter.CharStack.Push(example.InputChar);
     69      //interpreter.StringStack.Push(example.InputString);
     70      //interpreter.IntegerVectorStack.Push(example.InputIntegerVector.Select(x => x.ToList()).ToList());
     71      //interpreter.FloatVectorStack.Push(example.InputFloatVector.Select(x => x.ToList()).ToList());
     72      //interpreter.StringVectorStack.Push(example.InputStringVector.Select(x => x.ToList()).ToList());
     73      //interpreter.BooleanVectorStack.Push(example.InputBooleanVector.Select(x => x.ToList()).ToList());
    6474    }
    6575
     
    198208            var type = data.OutputArgumentTypes[j];
    199209            var offset = outputArgumentCountDict[type];
     210
     211            // estimated
    200212            row.Cells[data.InputArgumentTypes.Length + j * 2].Value = ViewHelper.StringifyOutput(type, offset, Content.Config.FloatStringFormat, example, Separator);
     213
     214            // output
    201215            row.Cells[data.InputArgumentTypes.Length + j * 2 + 1].Value = StringifyResult(type, offset, pushInterpreter, example, Separator);
     216
    202217            outputArgumentCountDict[type]++;
    203218          }
     
    243258
    244259        case ExampleArgumentType.Print:
    245           return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack.Take(example.OutputPrintLineCount)));
     260          return string.Join(valueSeparator, string.Join(PushEnvironment.NewLine, interpreter.PrintStack.AsStrings().Take(example.OutputPrintLineCount)));
    246261
    247262        case ExampleArgumentType.String:
Note: See TracChangeset for help on using the changeset viewer.