Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/ForLoopIndex.cs @ 15428

Last change on this file since 15428 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
RevLine 
[14875]1namespace HeuristicLab.BenchmarkSuite.Problems {
2  public class ForLoopIndex : BenchmarkSuiteDataDescriptor {
[14952]3    private const string name = "For Loop Index - Hard";
[14875]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.";
[14727]6
[14875]7    protected override string FileName { get { return fileName; } }
[14727]8
[14875]9    public override string Name { get { return name; } }
[14727]10
[14875]11    public override string Description { get { return description; } }
[14727]12
[14875]13    protected override int InputArgumentCount { get { return 3; } }
[14727]14
[14875]15    protected override int OutputArgumentCount { get { return 1; } }
[14727]16
[14875]17    public override ProblemData CreateProblemData() {
[15017]18      return new ProblemData(ProblemType.ForLoopIndex) {
[14875]19        Name = Name,
20        Description = Description,
[15334]21        ProgramExecutionBudget = 30000000,
[14875]22        Examples = CloneExamples(),
23        BestResult = 0,
[15334]24        WorstResult = 5000,
[14875]25        InputArgumentTypes = new[] { ExampleArgumentType.Integer, ExampleArgumentType.Integer, ExampleArgumentType.Integer },
[14909]26        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
[14875]27        TrainingCount = 100,
28        TestCount = 1000,
[14897]29        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.String | DataTypes.Print,
[14875]30        MaxSize = 300,
31        EvalLimit = 600,
32      };
33    }
[14727]34
[14875]35    protected override Example ParseExample(string[] input, string[] output) {
36      return new Example {
37        InputArgs = input,
38        OutputArgs = output,
39        InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
[14897]40        OutputPrint = output[0]
[14875]41      };
42    }
43  }
44}
Note: See TracBrowser for help on using the repository browser.