Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs @ 16658

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

#2665 Testet Problems, Testet error functions, Small fixes, Created HL files

File size: 1.8 KB
Line 
1namespace HeuristicLab.BenchmarkSuite.Problems {
2  public class ForLoopIndex : BenchmarkSuiteDataDescriptor {
3    private const string name = "For Loop Index - Hard";
4    private const string fileName = "ForLoopIndex.csv";
5    private const string description = "Given 3 integer inputs start,end, and step, print the integers in the sequence n|0 = start, n|i = n|i−1 + step for each n|i < end, each on their own line.";
6
7    protected override string FileName { get { return fileName; } }
8
9    public override string Name { get { return name; } }
10
11    public override string Description { get { return description; } }
12
13    protected override int InputArgumentCount { get { return 3; } }
14
15    protected override int OutputArgumentCount { get { return 1; } }
16
17    public override ProblemData CreateProblemData() {
18      return new ProblemData(ProblemType.ForLoopIndex) {
19        Name = Name,
20        Description = Description,
21        ProgramExecutionBudget = 30000000,
22        Examples = CloneExamples(),
23        BestResult = 0,
24        WorstResult = 5000,
25        InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer },
26        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
27        TrainingCount = 100,
28        TestCount = 1000,
29        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.String | DataTypes.Print,
30        MaxSize = 300,
31        EvalLimit = 600,
32      };
33    }
34
35    protected override Example ParseExample(string[] input, string[] output) {
36      return new Example {
37        InputArgs = input,
38        OutputArgs = output,
39        InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
40        OutputPrint = output[0]
41      };
42    }
43  }
44}
Note: See TracBrowser for help on using the repository browser.