Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/VectorSummed.cs @ 16101

Last change on this file since 16101 was 15334, checked in by pkimmesw, 7 years ago

#2665 Testet Problems, Testet error functions, Small fixes, Created HL files

File size: 2.3 KB
Line 
1namespace HeuristicLab.BenchmarkSuite.Problems {
2  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
3  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.IntegerVector;
4
5  public class VectorSummed : BenchmarkSuiteDataDescriptor {
6    private const string name = "Vector Summed - Hard";
7    private const string fileName = "VectorSummed.csv";
8    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.";
9
10    protected override string FileName { get { return fileName; } }
11    public override string Name { get { return name; } }
12    public override string Description { get { return description; } }
13    protected override int InputArgumentCount { get { return 2; } }
14    protected override int OutputArgumentCount { get { return 1; } }
15
16    public override ProblemData CreateProblemData() {
17      return new ProblemData(ProblemType.VectorSummed) {
18        Name = Name,
19        Description = Description,
20        ProgramExecutionBudget = 45000000,
21        Examples = CloneExamples(),
22        BestResult = 0,
23        WorstResult = 1000000000,
24        InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector, ExampleArgumentType.IntegerVector },
25        OutputArgumentTypes = new[] { ExampleArgumentType.IntegerVector },
26        TrainingCount = 150,
27        TestCount = 1500,
28        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.IntegerVector,
29        MaxSize = 400,
30        EvalLimit = 4000,
31        ErcOptions = {
32          ErcProbability = 0.05,
33          IntegerVectorErcOptions = new IntegerVectorErcOptions(
34            new IntegerVectorConstantsErc(new int[0])),
35          IntegerErcOptions = new IntegerErcOptions(
36            new IntegerRangeErc(-1000, 1000))
37        }
38      };
39    }
40
41    protected override Example ParseExample(string[] input, string[] output) {
42      return new Example {
43        InputArgs = input,
44        OutputArgs = output,
45        InputIntegerVector = new[] {
46          ExampleArgumentConverter.ConvertIntegers(input[0]),
47          ExampleArgumentConverter.ConvertIntegers(input[1]),
48        },
49        OutputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(output[0]) },
50      };
51    }
52  }
53}
Note: See TracBrowser for help on using the repository browser.