namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Float; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; public class NumberIO : BenchmarkSuiteDataDescriptor { private const string name = "NumberIO - Easy"; private const string fileName = "NumberIO.csv"; private const string description = "Given an integer and a float, calc their sum."; 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 { Name = Name, Description = Description, Examples = CloneExamples(), BestResult = 0, WorstResult = 400, InputArgumentTypes = new[] { ExampleArgumentType.Float, ExampleArgumentType.Integer }, OutputArgumentTypes = new[] { ExampleArgumentType.Float }, TrainingCount = 25, TestCount = 1000, EnabledDataTypes = DataTypes.Integer | DataTypes.Float | DataTypes.Print, EvalLimit = 200, MaxSize = 200, ErcOptions = { ErcProbability = 0.01, IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-100, 100)), FloatErcOptions = new FloatErcOptions( new FloatRangeErc(-100, 100)) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputFloat = ExampleArgumentConverter.ConvertDoubles(input[0]), InputInteger = ExampleArgumentConverter.ConvertIntegers(input[1]), OutputFloat = ExampleArgumentConverter.ConvertDoubles(output[0]), //OutputPrint = output[0] }; } } }