#region License Information
/* HeuristicLab
* Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
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("Lawn mower", "The lawn mower benchmark problem.", Resources.LawnMower),
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("Even parity", "The even parity (4) benchmark problem.", Resources.EvenParity),
new GpdlExampleDataDescriptor("Multiplexer (11)", "The Mux-11 multiplexer benchmark problem.", Resources.Multiplexer),
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."; }
}
}
}