Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/13 15:52:54 (12 years ago)
Author:
sforsten
Message:

#1980:

  • change standard parameter settings in ConditionActionClassificationProblem
  • fixed bug: if a parent is copied instead of a crossover, the new individual is inserted in the population correctly
  • added missing attributes to ConditionActionClassificationProblemData
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystemMainLoop.cs

    r9154 r9167  
    5252      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
    5353    }
     54    public IConstrainedValueParameter<IOperator> AfterCopyingParentsParameter {
     55      get { return (IConstrainedValueParameter<IOperator>)Parameters["AfterCopyingParents"]; }
     56    }
    5457    public IConstrainedValueParameter<IOperator> AfterCrossoverParameter {
    5558      get { return (IConstrainedValueParameter<IOperator>)Parameters["AfterCrossover"]; }
     
    101104      test.ChildParameter.ActualName = "CombinedIntegerVector";
    102105      Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions.", new ItemSet<IManipulator>() { new UniformSomePositionManipulator() }, test));
     106      XCSAfterCopyingParentOperator afterCopyingParents = new XCSAfterCopyingParentOperator();
     107      Parameters.Add(new ConstrainedValueParameter<IOperator>("AfterCopyingParents", "", new ItemSet<IOperator>() { new XCSAfterCopyingParentOperator() }, afterCopyingParents));
    103108      XCSAfterCrossoverOperator afterCrossover = new XCSAfterCrossoverOperator();
    104       Parameters.Add(new ConstrainedValueParameter<IOperator>("AfterCrossover", "The operator used to select solutions for reproduction.", new ItemSet<IOperator>() { new XCSAfterCrossoverOperator() }, afterCrossover));
     109      Parameters.Add(new ConstrainedValueParameter<IOperator>("AfterCrossover", "", new ItemSet<IOperator>() { new XCSAfterCrossoverOperator() }, afterCrossover));
    105110      Parameters.Add(new LookupParameter<IntValue>("MaxIterations", "The maximum number of iterations the algorithm will do."));
    106111      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to analyze each generation."));
    107112      #endregion
    108 
    109 
    110       //test
    111       DataReducer testReducer = new DataReducer();
    112       testReducer.TargetParameter.ActualName = "TestCurrentPopulation";
    113       testReducer.ParameterToReduce.ActualName = "Numerosity";
    114       testReducer.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum);
    115       testReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign);
    116113
    117114      #region Create operators
     
    315312      adaptedGeneticAlgorithmMainLoop.MaximizationParameter.Value = new BoolValue(true);
    316313      adaptedGeneticAlgorithmMainLoop.AfterCrossoverParameter.ActualName = AfterCrossoverParameter.Name;
     314      adaptedGeneticAlgorithmMainLoop.AfterCopyingParentsParameter.ActualName = AfterCopyingParentsParameter.Name;
    317315
    318316      currentPopulationSizeCounter.ValueParameter.ActualName = "CurrentPopulationSize";
     
    351349      initialPopulationConditionalBranch.Successor = maxIterationsComparator;
    352350      maxIterationsComparator.Successor = terminationConditionalBranch1;
    353       terminationConditionalBranch1.TrueBranch = finalAnalyzer;
     351      //terminationConditionalBranch1.TrueBranch = finalAnalyzer;
    354352      terminationConditionalBranch1.FalseBranch = classifierFetcher;
    355353      classifierFetcher.Successor = matchCondtionSubScopesProcessor;
     
    410408      //iterationCounter.Successor = maxIterationsComparator;
    411409
    412       iterationCounter.Successor = testReducer;
    413       testReducer.Successor = maxIterationsComparator;
     410      iterationCounter.Successor = finalAnalyzer;
     411      finalAnalyzer.Successor = maxIterationsComparator;
    414412      #endregion
    415413    }
Note: See TracChangeset for help on using the changeset viewer.