Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlExampleProvider.cs @ 9519

Last change on this file since 9519 was 9519, checked in by gkronber, 11 years ago

#2026 worked on GPDL integration into HL.
Implemented problem provider for examples. Implemented editor for GPDL definitions.

File size: 2.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using HeuristicLab.Problems.GPDL.Views.Properties;
4using HeuristicLab.Problems.Instances;
5
6namespace HeuristicLab.Problems.GPDL.Views {
7  public class GpdlExampleProvider : ProblemInstanceProvider<string> {
8    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
9      return new IDataDescriptor[]
10        {
11          new GpdlExampleDataDescriptor("Artificial Ant", "The artificial ant problem.", Resources.Artificial_Ant),
12          new GpdlExampleDataDescriptor("Factorial", "Evolve a program to calculate the factorial function.", Resources.Factorial),
13          new GpdlExampleDataDescriptor("Fibonacci", "Evolve a problem to calculate the fibonacci function.", Resources.Fib),
14          new GpdlExampleDataDescriptor("Multi-output multiplier", "Evolve a multi-output multiplier.", Resources.multi_output_multiplier),
15          new GpdlExampleDataDescriptor("Symbolic Regression (HEAL-style)", "A symbolic regression problem for genetic programming, using weights for variables.", Resources.symbreg_HEAL),
16          new GpdlExampleDataDescriptor("Symbolic Regression (Koza-style)", "Koza-style symbolic regression problem for genetic programming.", Resources.symbreg_Koza),
17        };
18    }
19
20    public override string LoadData(IDataDescriptor descriptor) {
21      var gpdlDescriptor = descriptor as GpdlExampleDataDescriptor;
22      if (gpdlDescriptor == null) throw new ArgumentException("Cannot load this type of problem instance into the GPDL editor.");
23      return gpdlDescriptor.Source;
24    }
25
26    public override string Name {
27      get { return "GPDL Example Provider"; }
28    }
29
30    public override string Description {
31      get { return "Provides a set of GPDL definitions for genetic programming problems."; }
32    }
33
34    public override Uri WebLink {
35      get { return new Uri("http://dev.heuristiclab.com/GPDL"); }
36    }
37
38    public override string ReferencePublication {
39      get { return "Kronberger G., Kommenda M., Wagner S., Dobler H. - GPDL: A Framework-Independent Problem Definition Language for Grammar Guided Genetic Programming. In GECCO'13 Companion, July 6-10, 2013, Amsterdam, ACM."; }
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.