namespace HeuristicLab.BenchmarkSuite.Problems { using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Boolean; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Char; using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer; public class SuperAnagrams : BenchmarkSuiteDataDescriptor { private const string name = "Super Anagrams - Hard"; private const string fileName = "SuperAnagrams.csv"; private const string description = "Given strings x and y of lowercase letters, return true if y is a super anagram of x, which is the case if every character in x is in y.To be true, y may contain extra characters, but must have at least as many copies of each character as x does."; 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(ProblemType.SuperAnagrams) { Name = Name, Description = Description, ProgramExecutionBudget = 60000000, Examples = CloneExamples(), BestResult = 0, WorstResult = 1, InputArgumentTypes = new[] { ExampleArgumentType.String, ExampleArgumentType.String }, OutputArgumentTypes = new[] { ExampleArgumentType.Boolean }, TrainingCount = 200, TestCount = 2000, EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Char | DataTypes.String, MaxSize = 800, EvalLimit = 1600, ErcOptions = { ErcProbability = 0.05, BooleanErcOptions = new BooleanErcOptions( new BooleanRandomErc { IsEnabled = true, AllowFalse = true, AllowTrue = true }), IntegerErcOptions = new IntegerErcOptions( new IntegerRangeErc(-1000, 1000)), CharErcOptions = new CharErcOptions( new IntegerRangeErc(0x20, 0x7e)) } }; } protected override Example ParseExample(string[] input, string[] output) { return new Example { InputArgs = input, OutputArgs = output, InputString = input, OutputBoolean = ExampleArgumentConverter.ConvertBooleans(output[0]), }; } } }