Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/17 01:11:18 (8 years ago)
Author:
pkimmesw
Message:

#2665 simplifier, push solution results view, performance improvements, small bug fixes, ui fixes

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;
    44
    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 };
    611
    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; } }
    1321
    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  
    11namespace HeuristicLab.BenchmarkSuite.Problems {
    2   using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     2  using HeuristicLab.BenchmarkSuite.ERC;
     3  using HeuristicLab.Data;
    34
    4   [StorableClass]
    55  public class CountOdds : BenchmarkSuiteDataDescriptor {
    66    private const string name = "Count Odds";
    77    private const string fileName = "CountOdds.csv";
    88    private const string description = "";
     9    private readonly ExampleArgumentType[] inputArgumentTypes = { ExampleArgumentType.IntegerCollection };
     10    private readonly ExampleArgumentType[] outputArgumentTypes = { ExampleArgumentType.Integer };
    911
    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    };
    1421
    1522    public override string Name { get { return name; } }
    1623    public override string Description { get { return description; } }
    1724    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; } }
    2027    public override int OriginalTrainingCount { get { return 200; } }
    2128    public override int OriginalTestCount { get { return 2000; } }
    2229    public override int BestResult { get { return 0; } }
    2330    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; } }
    2437
    2538    public override Example ParseExample(string[] input, string[] output) {
     
    2740        InputArgs = input,
    2841        OutputArgs = output,
    29         InputInt = ConvertIntegers(input[0]),
    30         OutputInt = ConvertIntegers(output[0])
     42        InputInt = ExampleArgumentConverter.ConvertIntegers(input[0]),
     43        OutputInt = ExampleArgumentConverter.ConvertIntegers(output[0])
    3144      };
    3245    }
Note: See TracChangeset for help on using the changeset viewer.