Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/10/17 21:36:03 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed small issues, testet benchmark suite, added INX Expressions

Location:
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite
Files:
4 edited

Legend:

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

    r15017 r15189  
    3030    protected abstract Example ParseExample(string[] input, string[] output);
    3131
    32     //private IEnumerable<Example> ParseData() {
    33     //  using (var file = GetType().Assembly.GetManifestResourceStream(InstanceArchiveName))
    34     //  using (var archive = new ZipArchive(file, ZipArchiveMode.Read)) {
    35     //    var entry = archive.Entries.SingleOrDefault(x => x.Name == FileName);
    36 
    37     //    using (var parser = new TextFieldParser(entry.Open())) {
    38     //      parser.TextFieldType = FieldType.Delimited;
    39     //      parser.SetDelimiters(ExampleFieldDelimiter);
    40     //      parser.HasFieldsEnclosedInQuotes = true;
    41     //      parser.TrimWhiteSpace = false;
    42 
    43     //      //Processing rows
    44     //      while (!parser.EndOfData) {
    45     //        var fields = parser.ReadFields();
    46 
    47     //        if (fields.Length != InputArgumentCount + OutputArgumentCount)
    48     //          throw new InvalidDataException("Number of values do not fit");
    49 
    50     //        var input = fields.Take(InputArgumentCount).ToArray();
    51     //        var output = fields.Skip(InputArgumentCount).ToArray();
    52 
    53     //        yield return ParseExample(input, output);
    54     //      }
    55     //    }
    56     //  }
    57     //}
    58 
    5932    private IEnumerable<Example> ParseData() {
    6033      using (var file = GetType().Assembly.GetManifestResourceStream(InstanceArchiveName))
     
    6942            var output = line.Skip(InputArgumentCount).ToArray();
    7043
    71             yield return ParseExample(input, output);
     44            var example = ParseExample(input, output);
     45
     46            yield return example;
    7247          }
    7348        }
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ProblemData.cs

    r15017 r15189  
    3434      ErcOptions = cloner.Clone(origin.ErcOptions);
    3535      FloatStringFormat = origin.FloatStringFormat;
     36      ProblemType = origin.ProblemType;
    3637    }
    3738
     
    5152    [Storable]
    5253    public ExampleArgumentType[] OutputArgumentTypes { get; set; }
     54
     55    public int TotalIntputArgumentCount { get { return InputArgumentTypes.Length; } }
     56    public int TotalOutputArgumentCount { get { return OutputArgumentTypes.Length; } }
    5357    public int TotalArgumentCount { get { return InputArgumentTypes.Length + OutputArgumentTypes.Length; } }
     58
    5459    [Storable]
    5560    public Example[] Examples { get; set; }
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/Checksum.cs

    r15017 r15189  
    22  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Char;
    33  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.Integer;
     4  using HeuristicLab.Problems.ProgramSynthesis.Base.Erc.String;
    45
    56  public class Checksum : BenchmarkSuiteDataDescriptor {
     
    3536          CharErcOptions = new CharErcOptions(
    3637            new IntegerConstantErc(' '),
    37             new IntegerRangeErc(0x20, 0x7e))
     38            new IntegerRangeErc(0x20, 0x7e)),
     39          StringErcOptions = new StringErcOptions(
     40            new StringConstantErc("Check sum is "))
    3841        }
    3942      };
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Problems/NumberIo.cs

    r15032 r15189  
    2424        WorstResult = 400,
    2525        InputArgumentTypes = new[] { ExampleArgumentType.Float, ExampleArgumentType.Integer },
    26         OutputArgumentTypes = new[] { ExampleArgumentType.Float },
     26        OutputArgumentTypes = new[] { ExampleArgumentType.Print },
    2727        TrainingCount = 25,
    2828        TestCount = 1000,
    29         EnabledDataTypes = DataTypes.Integer | DataTypes.Float, // | DataTypes.Print,
     29        EnabledDataTypes = DataTypes.Integer | DataTypes.Float | DataTypes.Print,
    3030        EvalLimit = 200,
    3131        MaxSize = 200,
     
    4848        InputInteger = ExampleArgumentConverter.ConvertIntegers(input[1]),
    4949        OutputFloat = ExampleArgumentConverter.ConvertDoubles(output),
    50         //OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
     50        OutputPrint = estimedFloatValue.ToString("R", CultureInfo.InvariantCulture),
    5151      };
    5252    }
Note: See TracChangeset for help on using the changeset viewer.