Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/MirrorImage.cs @ 17104

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

#2665 Solution Cleanup

File size: 2.1 KB
Line 
1namespace HeuristicLab.BenchmarkSuite.Problems {
2  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Boolean;
3
4  public class MirrorImage : BenchmarkSuiteDataDescriptor {
5    private const string name = "Mirror Image - Medium";
6    private const string fileName = "MirrorImage.csv";
7    private const string description = "Given two vectors of integers, return true if one vector is the reverse of the other, and false otherwise.";
8
9    protected override string FileName { get { return fileName; } }
10    public override string Name { get { return name; } }
11    public override string Description { get { return description; } }
12    protected override int InputArgumentCount { get { return 2; } }
13    protected override int OutputArgumentCount { get { return 1; } }
14
15    public override ProblemData CreateProblemData() {
16      return new ProblemData(ProblemType.MirrorImage) {
17        Name = Name,
18        Description = Description,
19        ProgramExecutionBudget = 30000000,
20        Examples = CloneExamples(),
21        BestResult = 0,
22        WorstResult = 1,
23        InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector, ExampleArgumentType.IntegerVector },
24        OutputArgumentTypes = new[] { ExampleArgumentType.Boolean },
25        TrainingCount = 100,
26        TestCount = 1000,
27        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.IntegerVector,
28        MaxSize = 300,
29        EvalLimit = 600,
30        ErcOptions = {
31          ErcProbability = 0.05,
32          BooleanErcOptions = new BooleanErcOptions(
33            new BooleanRandomErc {
34              AllowFalse = true,
35              AllowTrue = true
36            })
37        }
38      };
39    }
40
41    protected override Example ParseExample(string[] input, string[] output) {
42      return new Example {
43        InputArgs = input,
44        OutputArgs = output,
45        InputIntegerVector = new[] {
46          ExampleArgumentConverter.ConvertIntegers(input[0]),
47          ExampleArgumentConverter.ConvertIntegers(input[1])
48        },
49        OutputBoolean = ExampleArgumentConverter.ConvertBooleans(output[0]),
50      };
51    }
52  }
53}
Note: See TracBrowser for help on using the repository browser.