using System; using System.Collections.Generic; using HeuristicLab.Problems.GPDL.Views.Properties; using HeuristicLab.Problems.Instances; namespace HeuristicLab.Problems.GPDL.Views { public class GpdlExampleProvider : ProblemInstanceProvider { public override IEnumerable GetDataDescriptors() { return new IDataDescriptor[] { new GpdlExampleDataDescriptor("Artificial Ant", "The artificial ant problem.", Resources.Artificial_Ant), new GpdlExampleDataDescriptor("Factorial", "Evolve a program to calculate the factorial function.", Resources.Factorial), new GpdlExampleDataDescriptor("Fibonacci", "Evolve a problem to calculate the fibonacci function.", Resources.Fib), new GpdlExampleDataDescriptor("Multi-output multiplier", "Evolve a multi-output multiplier.", Resources.multi_output_multiplier), new GpdlExampleDataDescriptor("Symbolic Regression (HEAL-style)", "A symbolic regression problem for genetic programming, using weights for variables.", Resources.symbreg_HEAL), new GpdlExampleDataDescriptor("Symbolic Regression (Koza-style)", "Koza-style symbolic regression problem for genetic programming.", Resources.symbreg_Koza), }; } public override string LoadData(IDataDescriptor descriptor) { var gpdlDescriptor = descriptor as GpdlExampleDataDescriptor; if (gpdlDescriptor == null) throw new ArgumentException("Cannot load this type of problem instance into the GPDL editor."); return gpdlDescriptor.Source; } public override string Name { get { return "GPDL Example Provider"; } } public override string Description { get { return "Provides a set of GPDL definitions for genetic programming problems."; } } public override Uri WebLink { get { return new Uri("http://dev.heuristiclab.com/GPDL"); } } public override string ReferencePublication { 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."; } } } }