namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.IntegerVector; public class VectorSummed : BenchmarkSuiteDataDescriptor { private const string name = "Vector Summed - Hard"; private const string fileName = "VectorSummed.csv"; 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."; protected override string FileName { get { return fileName; } } public override string Name { get { return name; } } public override string Description { get { return description; } } protected override int InputArgumentCount { get { return 2; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData(ProblemType.VectorSummed) { Name = Name, Description = Description, ProgramExecutionBudget = 45000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 1000000000, InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector, ExampleArgumentType.IntegerVector }, OutputArgumentTypes = new[] { ExampleArgumentType.IntegerVector }, TrainingCount = 150, TestCount = 1500, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.IntegerVector, MaxSize = 400, EvalLimit = 4000, ErcOptions = { ErcProbability = 0.05, IntegerVectorErcOptions = new IntegerVectorErcOptions( new IntegerVectorConstantsErc(new int[0])), IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-1000, 1000)) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(input[0]), ExampleArgumentConverter.ConvertIntegers(input[1]), }, OutputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(output[0]) }, }; } } }