namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc; public class StringLengthsBackwards : BenchmarkSuiteDataDescriptor { private const string name = "String Length Backwards"; private const string fileName = "StringLengthBackwards.csv"; private const string description = "Given a vector of strings, print the length of each string in the vector starting with the last and ending with the first."; 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 { Name = Name, Description = Description, Examples = CloneExamples(), BestResult = 0, WorstResult = 200, InputArgumentTypes = new[] { ExampleArgumentType.StringVector }, OutputArgumentTypes = new[] { ExampleArgumentType.String }, TrainingCount = 100, TestCount = 1000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.String | DataTypes.StringVector, MaxSize = 300, EvalLimit = 600, ErcOptions = { ErcProbability = 0.05, IntegerErcOptions = { IsEnabled = true, Start = -100, End = 100 } } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputStringVector = new[] { ExampleArgumentConverter.ConvertStringVector(input[0]) }, OutputString = output, }; } } }