Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/EvenSquares.cs @ 14909

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

#2665 Fixed VectorExpression errors, Fixed BenchmarkSuite Problem Data View issues

File size: 1.6 KB
RevLine 
[14875]1namespace HeuristicLab.BenchmarkSuite.Problems {
2  public class EvenSquares : BenchmarkSuiteDataDescriptor {
3    private const string name = "Even Sqaures";
4    private const string fileName = "EvenSquares.csv";
5    private const string description = " Given an integer n, print all of the positive even perfect squares less than n on separate lines.";
[14727]6
[14875]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 1; } }
11    protected override int OutputArgumentCount { get { return 1; } }
[14727]12
[14875]13    public override ProblemData CreateProblemData() {
14      return new ProblemData {
15        Name = Name,
16        Description = Description,
17        Examples = CloneExamples(),
18        BestResult = 0,
19        WorstResult = 400,
20        InputArgumentTypes = new[] { ExampleArgumentType.Integer },
[14909]21        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
[14875]22        TrainingCount = 100,
23        TestCount = 1000,
[14897]24        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.Print,
[14875]25        MaxSize = 400,
26        EvalLimit = 2000,
27      };
28    }
[14727]29
[14875]30    protected override Example ParseExample(string[] input, string[] output) {
31      return new Example {
32        InputArgs = input,
33        OutputArgs = output,
34        InputInteger = ExampleArgumentConverter.ConvertIntegers(input),
[14897]35        OutputPrint = output[0],
[14875]36      };
37    }
38  }
39}
Note: See TracBrowser for help on using the repository browser.