Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/17 01:31:10 (8 years ago)
Author:
pkimmesw
Message:

#2665 Fixed VectorExpression errors, Fixed BenchmarkSuite Problem Data View issues

Location:
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentType.cs

    r14875 r14909  
    99    StringVector,
    1010    Char,
     11    Print,
    1112  }
    1213}
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs

    r14897 r14909  
    2222        WorstResult = char.MaxValue,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.String },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.Char },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 100,
    2626        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Digits.cs

    r14897 r14909  
    2222        WorstResult = 20,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.Integer },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 100,
    2626        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/DoubleLetters.cs

    r14897 r14909  
    2222        WorstResult = 100,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.String },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 100,
    2626        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/EvenSquares.cs

    r14897 r14909  
    1919        WorstResult = 400,
    2020        InputArgumentTypes = new[] { ExampleArgumentType.Integer },
    21         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     21        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2222        TrainingCount = 100,
    2323        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs

    r14897 r14909  
    2323        WorstResult = 1000,
    2424        InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer },
    25         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     25        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2626        TrainingCount = 100,
    2727        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Grades.cs

    r14897 r14909  
    2222        WorstResult = 25,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 200,
    2626        TestCount = 2000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/PigLatin.cs

    r14897 r14909  
    2323        WorstResult = 100,
    2424        InputArgumentTypes = new[] { ExampleArgumentType.String },
    25         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     25        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2626        TrainingCount = 200,
    2727        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ReplaceSpaceWithNewline.cs

    r14897 r14909  
    2323        WorstResult = 20,
    2424        InputArgumentTypes = new[] { ExampleArgumentType.String },
    25         OutputArgumentTypes = new[] { ExampleArgumentType.String, ExampleArgumentType.Integer },
     25        OutputArgumentTypes = new[] { ExampleArgumentType.Print, ExampleArgumentType.Integer },
    2626        TrainingCount = 100,
    2727        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ScrabbleScore.cs

    r14897 r14909  
    11namespace HeuristicLab.BenchmarkSuite.Problems {
    2   using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Char;
    32  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
    43  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.IntegerVector;
     
    7473        OutputArgs = output,
    7574        InputString = input,
    76         OutputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(output[0]) }
     75        OutputInteger = ExampleArgumentConverter.ConvertIntegers(output[0])
    7776      };
    7877    }
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringDifferences.cs

    r14897 r14909  
    2222        WorstResult = 100,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.String, ExampleArgumentType.String },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 200,
    2626        TestCount = 2000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/StringLengthsBackwards.cs

    r14897 r14909  
    2121        WorstResult = 200,
    2222        InputArgumentTypes = new[] { ExampleArgumentType.StringVector },
    23         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     23        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2424        TrainingCount = 100,
    2525        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Syllables.cs

    r14897 r14909  
    2323        WorstResult = 100,
    2424        InputArgumentTypes = new[] { ExampleArgumentType.String },
    25         OutputArgumentTypes = new[] { ExampleArgumentType.Integer },
     25        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2626        TrainingCount = 100,
    2727        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/WordStats.cs

    r14897 r14909  
    2424        WorstResult = 1000,
    2525        InputArgumentTypes = new[] { ExampleArgumentType.String },
    26         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     26        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2727        TrainingCount = 100,
    2828        TestCount = 1000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/XWordLines.cs

    r14897 r14909  
    2222        WorstResult = 100,
    2323        InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.String },
    24         OutputArgumentTypes = new[] { ExampleArgumentType.String },
     24        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2525        TrainingCount = 150,
    2626        TestCount = 2000,
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Views/ViewHelper.cs

    r14898 r14909  
    11namespace HeuristicLab.BenchmarkSuite.Views {
     2  using System.Linq;
     3
    24  public static class ViewHelper {
    35    public static string StringifyInput(ExampleArgumentType type, Example example, string valueSeparator) {
    46      switch (type) {
    57        case ExampleArgumentType.Integer: return string.Join(valueSeparator, example.InputInteger);
    6         //case ExampleArgumentType.IntegerVector: return string.Join(valueSeparator, example.InputInteger);
     8        case ExampleArgumentType.IntegerVector: return "[" + string.Join("], [", example.InputIntegerVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
    79
    810        case ExampleArgumentType.Float: return string.Join(valueSeparator, example.InputFloat);
    9         //case ExampleArgumentType.FloatVector: return string.Join(valueSeparator, example.InputFloat);
     11        case ExampleArgumentType.FloatVector: return "[" + string.Join("], [", example.InputFloatVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
    1012
    1113        case ExampleArgumentType.Boolean: return string.Join(valueSeparator, example.InputBoolean);
     
    1315
    1416        case ExampleArgumentType.String: return string.Join(valueSeparator, example.InputString);
    15         //case ExampleArgumentType.StringVector: return string.Join(valueSeparator, example.InputString);
     17        case ExampleArgumentType.StringVector: return "[" + string.Join("], [", example.InputStringVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
    1618        default: return string.Empty;
    1719      }
     
    2123      switch (type) {
    2224        case ExampleArgumentType.Integer: return string.Join(valueSeparator, example.OutputInteger);
    23         //case ExampleArgumentType.IntegerVector: return string.Join(valueSeparator, example.OutputIntegerVector);
     25        case ExampleArgumentType.IntegerVector: return "[" + string.Join("], [", example.OutputIntegerVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
    2426
    2527        case ExampleArgumentType.Float: return string.Join(valueSeparator, example.OutputFloat);
    26         //case ExampleArgumentType.FloatVector: return string.Join(valueSeparator, example.OutputFloat);
     28        case ExampleArgumentType.FloatVector: return "[" + string.Join("], [", example.OutputFloatVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
    2729
    2830        case ExampleArgumentType.Boolean: return string.Join(valueSeparator, example.OutputBoolean);
     
    3032
    3133        case ExampleArgumentType.String: return string.Join(valueSeparator, example.OutputString);
    32         //case ExampleArgumentType.StringVector: return string.Join(valueSeparator, example.OutputString);
     34        case ExampleArgumentType.Print: return string.Join(valueSeparator, example.OutputPrint);
     35        case ExampleArgumentType.StringVector: return "[" + string.Join("], [", example.OutputStringVector.Select(vector => string.Join(valueSeparator, vector))) + "]";
     36
    3337        default: return string.Empty;
    3438      }
     
    4246    private const string CharColumnHeader = "char";
    4347    private const string StringColumnHeader = "string";
     48    private const string PrintColumnHeader = "print";
    4449    private const string StringsColumnHeader = "string[]";
    4550    public static string GetHeaderTypeName(ExampleArgumentType type) {
     
    5055        case ExampleArgumentType.Char: return CharColumnHeader;
    5156        case ExampleArgumentType.String: return StringColumnHeader;
     57        case ExampleArgumentType.Print: return PrintColumnHeader;
    5258        case ExampleArgumentType.IntegerVector: return IntegersColumnHeader;
    5359        case ExampleArgumentType.FloatVector: return DoublesColumnHeader;
Note: See TracChangeset for help on using the changeset viewer.