namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; public class Smallest : BenchmarkSuiteDataDescriptor { private const string name = "Smallest - Easy"; private const string fileName = "Smallest.csv"; private const string description = "Given 4 integers, print the smallest of them."; 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 4; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData(ProblemType.Smallest) { Name = Name, Description = Description, ProgramExecutionBudget = 20000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 1, InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer }, OutputArgumentTypes = new[] { ExampleArgumentType.Print }, TrainingCount = 100, TestCount = 1000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Print, MaxSize = 200, EvalLimit = 200, ErcOptions = { ErcProbability = 0.05, IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-100, 100)), } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputInteger = ExampleArgumentConverter.ConvertIntegers(input), OutputPrint = output[0], // Helper OutputInteger = ExampleArgumentConverter.ConvertIntegers(output[0]), }; } } }