namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.IntegerVector; public class NegativeToZero : BenchmarkSuiteDataDescriptor { private const string name = "Negative to Zero - Medium"; private const string fileName = "NegativeToZero.csv"; private const string description = "Given a vector of integers, return the vector where all negative integers have been replaced by 0."; 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 1; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData(ProblemType.NegativeToZero) { Name = Name, Description = Description, ProgramExecutionBudget = 60000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 5000, InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector }, OutputArgumentTypes = new[] { ExampleArgumentType.IntegerVector }, TrainingCount = 200, TestCount = 2000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.IntegerVector, MaxSize = 500, EvalLimit = 1500, ErcOptions = { ErcProbability = 0.05, IntegerErcOptions = new IntegerErcOptions( new IntegerConstantErc(0)), IntegerVectorErcOptions = new IntegerVectorErcOptions( new IntegerVectorConstantsErc(new int[0])) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(input[0]) }, OutputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(output[0]) }, }; } } }