namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.String; public class SmallOrLarge : BenchmarkSuiteDataDescriptor { private const string name = "Small or Large - Hard"; private const string fileName = "SmallOrLarge.csv"; private const string description = "Given an integer n, print “small” if n < 1000 and “large” if n ≥ 2000 (and nothing if 1000 ≤ n < 2000)."; 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.SmallOrLarge) { Name = Name, Description = Description, ProgramExecutionBudget = 30000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 5000, InputArgumentTypes = new[] { ExampleArgumentType.Integer }, OutputArgumentTypes = new[] { ExampleArgumentType.Print }, TrainingCount = 100, TestCount = 1000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.String | DataTypes.Print, MaxSize = 200, EvalLimit = 300, ErcOptions = { ErcProbability = 0.05, IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-10000, 10000)), StringErcOptions = new StringErcOptions( new StringConstantErc("small", "large")) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputInteger = ExampleArgumentConverter.ConvertIntegers(input[0]), OutputPrint = output[0] }; } } }