Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/03/13 14:39:36 (11 years ago)
Author:
mkommend
Message:

#2038: Added reevaluation of elites in ES, IslandGA, IslandOSGA, OSGA, SASEGASA, and RAPGA.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs

    r9456 r9569  
    7373      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
    7474    }
     75    public IValueLookupParameter<BoolValue> ReevaluateElitesParameter {
     76      get { return (IValueLookupParameter<BoolValue>)Parameters["ReevaluateElites"]; }
     77    }
    7578    public ValueLookupParameter<ResultCollection> ResultsParameter {
    7679      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     
    134137      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
    135138      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
     139      Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
    136140      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results."));
    137141      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the villages."));
     
    236240      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
    237241      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
     242      mainOperator.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name;
    238243      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
    239244      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
     
    424429    }
    425430
     431    [StorableHook(HookType.AfterDeserialization)]
     432    private void AfterDeserialization() {
     433      if (!Parameters.ContainsKey("ReevaluateElites")) {
     434        Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
     435      }
     436    }
     437
    426438    public override IOperation Apply() {
    427439      if (CrossoverParameter.ActualValue == null)
Note: See TracChangeset for help on using the changeset viewer.