Changeset 14875 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs
- Timestamp:
- 04/18/17 01:15:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs
r14834 r14875 1 1 namespace HeuristicLab.BenchmarkSuite.Problems { 2 using HeuristicLab.Problems.ProgramSynthesis.Base.Erc; 2 3 3 4 public class CountOdds : BenchmarkSuiteDataDescriptor { 4 5 private const string name = "Count Odds"; 5 6 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)"; 7 8 8 9 protected override string FileName { get { return fileName; } } … … 12 13 protected override int OutputArgumentCount { get { return 1; } } 13 14 14 public override Data CreateProblemData() {15 return new Data {15 public override ProblemData CreateProblemData() { 16 return new ProblemData { 16 17 Name = Name, 17 18 Description = Description, … … 19 20 BestResult = 0, 20 21 WorstResult = 50, 21 InputArgumentTypes = new[] { ExampleArgumentType.Integer Collection},22 InputArgumentTypes = new[] { ExampleArgumentType.IntegerVector }, 22 23 OutputArgumentTypes = new[] { ExampleArgumentType.Integer }, 23 OriginalTestCount = 2000,24 OriginalTrainingCount = 200,24 TestCount = 2000, 25 TrainingCount = 200, 25 26 EnabledDataTypes = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.IntegerVector, 27 MaxSize = 500, 26 28 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 } 28 38 }; 29 39 } … … 33 43 InputArgs = input, 34 44 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]) 37 47 }; 38 48 }
Note: See TracChangeset
for help on using the changeset viewer.