Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/04/14 14:26:02 (10 years ago)
Author:
bburlacu
Message:

#1772: Implemented generic genealogy analyzer (should work with any encoding provided the proper wiring is performed in the problem class), and before/after operators for creation, mutation and crossover.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r10269 r10278  
    332332    </ProjectReference>
    333333  </ItemGroup>
     334  <ItemGroup>
     335    <Folder Include="Tracking\" />
     336  </ItemGroup>
    334337  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    335338  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r9830 r10278  
    2828using HeuristicLab.Data;
    2929using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     30using HeuristicLab.EvolutionTracking;
    3031using HeuristicLab.Optimization;
    3132using HeuristicLab.Parameters;
     
    3334using HeuristicLab.PluginInfrastructure;
    3435using HeuristicLab.Problems.Instances;
     36
     37using TGraph = HeuristicLab.EvolutionTracking.IGenealogyGraph<HeuristicLab.EvolutionTracking.GenealogyGraphNode<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>,
     38                                                              HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;
     39using TVertex = HeuristicLab.EvolutionTracking.GenealogyGraphNode<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;
    3540
    3641namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    231236      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
    232237      Operators.Add(new SymbolicExpressionTreeLengthAnalyzer());
     238      Operators.Add(new GenealogyAnalyzer<TGraph, TVertex, ISymbolicExpressionTree>());
    233239      ParameterizeOperators();
    234240    }
     
    350356        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
    351357      }
     358      // add tracking analyzer
     359      foreach (var op in operators.OfType<GenealogyAnalyzer<TGraph, TVertex, ISymbolicExpressionTree>>()) {
     360        var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().First();
     361        op.CrossoverParentsParameterName = crossover.ParentsParameter.Name;
     362        op.CrossoverChildParameterName = crossover.ChildParameter.Name;
     363        var manipulator = operators.OfType<ISymbolicExpressionTreeManipulator>().First();
     364        op.ManipulatorChildParameterName = manipulator.SymbolicExpressionTreeParameter.Name;
     365        var creator = operators.OfType<ISymbolicExpressionTreeCreator>().First();
     366        op.SolutionCreatorIndividualParameterName = creator.SymbolicExpressionTreeParameter.Name;
     367      }
    352368    }
    353369
Note: See TracChangeset for help on using the changeset viewer.