Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/12 20:15:48 (12 years ago)
Author:
sforsten
Message:

#1980: implemented covering and changed SinglePointCrossover for CombinedIntegerVectorEncoding

Location:
branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3
Files:
2 edited

Legend:

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

    • Property svn:ignore
      •  

        old new  
        11*.user
        22Plugin.cs
         3obj
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystemMainLoop.cs

    r9089 r9090  
    5454    #region private properties
    5555    private SolutionsCreator initialSolutionsCreator;
    56     private SolutionsCreator coveringMechanism;
    5756    private MatchConditionOperator matchConditionOperator;
    5857    private PredictionArrayCalculator predictionArrayCalculator;
    5958    private ActionSelector actionSelector;
     59    private CoveringOperator covering;
    6060
    6161    private Placeholder evaluator;
     
    100100      ConditionalSelector conditionMatchSelector = new ConditionalSelector();
    101101      ConditionalSelector actionMatchSelector = new ConditionalSelector();
    102       SubScopesProcessor coveringSubScopesProcessor = new SubScopesProcessor();
    103       SubScopesCounter matchsetCounter = new SubScopesCounter();
    104       Comparator comparator = new Comparator();
    105       ConditionalBranch coveringConditionalBranch = new ConditionalBranch();
     102      SubScopesProcessor matchSetSubScopesProcessor = new SubScopesProcessor();
     103      CountNumberOfUniqueActions countNumberOfUniqueActions = new CountNumberOfUniqueActions();
     104      covering = new CoveringOperator();
    106105      MergingReducer mergingReducer = new MergingReducer();
    107106      MergingReducer mergingReducerWithSuccessor = new MergingReducer();
    108       coveringMechanism = new SolutionsCreator();
    109107      evaluator = new Placeholder();
    110108      SubScopesProcessor actionSetSubScopesProcessor = new SubScopesProcessor();
     
    137135      conditionMatchSelector.ConditionParameter.ActualName = "MatchCondition";
    138136
    139       matchsetCounter.Name = "Count number of rules in match set";
    140       matchsetCounter.AccumulateParameter.Value = new BoolValue(false);
    141       matchsetCounter.ValueParameter.ActualName = "MatchSetCount";
    142 
    143       comparator.Comparison = new Comparison(ComparisonType.LessOrEqual);
    144       comparator.LeftSideParameter.ActualName = matchsetCounter.ValueParameter.ActualName;
    145       comparator.ResultParameter.ActualName = "Covering";
    146       //more than zero solutions have to be selected
    147       comparator.RightSideParameter.ActualName = "ZeroIntValue";
    148 
    149       coveringConditionalBranch.Name = "Covering Branch";
    150       coveringConditionalBranch.ConditionParameter.ActualName = "Covering";
     137      countNumberOfUniqueActions.ClassifiersParameter.ActualName = "CombinedIntegerVector";
     138
     139      covering.ActionsInMatchSetParameter.ActualName = countNumberOfUniqueActions.UniqueActionsParameter.ActualName;
     140      covering.ParallelParameter.Value.Value = true;
     141      covering.RandomParameter.ActualName = "Random";
    151142
    152143      matchActionSubScopesProcessor.Operator = matchActionOperator;
     
    154145      matchActionOperator.MatchParameter.ActualName = "CombinedIntegerVector";
    155146      matchActionOperator.TargetMatchParameter.ActualName = actionSelector.SelectedActionParameter.ActualName;
    156 
    157       coveringMechanism.NumberOfSolutionsParameter.ActualName = "OneIntValue";
    158147
    159148      predictionArrayCalculator.MatchParameter.ActualName = "CombinedIntegerVector";
     
    211200      //adaptedGeneticAlgorithmMainLoop.Successor = conditionMatchSelector;
    212201
    213       conditionMatchSelector.Successor = coveringSubScopesProcessor;
    214       coveringSubScopesProcessor.Operators.Add(new EmptyOperator());
    215       coveringSubScopesProcessor.Operators.Add(matchsetCounter);
    216       coveringSubScopesProcessor.Successor = mergingReducerWithSuccessor;
    217       matchsetCounter.Successor = comparator;
    218       comparator.Successor = coveringConditionalBranch;
    219       coveringConditionalBranch.TrueBranch = coveringMechanism;
    220       coveringConditionalBranch.FalseBranch = new EmptyOperator();
    221       coveringConditionalBranch.Successor = predictionArrayCalculator;
     202      conditionMatchSelector.Successor = matchSetSubScopesProcessor;
     203      matchSetSubScopesProcessor.Operators.Add(new EmptyOperator());
     204      matchSetSubScopesProcessor.Operators.Add(countNumberOfUniqueActions);
     205      matchSetSubScopesProcessor.Successor = mergingReducerWithSuccessor;
     206      countNumberOfUniqueActions.Successor = covering;
     207      covering.Successor = predictionArrayCalculator;
    222208      predictionArrayCalculator.Successor = actionSelector;
    223209      actionSelector.Successor = matchActionSubScopesProcessor;
     
    253239      initialSolutionsCreator.EvaluatorParameter.ActualName = problem.EvaluatorParameter.Name;
    254240
    255       coveringMechanism.SolutionCreatorParameter.ActualName = problem.SolutionCreatorParameter.Name;
    256       coveringMechanism.EvaluatorParameter.ActualName = problem.EvaluatorParameter.Name;
    257 
    258241      problem.ActionExecuter.SelectedActionParameter.ActualName = actionSelector.SelectedActionParameter.ActualName;
    259242
     
    266249      actionExecuter.OperatorParameter.ActualName = problem.ActionExecuterParameter.Name;
    267250
    268       matchConditionOperator.TargetMatchParameter.ActualName = problem.ClassifierFetcher.CurrentClassifierToMatchParameter.Name;
     251      matchConditionOperator.TargetMatchParameter.ActualName = problem.ClassifierFetcher.CurrentClassifierToMatchParameter.ActualName;
     252
     253      covering.SolutionCreatorParameter.ActualName = problem.CoveringSolutionCreatorParameter.Name;
     254      covering.EvaluatorParameter.ActualName = problem.EvaluatorParameter.Name;
     255      covering.MinimalNumberOfUniqueActionsParameter.ActualName = problem.ThetaMinimalNumberOfActionsParameter.Name;
     256      covering.PossibleActionsParameter.ActualName = problem.PossibleActionsParameter.Name;
    269257
    270258      predictionArrayCalculator.PredictionParameter.ActualName = problem.Evaluator.PredictionParameter.ActualName;
Note: See TracChangeset for help on using the changeset viewer.