Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorSummed.cs @ 14875

Last change on this file since 14875 was 14875, checked in by pkimmesw, 8 years ago

#2665 BenchmarkSuite, all examples, partially tested, VectorExpressions added

File size: 2.1 KB
Line 
1namespace HeuristicLab.BenchmarkSuite.Problems {
2  public class VectorSummed : BenchmarkSuiteDataDescriptor {
3    private const string name = "Vector Summed";
4    private const string fileName = "VectorSummed.csv";
5    private const string description = "Given two equal-sized vectors of integers, return a vector of integers that contains the sum of the input vectors at each index.";
6
7    protected override string FileName { get { return fileName; } }
8    public override string Name { get { return name; } }
9    public override string Description { get { return description; } }
10    protected override int InputArgumentCount { get { return 2; } }
11    protected override int OutputArgumentCount { get { return 1; } }
12
13    public override ProblemData CreateProblemData() {
14      return new ProblemData {
15        Name = Name,
16        Description = Description,
17        Examples = CloneExamples(),
18        BestResult = 0,
19        WorstResult = 100000,
20        InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector, ExampleArgumentType.IntegerVector },
21        OutputArgumentTypes = new[] { ExampleArgumentType.IntegerVector },
22        TrainingCount = 150,
23        TestCount = 1500,
24        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.IntegerVector,
25        MaxSize = 400,
26        EvalLimit = 4000,
27        ErcOptions = {
28          ErcProbability = 0.05,
29          IntegerVectorErcOptions = {
30            IsEnabled = true,
31            Constants = new [] { new int[0] }
32          },
33          IntegerErcOptions = {
34            IsEnabled = true,
35            Start = -1000,
36            End = 1000
37          }
38        }
39      };
40    }
41
42    protected override Example ParseExample(string[] input, string[] output) {
43      return new Example {
44        InputArgs = input,
45        OutputArgs = output,
46        InputIntegerVector = new[] {
47          ExampleArgumentConverter.ConvertIntegers(input[0]),
48          ExampleArgumentConverter.ConvertIntegers(input[1]),
49        },
50        OutputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(output[0]) },
51      };
52    }
53  }
54}
Note: See TracBrowser for help on using the repository browser.