namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Char; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; public class Digits : BenchmarkSuiteDataDescriptor { private const string name = "Digits - Hard"; private const string fileName = "Digits.csv"; private const string description = "Given an integer, print that integer’s digits each on their own line starting with the least significant digit.A negative integer should have the negative sign printed before the most significant digit."; 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.Digits) { 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.Char | DataTypes.String | DataTypes.Print, MaxSize = 300, EvalLimit = 600, ErcOptions = { ErcProbability = 0.05, IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-10, 10)), CharErcOptions = new CharErcOptions( new IntegerConstantErc('\n')) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputInteger = ExampleArgumentConverter.ConvertIntegers(input[0]), OutputPrint = output[0], }; } } }