Changeset 11103


Ignore:
Timestamp:
07/07/14 13:47:52 (5 years ago)
Author:
gkronber
Message:

#2109 merged r10975,r10983,r10984,r10986,r10988,r10989,r10996,r11008 (grammatical evolution) from trunk to stable

Location:
stable
Files:
7 deleted
7 edited
4 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab 3.3.sln

    r10892 r11103  
    7878    {3C906172-E044-4DF0-B4FD-AA21192D5D3E} = {3C906172-E044-4DF0-B4FD-AA21192D5D3E}
    7979    {DC3D7072-7999-4719-B65D-3997744D5DC1} = {DC3D7072-7999-4719-B65D-3997744D5DC1}
     80    {7FC70D74-1813-48B7-9CE5-0BD913457579} = {7FC70D74-1813-48B7-9CE5-0BD913457579}
    8081    {20831A74-D18F-42D9-A667-1CE3AF53DF93} = {20831A74-D18F-42D9-A667-1CE3AF53DF93}
    8182    {76945D76-CA61-4147-9DC2-0ACDCDDF87F9} = {76945D76-CA61-4147-9DC2-0ACDCDDF87F9}
     
    384385EndProject
    385386Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Scripting.Views-3.3", "HeuristicLab.Scripting.Views\3.3\HeuristicLab.Scripting.Views-3.3.csproj", "{0C2917C8-7AA8-4E18-800A-C4D064F992ED}"
     387EndProject
     388Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GrammaticalEvolution-3.3", "HeuristicLab.Problems.GrammaticalEvolution\3.3\HeuristicLab.Problems.GrammaticalEvolution-3.3.csproj", "{7FC70D74-1813-48B7-9CE5-0BD913457579}"
    386389EndProject
    387390Global
     
    18711874    {0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.ActiveCfg = Release|x86
    18721875    {0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.Build.0 = Release|x86
     1876    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     1877    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|Any CPU.Build.0 = Debug|Any CPU
     1878    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x64.ActiveCfg = Debug|x64
     1879    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x64.Build.0 = Debug|x64
     1880    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x86.ActiveCfg = Debug|x86
     1881    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x86.Build.0 = Debug|x86
     1882    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|Any CPU.ActiveCfg = Release|Any CPU
     1883    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|Any CPU.Build.0 = Release|Any CPU
     1884    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x64.ActiveCfg = Release|x64
     1885    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x64.Build.0 = Release|x64
     1886    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x86.ActiveCfg = Release|x86
     1887    {7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x86.Build.0 = Release|x86
    18731888  EndGlobalSection
    18741889  GlobalSection(SolutionProperties) = preSolution
  • stable/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj

    r9472 r11103  
    128128    <EmbeddedResource Include="Documents\GPR.hl" />
    129129    <EmbeddedResource Include="Documents\TS_VRP.hl" />
     130    <EmbeddedResource Include="Documents\GE_ArtificialAnt.hl" />
     131    <EmbeddedResource Include="Documents\GE_SymbReg.hl" />
    130132    <None Include="Plugin.cs.frame" />
    131133    <Compile Include="OptimizerSingleDocumentMainForm.cs">
  • stable/HeuristicLab.Problems.GrammaticalEvolution/3.3/Plugin.cs.frame

    r10988 r11103  
    2828  [Plugin("HeuristicLab.Problems.GrammaticalEvolution","Provides classes for grammatical evolution.", "3.3.0.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.GrammaticalEvolution-3.3.dll", PluginFileType.Assembly)]
    30   [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3130  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3231  [PluginDependency("HeuristicLab.Common", "3.3")]
  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs

    r10864 r11103  
    2828using HeuristicLab.Algorithms.GeneticAlgorithm;
    2929using HeuristicLab.Algorithms.LocalSearch;
     30using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
    3031using HeuristicLab.Algorithms.ParticleSwarmOptimization;
    3132using HeuristicLab.Algorithms.RAPGA;
     
    3637using HeuristicLab.Data;
    3738using HeuristicLab.Encodings.BinaryVectorEncoding;
     39using HeuristicLab.Encodings.IntegerVectorEncoding;
    3840using HeuristicLab.Encodings.PermutationEncoding;
    3941using HeuristicLab.Encodings.RealVectorEncoding;
     
    6264using HeuristicLab.Selection;
    6365using Microsoft.VisualStudio.TestTools.UnitTesting;
     66using StdDevStrategyVectorCreator = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorCreator;
     67using StdDevStrategyVectorCrossover = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorCrossover;
     68using StdDevStrategyVectorManipulator = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorManipulator;
    6469
    6570
     
    11941199    #endregion
    11951200
     1201    #region grammatical evolution
     1202    #region artificial ant
     1203    [TestMethod]
     1204    [TestCategory("Samples.Create")]
     1205    [TestProperty("Time", "medium")]
     1206    public void CreateGeArtificialAntSampleTest() {
     1207      var geaa = CreateGeArtificialAntSample();
     1208      XmlGenerator.Serialize(geaa, @"Samples\GE_ArtificialAnt.hl");
     1209    }
     1210
     1211    [TestMethod]
     1212    [TestCategory("Samples.Execute")]
     1213    [TestProperty("Time", "long")]
     1214    public void RunGeArtificalAntSampleTest() {
     1215      var ga = CreateGeArtificialAntSample();
     1216      ga.SetSeedRandomly.Value = false;
     1217      RunAlgorithm(ga);
     1218    }
     1219
     1220    public OffspringSelectionGeneticAlgorithm CreateGeArtificialAntSample() {
     1221      OffspringSelectionGeneticAlgorithm ga = new OffspringSelectionGeneticAlgorithm();
     1222      #region Problem Configuration
     1223      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem();
     1224      #endregion
     1225      #region Algorithm Configuration
     1226      ga.Name = "Grammatical Evolution - Artificial Ant (SantaFe)";
     1227      ga.Description = "Grammatical evolution algorithm for solving a artificial ant problem";
     1228      ga.Problem = problem;
     1229      ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
     1230        ga, 200, 1, 50, 0.05, 200);
     1231      #endregion
     1232      return ga;
     1233    }
     1234    #endregion
     1235
     1236    #region symbolic regression
     1237    #endregion
     1238    [TestMethod]
     1239    [TestCategory("Samples.Create")]
     1240    [TestProperty("Time", "medium")]
     1241    public void CreateGeSymbolicRegressionSampleTest() {
     1242      var geSymbReg = CreateGeSymbolicRegressionSample();
     1243      XmlGenerator.Serialize(geSymbReg, @"Samples\GE_SymbReg.hl");
     1244    }
     1245
     1246    [TestMethod]
     1247    [TestCategory("Samples.Execute")]
     1248    [TestProperty("Time", "long")]
     1249    public void RunGeSymbolicRegressionSampleTest() {
     1250      var ga = CreateGeSymbolicRegressionSample();
     1251      ga.SetSeedRandomly.Value = false;
     1252      RunAlgorithm(ga);
     1253    }
     1254
     1255    public OffspringSelectionGeneticAlgorithm CreateGeSymbolicRegressionSample() {
     1256      var ga = new OffspringSelectionGeneticAlgorithm();
     1257      #region Problem Configuration
     1258      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem();
     1259
     1260      #endregion
     1261      #region Algorithm Configuration
     1262      ga.Name = "Grammatical Evolution - Symbolic Regression (Poly-10)";
     1263      ga.Description = "Grammatical evolution algorithm for solving a symbolic regression problem problem";
     1264      ga.Problem = problem;
     1265      problem.Load(new PolyTen().GenerateRegressionData());
     1266
     1267      // must occur after loading problem data because the grammar creates symbols for random constants once the data is loaded
     1268      var consts = problem.SymbolicExpressionTreeGrammar.AllowedSymbols.OfType<Constant>().ToList();
     1269      foreach (var c in consts) {
     1270        problem.SymbolicExpressionTreeGrammar.RemoveSymbol(c);
     1271      }
     1272
     1273      ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
     1274        ga, 1000, 1, 50, 0.05, 200);
     1275      #endregion
     1276      return ga;
     1277    }
     1278    #endregion
     1279
    11961280    #region Helpers
    11971281    private void ConfigureEvolutionStrategyParameters<R, M, SC, SR, SM>(EvolutionStrategy es, int popSize, int children, int parentsPerChild, int maxGens, bool plusSelection)
     
    12401324      ga.Seed.Value = 0;
    12411325      ga.SetSeedRandomly.Value = true;
     1326      ga.Selector = ga.SelectorParameter.ValidValues
     1327        .OfType<S>()
     1328        .First();
     1329
     1330      ga.Crossover = ga.CrossoverParameter.ValidValues
     1331        .OfType<C>()
     1332        .First();
     1333
     1334      ga.Mutator = ga.MutatorParameter.ValidValues
     1335        .OfType<M>()
     1336        .First();
     1337
     1338      var tSelector = ga.Selector as TournamentSelector;
     1339      if (tSelector != null) {
     1340        tSelector.GroupSizeParameter.Value.Value = tournGroupSize;
     1341      }
     1342      ga.Engine = new ParallelEngine.ParallelEngine();
     1343    }
     1344
     1345    private void ConfigureOsGeneticAlgorithmParameters<S, C, M>(OffspringSelectionGeneticAlgorithm ga, int popSize, int elites, int maxGens, double mutationRate=0.05, double maxSelPres=100, int tournGroupSize = 0)
     1346      where S : ISelector
     1347      where C : ICrossover
     1348      where M : IManipulator {
     1349      ga.Elites.Value = elites;
     1350      ga.MaximumGenerations.Value = maxGens;
     1351      ga.MutationProbability.Value = mutationRate;
     1352      ga.PopulationSize.Value = popSize;
     1353      ga.MaximumSelectionPressure.Value = maxSelPres;
     1354      ga.Seed.Value = 0;
     1355      ga.SetSeedRandomly.Value = true;
     1356      ga.ComparisonFactorLowerBound.Value = 1;
     1357      ga.ComparisonFactorUpperBound.Value = 1;
     1358
    12421359      ga.Selector = ga.SelectorParameter.ValidValues
    12431360        .OfType<S>()
  • stable/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r10744 r11103  
    122122      <Private>False</Private>
    123123    </Reference>
     124    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     125      <SpecificVersion>False</SpecificVersion>
     126      <HintPath>..\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
     127    </Reference>
    124128    <Reference Include="HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3">
    125129      <HintPath>..\bin\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll</HintPath>
     
    249253      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.dll</HintPath>
    250254      <Private>False</Private>
     255    </Reference>
     256    <Reference Include="HeuristicLab.Problems.GrammaticalEvolution-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     257      <SpecificVersion>False</SpecificVersion>
     258      <HintPath>..\bin\HeuristicLab.Problems.GrammaticalEvolution-3.3.dll</HintPath>
    251259    </Reference>
    252260    <Reference Include="HeuristicLab.Problems.Instances-3.3">
Note: See TracChangeset for help on using the changeset viewer.