Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/17 01:15:25 (8 years ago)
Author:
pkimmesw
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs

    r14834 r14875  
    11namespace HeuristicLab.BenchmarkSuite.Problems {
     2  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc;
    23
    34  public class CountOdds : BenchmarkSuiteDataDescriptor {
    45    private const string name = "Count Odds";
    56    private const string fileName = "CountOdds.csv";
    6     private const string description = "";
     7    private const string description = "Given a vector of integers, return the number of integers that are odd, without use of a specific even or odd instruction(but allowing instructions such as mod and quotient)";
    78
    89    protected override string FileName { get { return fileName; } }
     
    1213    protected override int OutputArgumentCount { get { return 1; } }
    1314
    14     public override Data CreateProblemData() {
    15       return new Data {
     15    public override ProblemData CreateProblemData() {
     16      return new ProblemData {
    1617        Name = Name,
    1718        Description = Description,
     
    1920        BestResult = 0,
    2021        WorstResult = 50,
    21         InputArgumentTypes = new[] { ExampleArgumentType.IntegerCollection },
     22        InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector },
    2223        OutputArgumentTypes = new[] { ExampleArgumentType.Integer },
    23         OriginalTestCount = 2000,
    24         OriginalTrainingCount = 200,
     24        TestCount = 2000,
     25        TrainingCount = 200,
    2526        EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.IntegerVector,
     27        MaxSize = 500,
    2628        EvalLimit = 1500,
    27         MaxSize = 500,
     29        ErcOptions = {
     30          ErcProbability = 0.05,
     31          IntegerErcOptions = {
     32            IsEnabled = true,
     33            Constants = new [] { 0, 1, 2},
     34            Start = -1000,
     35            End = 1000
     36          }
     37        }
    2838      };
    2939    }
     
    3343        InputArgs = input,
    3444        OutputArgs = output,
    35         InputInt = ExampleArgumentConverter.ConvertIntegers(input[0]),
    36         OutputInt = ExampleArgumentConverter.ConvertIntegers(output[0])
     45        InputIntegerVector = new[] { ExampleArgumentConverter.ConvertIntegers(input[0]) },
     46        OutputInteger = ExampleArgumentConverter.ConvertIntegers(output[0])
    3747      };
    3848    }
Note: See TracChangeset for help on using the changeset viewer.