1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using HeuristicLab.Problems.GPDL.Views.Properties;
|
---|
25 | using HeuristicLab.Problems.Instances;
|
---|
26 |
|
---|
27 | namespace HeuristicLab.Problems.GPDL.Views {
|
---|
28 | public class GpdlExampleProvider : ProblemInstanceProvider<string> {
|
---|
29 | public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
|
---|
30 | return new IDataDescriptor[]
|
---|
31 | {
|
---|
32 | new GpdlExampleDataDescriptor("Artificial Ant", "The artificial ant problem.", Resources.Artificial_Ant),
|
---|
33 | new GpdlExampleDataDescriptor("Lawn mower", "The lawn mower benchmark problem.", Resources.LawnMower),
|
---|
34 | new GpdlExampleDataDescriptor("Factorial", "Evolve a program to calculate the factorial function.", Resources.Factorial),
|
---|
35 | new GpdlExampleDataDescriptor("Fibonacci", "Evolve a problem to calculate the fibonacci function.", Resources.Fib),
|
---|
36 | new GpdlExampleDataDescriptor("Multi-output multiplier", "Evolve a multi-output multiplier.", Resources.multi_output_multiplier),
|
---|
37 | new GpdlExampleDataDescriptor("Even parity", "The even parity (4) benchmark problem.", Resources.EvenParity),
|
---|
38 | new GpdlExampleDataDescriptor("Multiplexer (11)", "The Mux-11 multiplexer benchmark problem.", Resources.Multiplexer),
|
---|
39 | new GpdlExampleDataDescriptor("Symbolic Regression (HEAL-style)", "A symbolic regression problem for genetic programming, using weights for variables.", Resources.symbreg_HEAL),
|
---|
40 | new GpdlExampleDataDescriptor("Symbolic Regression (Koza-style)", "Koza-style symbolic regression problem for genetic programming.", Resources.symbreg_Koza),
|
---|
41 | };
|
---|
42 | }
|
---|
43 |
|
---|
44 | public override string LoadData(IDataDescriptor descriptor) {
|
---|
45 | var gpdlDescriptor = descriptor as GpdlExampleDataDescriptor;
|
---|
46 | if (gpdlDescriptor == null) throw new ArgumentException("Cannot load this type of problem instance into the GPDL editor.");
|
---|
47 | return gpdlDescriptor.Source;
|
---|
48 | }
|
---|
49 |
|
---|
50 | public override string Name {
|
---|
51 | get { return "GPDL Example Provider"; }
|
---|
52 | }
|
---|
53 |
|
---|
54 | public override string Description {
|
---|
55 | get { return "Provides a set of GPDL definitions for genetic programming problems."; }
|
---|
56 | }
|
---|
57 |
|
---|
58 | public override Uri WebLink {
|
---|
59 | get { return new Uri("http://dev.heuristiclab.com/GPDL"); }
|
---|
60 | }
|
---|
61 |
|
---|
62 | public override string ReferencePublication {
|
---|
63 | 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."; }
|
---|
64 | }
|
---|
65 | }
|
---|
66 | }
|
---|