Changeset 14777 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems
- Timestamp:
- 03/23/17 01:11:18 (8 years ago)
- Location:
- branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs
r14744 r14777 1 namespace HeuristicLab.BenchmarkSuite.Problems {2 using System;3 using System.Text;1 //namespace HeuristicLab.BenchmarkSuite.Problems { 2 // using System; 3 // using System.Text; 4 4 5 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 5 // public class Checksum : BenchmarkSuiteDataDescriptor { 6 // private const string name = "Checksum"; 7 // private const string fileName = "Checksum.csv"; 8 // private const string description = ""; 9 // private readonly ExampleArgumentType[] inputArgumentTypes = { ExampleArgumentType.IntegerCollection }; 10 // private readonly ExampleArgumentType[] outputArgumentTypes = { ExampleArgumentType.IntegerCollection }; 6 11 7 [StorableClass] 8 public class Checksum : BenchmarkSuiteDataDescriptor { 9 private const string name = "Checksum"; 10 private const string fileName = "Checksum.csv"; 11 private const string description = ""; 12 public Checksum() { } 12 // public override string Name { get { return name; } } 13 // protected override string FileName { get { return fileName; } } 14 // public override string Description { get { return description; } } 15 // public override ExampleArgumentType[] InputArgumentTypes { get { return inputArgumentTypes; } } 16 // public override ExampleArgumentType[] OutputArgumentTypes { get { return outputArgumentTypes; } } 17 // public override int OriginalTrainingCount { get { return 228; } } 18 // public override int OriginalTestCount { get { return 1254; } } 19 // public override int BestResult { get { return 0; } } 20 // public override int WorstResult { get { return byte.MaxValue; } } 13 21 14 [StorableConstructor] 15 public Checksum(bool deserializing) : base(deserializing) { } 16 17 public override string Name { get { return name; } } 18 protected override string FileName { get { return fileName; } } 19 public override string Description { get { return description; } } 20 public override int InputArgumentCount { get { return 1; } } 21 public override int OutputArgumentCount { get { return 1; } } 22 public override int OriginalTrainingCount { get { return 228; } } 23 public override int OriginalTestCount { get { return 1254; } } 24 public override int BestResult { get { return 0; } } 25 public override int WorstResult { get { return byte.MaxValue; } } 26 27 public override Example ParseExample(string[] input, string[] output) { 28 return new Example { 29 InputArgs = input, 30 OutputArgs = output, 31 InputInt = Array.ConvertAll(Encoding.ASCII.GetBytes(input[0]), c => (long)c), 32 OutputInt = Array.ConvertAll(Encoding.ASCII.GetBytes(output[0]), c => (long)c) 33 }; 34 } 35 } 36 } 22 // public override Example ParseExample(string[] input, string[] output) { 23 // return new Example { 24 // InputArgs = input, 25 // OutputArgs = output, 26 // InputInt = Array.ConvertAll(Encoding.ASCII.GetBytes(input[0]), c => (long)c), 27 // OutputInt = Array.ConvertAll(Encoding.ASCII.GetBytes(output[0]), c => (long)c) 28 // }; 29 // } 30 // } 31 //} -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/CountOdds.cs
r14744 r14777 1 1 namespace HeuristicLab.BenchmarkSuite.Problems { 2 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 2 using HeuristicLab.BenchmarkSuite.ERC; 3 using HeuristicLab.Data; 3 4 4 [StorableClass]5 5 public class CountOdds : BenchmarkSuiteDataDescriptor { 6 6 private const string name = "Count Odds"; 7 7 private const string fileName = "CountOdds.csv"; 8 8 private const string description = ""; 9 private readonly ExampleArgumentType[] inputArgumentTypes = { ExampleArgumentType.IntegerCollection }; 10 private readonly ExampleArgumentType[] outputArgumentTypes = { ExampleArgumentType.Integer }; 9 11 10 public CountOdds() { } 11 12 [StorableConstructor] 13 public CountOdds(bool deserializing) : base(deserializing) { } 12 private readonly DataTypes enabledDataTypeses = DataTypes.Exec | DataTypes.Integer | DataTypes.Boolean | DataTypes.IntegerVector; 13 private readonly ProblemErcOptions problemErcOptions = new ProblemErcOptions { 14 IntegerErcRange = new ErcOptionRange<IntValue>( 15 new IntValue(-1000), 16 new IntValue(1000), 17 new IntValue(0), 18 new IntValue(1), 19 new IntValue(2)) 20 }; 14 21 15 22 public override string Name { get { return name; } } 16 23 public override string Description { get { return description; } } 17 24 protected override string FileName { get { return fileName; } } 18 public override int InputArgumentCount { get { return 1; } }19 public override int OutputArgumentCount { get { return 1; } }25 public override ExampleArgumentType[] InputArgumentTypes { get { return inputArgumentTypes; } } 26 public override ExampleArgumentType[] OutputArgumentTypes { get { return outputArgumentTypes; } } 20 27 public override int OriginalTrainingCount { get { return 200; } } 21 28 public override int OriginalTestCount { get { return 2000; } } 22 29 public override int BestResult { get { return 0; } } 23 30 public override int WorstResult { get { return 50; } } 31 public override ProblemErcOptions ProblemErcOptions { get { return this.problemErcOptions; } } 32 public override DataTypes EnabledDataTypes { get { return this.enabledDataTypeses; } } 33 public override int MaxSize { get { return 500; } } 34 public override int EvalLimit { get { return 1500; } } 35 public override int MaxGenerations { get { return 300; } } 36 public override int ProgEvalBudget { get { return 60000000; } } 24 37 25 38 public override Example ParseExample(string[] input, string[] output) { … … 27 40 InputArgs = input, 28 41 OutputArgs = output, 29 InputInt = ConvertIntegers(input[0]),30 OutputInt = ConvertIntegers(output[0])42 InputInt = ExampleArgumentConverter.ConvertIntegers(input[0]), 43 OutputInt = ExampleArgumentConverter.ConvertIntegers(output[0]) 31 44 }; 32 45 }
Note: See TracChangeset
for help on using the changeset viewer.