namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Boolean; public class CompareStringLengths : BenchmarkSuiteDataDescriptor { private const string name = "Compare String Lengths - Hard"; private const string fileName = "CompareStringLengths.csv"; private const string description = " Given three strings n1, n2, and n3, return true if length(n1) < length(n2) < length(n3), and false otherwise"; 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 3; } } protected override int OutputArgumentCount { get { return 1; } } public override ProblemData CreateProblemData() { return new ProblemData(ProblemType.CompareStringLengths) { Name = Name, Description = Description, ProgramExecutionBudget = 30000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 1, InputArgumentTypes = new[] { ExampleArgumentType.String, ExampleArgumentType.String, ExampleArgumentType.String }, OutputArgumentTypes = new[] { ExampleArgumentType.Boolean }, TrainingCount = 100, TestCount = 1000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.String, MaxSize = 400, EvalLimit = 600, ErcOptions = { ErcProbability = 0.05, BooleanErcOptions = new BooleanErcOptions( new BooleanRandomErc { AllowTrue = true, AllowFalse = true }) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputString = input, OutputBoolean = ExampleArgumentConverter.ConvertBooleans(output[0]) }; } } }