1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using HeuristicLab.Problems.GPDL.Views.Properties;
|
---|
4 | using HeuristicLab.Problems.Instances;
|
---|
5 |
|
---|
6 | namespace 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 | }
|
---|