Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/05/13 13:12:54 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added be project Optimization.Operators.LCS
  • added default rule strategies for GAssist
Location:
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3

    • Property svn:ignore set to
      *.user
      Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs

    r9334 r9342  
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Optimization.Operators;
     31using HeuristicLab.Optimization.Operators.LCS;
    3132using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    203204      Parameters.Add(new FixedValueParameter<PercentValue>("MergeProbability", "", new PercentValue(0.05)));
    204205      Parameters.Add(new FixedValueParameter<PercentValue>("StartReinitializeProbability", "", new PercentValue(0.05)));
    205       Parameters.Add(new FixedValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue(0.0)));
     206      Parameters.Add(new FixedValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue(Double.Epsilon)));
    206207      Parameters.Add(new FixedValueParameter<PercentValue>("OneProbability", "", new PercentValue(0.75)));
    207208      Parameters.Add(new FixedValueParameter<IntValue>("MaximumNumberOfIntervals", "", new IntValue(5)));
     
    248249      mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name;
    249250      mainLoop.ResultsParameter.ActualName = "Results";
     251      mainLoop.ReinitializationProbabilityOperatorParameter.ActualName = ReinitializeCurveOperatorParameter.Name;
    250252
    251253      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
     
    259261      UpdateAnalyzers();
    260262
    261       foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
     263      foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name)) {
    262264        ReinitializeCurveOperatorParameter.ValidValues.Add(op);
     265      }
     266      ReinitializeCurveOperatorParameter.Value = ReinitializeCurveOperatorParameter.ValidValues.First(x => x.GetType().Equals(typeof(LinearDiscreteDoubleValueModifier)));
    263267      ParameterizeReinitializeCurveOperators();
    264268
     
    295299      var splitOperator = new SplitOperator();
    296300      splitOperator.ProbabilityParameter.ActualName = "SplitProbability";
     301      //change
     302      splitOperator.IndividualParameter.ActualName = "DecisionList";
    297303      SpecialStages.Operators.Add(splitOperator);
    298304      var mergeOperator = new MergeOperator();
    299305      mergeOperator.ProbabilityParameter.ActualName = "MergeProbability";
     306      //change
     307      mergeOperator.IndividualParameter.ActualName = "DecisionList";
    300308      SpecialStages.Operators.Add(mergeOperator);
    301309      var reinitializeOperator = new ReinitializeOperator();
     
    303311      reinitializeOperator.DiscretizersParameter.ActualName = "Discretizers";
    304312      reinitializeOperator.OneProbabilityParameter.ActualName = "OneProbability";
     313      //change
     314      reinitializeOperator.IndividualParameter.ActualName = "DecisionList";
    305315      SpecialStages.Operators.Add(reinitializeOperator);
    306316      foreach (var op in SpecialStages.Operators) {
     
    477487      IManipulator oldMutator = MutatorParameter.Value;
    478488      MutatorParameter.ValidValues.Clear();
     489      IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault();
     490
    479491      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
    480492        MutatorParameter.ValidValues.Add(mutator);
     
    483495        if (mutator != null) MutatorParameter.Value = mutator;
    484496      }
     497      if (oldMutator == null && defaultMutator != null)
     498        MutatorParameter.Value = defaultMutator;
    485499    }
    486500    private void UpdateAnalyzers() {
Note: See TracChangeset for help on using the changeset viewer.