Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/SuperAnagrams.cs @ 14875

Last change on this file since 14875 was 14875, checked in by pkimmesw, 7 years ago

#2665 BenchmarkSuite, all examples, partially tested, VectorExpressions added

File size: 2.2 KB
Line 
1namespace HeuristicLab.BenchmarkSuite.Problems {
2  public class SuperAnagrams : BenchmarkSuiteDataDescriptor {
3    private const string name = "Super Anagrams";
4    private const string fileName = "SuperAnagrams.csv";
5    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.";
6
7    protected override string FileName { get { return fileName; } }
8    public override string Name { get { return name; } }
9    public override string Description { get { return description; } }
10    protected override int InputArgumentCount { get { return 2; } }
11    protected override int OutputArgumentCount { get { return 1; } }
12
13    public override ProblemData CreateProblemData() {
14      return new ProblemData {
15        Name = Name,
16        Description = Description,
17        Examples = CloneExamples(),
18        BestResult = 0,
19        WorstResult = 1,
20        InputArgumentTypes = new[] { ExampleArgumentType.String, ExampleArgumentType.String },
21        OutputArgumentTypes = new[] { ExampleArgumentType.Boolean },
22        TrainingCount = 200,
23        TestCount = 2000,
24        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Char | DataTypes.String,
25        MaxSize = 800,
26        EvalLimit = 1600,
27        ErcOptions = {
28          ErcProbability = 0.05,
29          BooleanErcOptions = {
30            IsEnabled = true,
31            AllowFalse = true,
32            AllowTrue = true
33          },
34          IntegerErcOptions = {
35            IsEnabled = true,
36            Start = -1000,
37            End = 1000
38          },
39          CharErcOptions = {
40            IsEnabled = true,
41            Start = 0x20,
42            End = 0x7e
43          }
44        }
45      };
46    }
47
48    protected override Example ParseExample(string[] input, string[] output) {
49      return new Example {
50        InputArgs = input,
51        OutputArgs = output,
52        InputString = input,
53        OutputBoolean = ExampleArgumentConverter.ConvertBooleans(output[0]),
54      };
55    }
56  }
57}
Note: See TracBrowser for help on using the repository browser.