Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/20/13 10:52:38 (11 years ago)
Author:
mkommend
Message:

#1997: Worked on symbolic data analysis island algorithms:

  • Refactored and removed unnecessary code in symbolic island GA and symbolic island GA evaluator.
  • Added EnumerableItem to ease the passing of rows to the actual evaluator.
  • Added prototype of island offspring selection GA.
  • Corrected build configuration (plugin classes, project settings, ...)
Location:
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj

    r9066 r10142  
    5252    <DebugType>pdbonly</DebugType>
    5353    <Optimize>true</Optimize>
    54     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     54    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5555    <DefineConstants>TRACE</DefineConstants>
    5656    <ErrorReport>prompt</ErrorReport>
     
    103103    <Reference Include="HeuristicLab.Analysis-3.3">
    104104      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     105      <Private>False</Private>
    105106    </Reference>
    106107    <Reference Include="HeuristicLab.Collections-3.3">
    107108      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     109      <Private>False</Private>
    108110    </Reference>
    109111    <Reference Include="HeuristicLab.Common-3.3">
    110112      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     113      <Private>False</Private>
    111114    </Reference>
    112115    <Reference Include="HeuristicLab.Core-3.3">
    113116      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     117      <Private>False</Private>
    114118    </Reference>
    115119    <Reference Include="HeuristicLab.Data-3.3">
    116120      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     121      <Private>False</Private>
    117122    </Reference>
    118123    <Reference Include="HeuristicLab.Operators-3.3">
    119124      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     125      <Private>False</Private>
    120126    </Reference>
    121127    <Reference Include="HeuristicLab.Optimization-3.3">
    122128      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     129      <Private>False</Private>
    123130    </Reference>
    124131    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
    125132      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
     133      <Private>False</Private>
    126134    </Reference>
    127135    <Reference Include="HeuristicLab.Parameters-3.3">
    128136      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     137      <Private>False</Private>
    129138    </Reference>
    130139    <Reference Include="HeuristicLab.Persistence-3.3">
    131140      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     141      <Private>False</Private>
    132142    </Reference>
    133143    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    134144      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     145      <Private>False</Private>
    135146    </Reference>
    136147    <Reference Include="HeuristicLab.Random-3.3">
    137148      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     149      <Private>False</Private>
    138150    </Reference>
    139151    <Reference Include="HeuristicLab.Selection-3.3">
    140152      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
     153      <Private>False</Private>
    141154    </Reference>
    142155    <Reference Include="System" />
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs

    r9756 r10142  
    4141  [Creatable("Algorithms")]
    4242  [StorableClass]
    43   public sealed class IslandGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
     43  public class IslandGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
    4444    public string Filename { get; set; }
    4545
     
    5555
    5656    #region Parameter Properties
    57     private ValueParameter<IntValue> SeedParameter {
     57    protected ValueParameter<IntValue> SeedParameter {
    5858      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
    5959    }
    60     private ValueParameter<BoolValue> SetSeedRandomlyParameter {
     60    protected ValueParameter<BoolValue> SetSeedRandomlyParameter {
    6161      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
    6262    }
    63     private ValueParameter<IntValue> NumberOfIslandsParameter {
     63    protected ValueParameter<IntValue> NumberOfIslandsParameter {
    6464      get { return (ValueParameter<IntValue>)Parameters["NumberOfIslands"]; }
    6565    }
    66     private ValueParameter<IntValue> MigrationIntervalParameter {
     66    protected ValueParameter<IntValue> MigrationIntervalParameter {
    6767      get { return (ValueParameter<IntValue>)Parameters["MigrationInterval"]; }
    6868    }
    69     private ValueParameter<PercentValue> MigrationRateParameter {
     69    protected ValueParameter<PercentValue> MigrationRateParameter {
    7070      get { return (ValueParameter<PercentValue>)Parameters["MigrationRate"]; }
    7171    }
     
    7979      get { return (IConstrainedValueParameter<IReplacer>)Parameters["ImmigrationReplacer"]; }
    8080    }
    81     private ValueParameter<IntValue> PopulationSizeParameter {
     81    protected ValueParameter<IntValue> PopulationSizeParameter {
    8282      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
    8383    }
    84     private ValueParameter<IntValue> MaximumGenerationsParameter {
     84    protected ValueParameter<IntValue> MaximumGenerationsParameter {
    8585      get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; }
    8686    }
     
    9191      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
    9292    }
    93     private ValueParameter<PercentValue> MutationProbabilityParameter {
     93    protected ValueParameter<PercentValue> MutationProbabilityParameter {
    9494      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
    9595    }
     
    9797      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
    9898    }
    99     private ValueParameter<IntValue> ElitesParameter {
     99    protected ValueParameter<IntValue> ElitesParameter {
    100100      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
    101101    }
    102     private IFixedValueParameter<BoolValue> ReevaluateElitesParameter {
     102    protected IFixedValueParameter<BoolValue> ReevaluateElitesParameter {
    103103      get { return (IFixedValueParameter<BoolValue>)Parameters["ReevaluateElites"]; }
    104104    }
    105     private ValueParameter<MultiAnalyzer> AnalyzerParameter {
     105    protected ValueParameter<MultiAnalyzer> AnalyzerParameter {
    106106      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
    107107    }
    108     private ValueParameter<MultiAnalyzer> IslandAnalyzerParameter {
     108    protected ValueParameter<MultiAnalyzer> IslandAnalyzerParameter {
    109109      get { return (ValueParameter<MultiAnalyzer>)Parameters["IslandAnalyzer"]; }
    110110    }
     
    184184      set { IslandAnalyzerParameter.Value = value; }
    185185    }
    186     private RandomCreator RandomCreator {
     186    protected RandomCreator RandomCreator {
    187187      get { return (RandomCreator)OperatorGraph.InitialOperator; }
    188188    }
    189     private UniformSubScopesProcessor IslandProcessor {
     189    protected UniformSubScopesProcessor IslandProcessor {
    190190      get { return OperatorGraph.Iterate().OfType<UniformSubScopesProcessor>().First(x => x.Operator is SolutionsCreator); }
    191191    }
    192     private SolutionsCreator SolutionsCreator {
     192    protected SolutionsCreator SolutionsCreator {
    193193      get { return (SolutionsCreator)IslandProcessor.Operator; }
    194194    }
    195     private IslandGeneticAlgorithmMainLoop MainLoop {
     195    protected IslandGeneticAlgorithmMainLoop MainLoop {
    196196      get { return FindMainLoop(IslandProcessor.Successor); }
    197197    }
    198198    [Storable]
    199     private BestAverageWorstQualityAnalyzer islandQualityAnalyzer;
     199    protected BestAverageWorstQualityAnalyzer islandQualityAnalyzer;
    200200    [Storable]
    201     private BestAverageWorstQualityAnalyzer qualityAnalyzer;
     201    protected BestAverageWorstQualityAnalyzer qualityAnalyzer;
    202202    #endregion
    203203
    204204    [StorableConstructor]
    205     private IslandGeneticAlgorithm(bool deserializing) : base(deserializing) { }
     205    protected IslandGeneticAlgorithm(bool deserializing) : base(deserializing) { }
    206206    [StorableHook(HookType.AfterDeserialization)]
    207207    private void AfterDeserialization() {
     
    215215      Initialize();
    216216    }
    217     private IslandGeneticAlgorithm(IslandGeneticAlgorithm original, Cloner cloner)
     217    protected IslandGeneticAlgorithm(IslandGeneticAlgorithm original, Cloner cloner)
    218218      : base(original, cloner) {
    219219      islandQualityAnalyzer = cloner.Clone(original.islandQualityAnalyzer);
     
    422422
    423423    #region Helpers
    424     private void Initialize() {
     424    protected virtual void Initialize() {
    425425      PopulationSizeParameter.ValueChanged += new EventHandler(PopulationSizeParameter_ValueChanged);
    426426      PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
     
    433433      }
    434434    }
    435     private void ParameterizeSolutionsCreator() {
     435    protected virtual void ParameterizeSolutionsCreator() {
    436436      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
    437437      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
    438438    }
    439     private void ParameterizeMainLoop() {
     439    protected virtual void ParameterizeMainLoop() {
    440440      MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
    441441      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
     
    443443      MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    444444    }
    445     private void ParameterizeStochasticOperator(IOperator op) {
     445    protected virtual void ParameterizeStochasticOperator(IOperator op) {
    446446      IStochasticOperator stochasticOp = op as IStochasticOperator;
    447447      if (stochasticOp != null) {
     
    450450      }
    451451    }
    452     private void ParameterizeStochasticOperatorForIsland(IOperator op) {
     452    protected virtual void ParameterizeStochasticOperatorForIsland(IOperator op) {
    453453      IStochasticOperator stochasticOp = op as IStochasticOperator;
    454454      if (stochasticOp != null) {
     
    457457      }
    458458    }
    459     private void ParameterizeSelectors() {
     459    protected virtual void ParameterizeSelectors() {
    460460      foreach (ISelector selector in SelectorParameter.ValidValues) {
    461461        selector.CopySelected = new BoolValue(true);
     
    494494      }
    495495    }
    496     private void ParameterizeAnalyzers() {
     496    protected virtual void ParameterizeAnalyzers() {
    497497      islandQualityAnalyzer.ResultsParameter.ActualName = "Results";
    498498      islandQualityAnalyzer.ResultsParameter.Hidden = true;
     
    517517      }
    518518    }
    519     private void ParameterizeIterationBasedOperators() {
     519    protected virtual void ParameterizeIterationBasedOperators() {
    520520      if (Problem != null) {
    521521        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
     
    527527      }
    528528    }
    529     private void UpdateCrossovers() {
     529    protected virtual void UpdateCrossovers() {
    530530      ICrossover oldCrossover = CrossoverParameter.Value;
    531531      ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault();
     
    543543        CrossoverParameter.Value = defaultCrossover;
    544544    }
    545     private void UpdateMutators() {
     545    protected virtual void UpdateMutators() {
    546546      IManipulator oldMutator = MutatorParameter.Value;
    547547      MutatorParameter.ValidValues.Clear();
     
    555555      }
    556556    }
    557     private void UpdateAnalyzers() {
     557    protected virtual void UpdateAnalyzers() {
    558558      IslandAnalyzer.Operators.Clear();
    559559      Analyzer.Operators.Clear();
     
    568568      Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
    569569    }
    570     private IslandGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
     570    protected virtual IslandGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
    571571      IOperator mainLoop = start;
    572572      while (mainLoop != null && !(mainLoop is IslandGeneticAlgorithmMainLoop))
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Plugin.cs.frame

    r9756 r10142  
    2626  /// Plugin class for HeuristicLab.Algorithms.GeneticAlgorithm plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Algorithms.GeneticAlgorithm", "3.3.8.$WCREV$")]
     28  [Plugin("HeuristicLab.Algorithms.GeneticAlgorithm", "3.3.9.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Analysis", "3.3")]
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Properties/AssemblyInfo.cs.frame

    r9756 r10142  
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.3.0.0")]
    55 [assembly: AssemblyFileVersion("3.3.8.$WCREV$")]
     55[assembly: AssemblyFileVersion("3.3.9.$WCREV$")]
Note: See TracChangeset for help on using the changeset viewer.