#region License Information
/* HeuristicLab
* Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
using HeuristicLab.Common;
using HeuristicLab.Core;
using HeuristicLab.Data;
using HeuristicLab.Encodings.ConditionActionEncoding;
using HeuristicLab.Operators;
using HeuristicLab.Optimization.Operators;
using HeuristicLab.Parameters;
using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
using HeuristicLab.Selection;
namespace HeuristicLab.Algorithms.LearningClassifierSystems {
///
/// An operator which represents the main loop of a learning classifier system.
///
[Item("LearningClassifierSystemMainLoop", "An operator which represents the main loop of a learning classifier system.")]
[StorableClass]
public sealed class LearningClassifierSystemMainLoop : AlgorithmOperator {
private const string HASTOBEDELETED = "HasToBeDeleted";
private const string HASBEENSUBSUMED = "HasBeenSubsumed";
#region Parameter Properties
public ValueLookupParameter SelectorParameter {
get { return adaptedGeneticAlgorithmMainLoop.SelectorParameter; }
}
public ValueLookupParameter CrossoverProbabilityParameter {
get { return adaptedGeneticAlgorithmMainLoop.CrossoverProbabilityParameter; }
}
public ValueLookupParameter CrossoverParameter {
get { return adaptedGeneticAlgorithmMainLoop.CrossoverParameter; }
}
public ValueLookupParameter MutatorParameter {
get { return adaptedGeneticAlgorithmMainLoop.MutatorParameter; }
}
public IConstrainedValueParameter AfterCopyingParentsParameter {
get { return (IConstrainedValueParameter)Parameters["AfterCopyingParents"]; }
}
public IConstrainedValueParameter AfterCrossoverParameter {
get { return (IConstrainedValueParameter)Parameters["AfterCrossover"]; }
}
public LookupParameter MaxIterationsParameter {
get { return (LookupParameter)Parameters["MaxIterations"]; }
}
public ValueLookupParameter AnalyzerParameter {
get { return (ValueLookupParameter)Parameters["Analyzer"]; }
}
public ValueLookupParameter FinalAnalyzerParameter {
get { return (ValueLookupParameter)Parameters["FinalAnalyzer"]; }
}
public ValueLookupParameter AnalyzeInIterationParameter {
get { return (ValueLookupParameter)Parameters["AnalyzeInIteration"]; }
}
#endregion
#region private properties
private SolutionsCreator initialSolutionsCreator;
private MatchConditionOperator matchConditionOperator;
private PredictionArrayCalculator predictionArrayCalculator;
private ActionSelector actionSelector;
private DoDeletionBeforeCoveringOperator doDeletionBeforeCovering;
private CoveringOperator covering;
private CountNumberOfUniqueActions countNumberOfUniqueActions;
private MatchActionOperator matchActionOperator;
private InsertInPopulationOperator insertInPopulation;
private LCSAdaptedGeneticAlgorithm adaptedGeneticAlgorithmMainLoop;
private Placeholder evaluator;
private Placeholder actionExecuter;
private Placeholder classifierFetcher;
private Placeholder actionSetSubsumption;
#endregion
[StorableConstructor]
private LearningClassifierSystemMainLoop(bool deserializing) : base(deserializing) { }
private LearningClassifierSystemMainLoop(LearningClassifierSystemMainLoop original, Cloner cloner)
: base(original, cloner) {
}
public override IDeepCloneable Clone(Cloner cloner) {
return new LearningClassifierSystemMainLoop(this, cloner);
}
public LearningClassifierSystemMainLoop()
: base() {
Initialize();
}
private void Initialize() {
#region Create parameters
Parameters.Add(new ValueLookupParameter("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
XCSAfterCopyingParentOperator afterCopyingParents = new XCSAfterCopyingParentOperator();
Parameters.Add(new ConstrainedValueParameter("AfterCopyingParents", "", new ItemSet() { new XCSAfterCopyingParentOperator() }, afterCopyingParents));
XCSAfterCrossoverOperator afterCrossover = new XCSAfterCrossoverOperator();
Parameters.Add(new ConstrainedValueParameter("AfterCrossover", "", new ItemSet() { new XCSAfterCrossoverOperator() }, afterCrossover));
Parameters.Add(new LookupParameter("MaxIterations", "The maximum number of iterations the algorithm will do."));
Parameters.Add(new ValueLookupParameter("Analyzer", "The operator used to analyze each generation."));
Parameters.Add(new ValueLookupParameter("FinalAnalyzer", "The operator used to analyze the last generation."));
Parameters.Add(new ValueLookupParameter("AnalyzeInIteration", ""));
#endregion
#region Create operators
VariableCreator variableCreator = new VariableCreator();
ResultsCollector resultsCollector = new ResultsCollector();
ModuloOperator moduloOperator = new ModuloOperator();
Comparator analyzerComparator = new Comparator();
ConditionalBranch analyzerConditionalBranch = new ConditionalBranch();
Placeholder analyzer = new Placeholder();
Placeholder finalAnalyzer = new Placeholder();
ConditionalBranch initialPopulationConditionalBranch = new ConditionalBranch();
initialSolutionsCreator = new SolutionsCreator();
Assigner initialPopulationSizeAssigner = new Assigner();
Comparator maxIterationsComparator = new Comparator();
ConditionalBranch terminationConditionalBranch1 = new ConditionalBranch();
IntCounter iterationCounter = new IntCounter();
UniformSubScopesProcessor matchCondtionSubScopesProcessor = new UniformSubScopesProcessor();
matchConditionOperator = new MatchConditionOperator();
predictionArrayCalculator = new PredictionArrayCalculator();
actionSelector = new ActionSelector();
UniformSubScopesProcessor matchActionSubScopesProcessor = new UniformSubScopesProcessor();
matchActionOperator = new MatchActionOperator();
ConditionalSelector conditionMatchSelector = new ConditionalSelector();
ConditionalSelector actionMatchSelector = new ConditionalSelector();
SubScopesProcessor matchSetSubScopesProcessor = new SubScopesProcessor();
countNumberOfUniqueActions = new CountNumberOfUniqueActions();
doDeletionBeforeCovering = new DoDeletionBeforeCoveringOperator();
ConditionalBranch doDeletionBeforeCoveringConditionalBranch = new ConditionalBranch();
XCSDeletionOperator deletionOperator = new XCSDeletionOperator();
ConditionalSelector deletionSelector = new ConditionalSelector();
LeftReducer leftReducerAfterDeletionSelection = new LeftReducer();
covering = new CoveringOperator();
MergingReducer actionSetMergingReducer = new MergingReducer();
MergingReducer matchSetMergingReducer = new MergingReducer();
evaluator = new Placeholder();
SubScopesProcessor actionSetSubScopesProcessor = new SubScopesProcessor();
DataReducer actionSetSizeDataReducer = new DataReducer();
UniformSubScopesProcessor accuracySubScopesProcessor = new UniformSubScopesProcessor();
CalculateAccuracy calculateAccuracy = new CalculateAccuracy();
SumAccuracy sumAccuracy = new SumAccuracy();
UniformSubScopesProcessor updateParametersSubScopesProcessor = new UniformSubScopesProcessor();
ConditionalBranch actionSetSubsumptionBranch = new ConditionalBranch();
UniformSubScopesProcessor setSubsumedToFalseSubScopeProcessor = new UniformSubScopesProcessor();
Assigner setSubsumedToFalseAssigner = new Assigner();
ConditionalSelector subsumptionSelector = new ConditionalSelector();
LeftReducer leftReducer = new LeftReducer();
XCSCheckIfGAShouldBeApplied checkIfGAShouldRun = new XCSCheckIfGAShouldBeApplied();
ConditionalBranch runGAConditionalBranch = new ConditionalBranch();
UniformSubScopesProcessor timestampAssignerSubscopeProcessor = new UniformSubScopesProcessor();
Assigner timestampAssigner = new Assigner();
adaptedGeneticAlgorithmMainLoop = new LCSAdaptedGeneticAlgorithm();
IntCounter currentPopulationSizeCounter = new IntCounter();
CalculateNumberOfDeletionsOperator calculateNumberOfDeletions = new CalculateNumberOfDeletionsOperator();
UniformSubScopesProcessor setDeletionFalseSubScopeProcessor1 = new UniformSubScopesProcessor();
UniformSubScopesProcessor setDeletionFalseSubScopeProcessor2 = new UniformSubScopesProcessor();
Assigner setDeletionFalseAssigner = new Assigner();
insertInPopulation = new InsertInPopulationOperator();
XCSDeletionOperator deletionOperatorAfterGA = new XCSDeletionOperator();
ConditionalSelector deletionSelectorAfterGA = new ConditionalSelector();
LeftReducer leftReducerAfterGA = new LeftReducer();
classifierFetcher = new Placeholder();
actionExecuter = new Placeholder();
actionSetSubsumption = new Placeholder();
variableCreator.CollectedValues.Add(new ValueParameter("ZeroIntValue", new IntValue(0)));
variableCreator.CollectedValues.Add(new ValueParameter("OneIntValue", new IntValue(1)));
variableCreator.CollectedValues.Add(new ValueParameter("Iteration", new IntValue(0)));
variableCreator.CollectedValues.Add(new ValueParameter("CurrentPopulationSize", new IntValue(0)));
resultsCollector.CollectedValues.Add(new LookupParameter("Iteration"));
resultsCollector.ResultsParameter.ActualName = "Results";
moduloOperator.LeftSideParameter.ActualName = "Iteration";
moduloOperator.RightSideParameter.ActualName = AnalyzeInIterationParameter.ActualName;
moduloOperator.ResultParameter.ActualName = "ModuloResult";
analyzerComparator.LeftSideParameter.ActualName = "ModuloResult";
analyzerComparator.RightSideParameter.Value = new IntValue(0);
analyzerComparator.ResultParameter.ActualName = "DoAnalyzing";
analyzerConditionalBranch.ConditionParameter.ActualName = "DoAnalyzing";
analyzer.Name = "Analyzer";
analyzer.OperatorParameter.ActualName = "Analyzer";
finalAnalyzer.Name = "FinalAnalyzer";
finalAnalyzer.OperatorParameter.ActualName = "FinalAnalyzer";
initialPopulationConditionalBranch.ConditionParameter.ActualName = "CreateInitialPopulation";
initialSolutionsCreator.NumberOfSolutionsParameter.ActualName = "N";
initialPopulationSizeAssigner.LeftSideParameter.ActualName = "CurrentPopulationSize";
initialPopulationSizeAssigner.RightSideParameter.ActualName = "N";
maxIterationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
maxIterationsComparator.LeftSideParameter.ActualName = "Iteration";
maxIterationsComparator.RightSideParameter.ActualName = MaxIterationsParameter.ActualName;
maxIterationsComparator.ResultParameter.ActualName = "TerminateMaxIterations";
terminationConditionalBranch1.ConditionParameter.ActualName = "TerminateMaxIterations";
iterationCounter.ValueParameter.ActualName = "Iteration";
iterationCounter.IncrementParameter.ActualName = "OneIntValue";
conditionMatchSelector.CopySelected = new BoolValue(false);
conditionMatchSelector.ConditionParameter.ActualName = matchConditionOperator.MatchConditionParameter.ActualName;
doDeletionBeforeCovering.MatchConditionParameter.ActualName = matchConditionOperator.MatchConditionParameter.ActualName;
doDeletionBeforeCovering.CurrentPopulationSizeParameter.ActualName = "CurrentPopulationSize";
doDeletionBeforeCovering.PopulationSizeParameter.ActualName = "N";
doDeletionBeforeCoveringConditionalBranch.ConditionParameter.ActualName = doDeletionBeforeCovering.DoDeletionParameter.ActualName;
setDeletionFalseAssigner.LeftSideParameter.ActualName = HASTOBEDELETED;
setDeletionFalseAssigner.RightSideParameter.Value = new BoolValue(false);
deletionOperator.NumberToDeleteParameter.ActualName = doDeletionBeforeCovering.NumberToDeleteParameter.ActualName;
deletionOperator.HasToBeDeletedParameter.ActualName = HASTOBEDELETED;
deletionOperator.AverageActionSetSizesParameter.ActualName = "AverageActionSetSize";
deletionOperator.FitnessesParameter.ActualName = "Fitness";
deletionOperator.NumerositiesParameter.ActualName = "Numerosity";
deletionOperator.ExperiencesParameter.ActualName = "Experience";
deletionOperator.ThetaDeletionParameter.ActualName = "ThetaDeletion";
deletionOperator.DeltaParameter.ActualName = "Delta";
deletionOperator.RandomParameter.ActualName = "Random";
deletionSelector.ConditionParameter.ActualName = HASTOBEDELETED;
deletionSelector.CopySelected = new BoolValue(false);
covering.ActionsInMatchSetParameter.ActualName = countNumberOfUniqueActions.UniqueActionsParameter.ActualName;
covering.ParallelParameter.Value.Value = true;
covering.RandomParameter.ActualName = "Random";
covering.CurrentPopulationSizeParameter.ActualName = "CurrentPopulationSize";
matchActionSubScopesProcessor.Operator = matchActionOperator;
matchActionOperator.TargetMatchParameter.ActualName = actionSelector.SelectedActionParameter.ActualName;
actionSelector.PredictionArrayParameter.ActualName = predictionArrayCalculator.PredictionArrayParameter.Name;
actionSelector.RandomParameter.ActualName = "Random";
actionSelector.ExplorationProbabilityParameter.ActualName = "ExplorationProbability";
actionMatchSelector.CopySelected = new BoolValue(false);
actionMatchSelector.ConditionParameter.ActualName = "MatchAction";
actionSetSubsumptionBranch.ConditionParameter.ActualName = "DoActionSetSubsumption";
setSubsumedToFalseAssigner.LeftSideParameter.ActualName = HASBEENSUBSUMED;
setSubsumedToFalseAssigner.RightSideParameter.Value = new BoolValue(false);
subsumptionSelector.ConditionParameter.ActualName = HASBEENSUBSUMED;
subsumptionSelector.CopySelected = new BoolValue(false);
evaluator.Name = "Evaluator";
classifierFetcher.Name = "ClassifierFetcher";
actionExecuter.Name = "ActionExecuter";
actionSetSizeDataReducer.TargetParameter.ActualName = "CurrentActionSetSize";
actionSetSizeDataReducer.ParameterToReduce.ActualName = "Numerosity";
actionSetSizeDataReducer.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum);
actionSetSizeDataReducer.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign);
calculateAccuracy.AlphaParameter.ActualName = "Alpha";
calculateAccuracy.ErrorParameter.ActualName = "Error";
calculateAccuracy.ErrorZeroParameter.ActualName = "ErrorZero";
calculateAccuracy.PowerParameter.ActualName = "v";
sumAccuracy.AccuracyParameter.ActualName = calculateAccuracy.AccuracyParameter.ActualName;
sumAccuracy.NumerosityParameter.ActualName = "Numerosity";
//BEGIN parameters have to be set differently
checkIfGAShouldRun.TimeStampsParameter.ActualName = "Timestamp";
checkIfGAShouldRun.NumerositiesParameter.ActualName = "Numerosity";
checkIfGAShouldRun.ThetaGAParameter.ActualName = "ThetaGA";
//END
checkIfGAShouldRun.IterationParameter.ActualName = iterationCounter.ValueParameter.ActualName;
runGAConditionalBranch.ConditionParameter.ActualName = checkIfGAShouldRun.RunGAParameter.ActualName;
timestampAssigner.LeftSideParameter.ActualName = "Timestamp";
timestampAssigner.RightSideParameter.ActualName = iterationCounter.ValueParameter.ActualName;
afterCrossover.NumerosityParameter.ActualName = "Numerosity";
afterCrossover.ExperienceParameter.ActualName = "Experience";
afterCrossover.TimestampParameter.ActualName = "Timestamp";
afterCrossover.CurrentIterationParameter.ActualName = "Iteration";
afterCrossover.FitnessParameter.ActualName = "Fitness";
afterCrossover.AverageActionSetSizeParameter.ActualName = "AverageActionSetSize";
afterCrossover.PredictionParameter.ActualName = "Prediction";
afterCrossover.ErrorParameter.ActualName = "Error";
afterCrossover.ParentFitnessParameter.ActualName = "Fitness";
afterCrossover.ParentErrorParameter.ActualName = "Error";
afterCrossover.ParentPredictionParameter.ActualName = "Prediction";
afterCrossover.ParentAverageActionSetSizeParameter.ActualName = "AverageActionSetSize";
adaptedGeneticAlgorithmMainLoop.RandomParameter.ActualName = "Random";
adaptedGeneticAlgorithmMainLoop.MaximumGenerationsParameter.ActualName = "ZeroIntValue";
adaptedGeneticAlgorithmMainLoop.QualityParameter.ActualName = "Fitness";
adaptedGeneticAlgorithmMainLoop.MutationProbabilityParameter.ActualName = "MutationProbability";
adaptedGeneticAlgorithmMainLoop.MaximizationParameter.Value = new BoolValue(true);
adaptedGeneticAlgorithmMainLoop.AfterCrossoverParameter.ActualName = AfterCrossoverParameter.Name;
adaptedGeneticAlgorithmMainLoop.AfterCopyingParentsParameter.ActualName = AfterCopyingParentsParameter.Name;
currentPopulationSizeCounter.ValueParameter.ActualName = "CurrentPopulationSize";
currentPopulationSizeCounter.Increment = new IntValue(2);
insertInPopulation.NumerositiesParameter.ActualName = "Numerosity";
insertInPopulation.HasToBeDeletedParameter.ActualName = HASTOBEDELETED;
insertInPopulation.InsertInPopulationParameter.ActualName = "InsertInPopulation";
calculateNumberOfDeletions.CurrentPopulationSizeParameter.ActualName = "CurrentPopulationSize";
calculateNumberOfDeletions.PopulationSizeParameter.ActualName = "N";
deletionOperatorAfterGA.NumberToDeleteParameter.ActualName = calculateNumberOfDeletions.NumberOfDeletionsParameter.ActualName;
deletionOperatorAfterGA.HasToBeDeletedParameter.ActualName = HASTOBEDELETED;
deletionOperatorAfterGA.AverageActionSetSizesParameter.ActualName = "AverageActionSetSize";
deletionOperatorAfterGA.FitnessesParameter.ActualName = "Fitness";
deletionOperatorAfterGA.NumerositiesParameter.ActualName = "Numerosity";
deletionOperatorAfterGA.ExperiencesParameter.ActualName = "Experience";
deletionOperatorAfterGA.ThetaDeletionParameter.ActualName = "ThetaDeletion";
deletionOperatorAfterGA.DeltaParameter.ActualName = "Delta";
deletionOperatorAfterGA.RandomParameter.ActualName = "Random";
deletionSelectorAfterGA.ConditionParameter.ActualName = HASTOBEDELETED;
deletionSelectorAfterGA.CopySelected = new BoolValue(false);
#endregion
#region Create operator graph
OperatorGraph.InitialOperator = variableCreator;
variableCreator.Successor = resultsCollector;
resultsCollector.Successor = initialPopulationConditionalBranch;
initialPopulationConditionalBranch.TrueBranch = initialSolutionsCreator;
initialSolutionsCreator.Successor = initialPopulationSizeAssigner;
initialPopulationConditionalBranch.FalseBranch = new EmptyOperator();
initialPopulationConditionalBranch.Successor = maxIterationsComparator;
maxIterationsComparator.Successor = terminationConditionalBranch1;
terminationConditionalBranch1.TrueBranch = finalAnalyzer;
terminationConditionalBranch1.FalseBranch = classifierFetcher;
classifierFetcher.Successor = matchCondtionSubScopesProcessor;
matchCondtionSubScopesProcessor.Operator = matchConditionOperator;
matchCondtionSubScopesProcessor.Successor = doDeletionBeforeCovering;
doDeletionBeforeCovering.Successor = doDeletionBeforeCoveringConditionalBranch;
doDeletionBeforeCoveringConditionalBranch.TrueBranch = setDeletionFalseSubScopeProcessor1;
doDeletionBeforeCoveringConditionalBranch.FalseBranch = conditionMatchSelector;
setDeletionFalseSubScopeProcessor1.Operator = setDeletionFalseAssigner;
setDeletionFalseSubScopeProcessor1.Successor = deletionOperator;
deletionOperator.Successor = deletionSelector;
deletionSelector.Successor = leftReducerAfterDeletionSelection;
//if a classifier with a unique action for the match set has been deleted, then there are still to many classifiers in the population
leftReducerAfterDeletionSelection.Successor = doDeletionBeforeCovering;
conditionMatchSelector.Successor = matchSetSubScopesProcessor;
matchSetSubScopesProcessor.Operators.Add(new EmptyOperator());
matchSetSubScopesProcessor.Operators.Add(countNumberOfUniqueActions);
countNumberOfUniqueActions.Successor = covering;
matchSetSubScopesProcessor.Successor = matchSetMergingReducer;
covering.Successor = predictionArrayCalculator;
predictionArrayCalculator.Successor = actionSelector;
actionSelector.Successor = matchActionSubScopesProcessor;
matchActionSubScopesProcessor.Successor = actionMatchSelector;
actionMatchSelector.Successor = actionExecuter;
actionExecuter.Successor = actionSetSubScopesProcessor;
actionSetSubScopesProcessor.Operators.Add(new EmptyOperator());
actionSetSubScopesProcessor.Operators.Add(actionSetSizeDataReducer);
actionSetSizeDataReducer.Successor = accuracySubScopesProcessor;
accuracySubScopesProcessor.Operator = calculateAccuracy;
accuracySubScopesProcessor.Successor = sumAccuracy;
sumAccuracy.Successor = updateParametersSubScopesProcessor;
updateParametersSubScopesProcessor.Operator = evaluator;
updateParametersSubScopesProcessor.Successor = actionSetSubsumptionBranch;
actionSetSubsumptionBranch.TrueBranch = setSubsumedToFalseSubScopeProcessor;
setSubsumedToFalseSubScopeProcessor.Operator = setSubsumedToFalseAssigner;
setSubsumedToFalseSubScopeProcessor.Successor = actionSetSubsumption;
actionSetSubsumption.Successor = subsumptionSelector;
subsumptionSelector.Successor = leftReducer;
actionSetSubsumptionBranch.FalseBranch = new EmptyOperator();
actionSetSubsumptionBranch.Successor = checkIfGAShouldRun;
checkIfGAShouldRun.Successor = runGAConditionalBranch;
runGAConditionalBranch.TrueBranch = timestampAssignerSubscopeProcessor;
runGAConditionalBranch.FalseBranch = new EmptyOperator();
timestampAssignerSubscopeProcessor.Operator = timestampAssigner;
timestampAssignerSubscopeProcessor.Successor = adaptedGeneticAlgorithmMainLoop;
adaptedGeneticAlgorithmMainLoop.Successor = currentPopulationSizeCounter;
actionSetSubScopesProcessor.Successor = actionSetMergingReducer;
matchSetMergingReducer.Successor = setDeletionFalseSubScopeProcessor2;
setDeletionFalseSubScopeProcessor2.Operator = setDeletionFalseAssigner;
setDeletionFalseSubScopeProcessor2.Successor = insertInPopulation;
insertInPopulation.Successor = calculateNumberOfDeletions;
calculateNumberOfDeletions.Successor = deletionOperatorAfterGA;
deletionOperatorAfterGA.Successor = deletionSelectorAfterGA;
deletionSelectorAfterGA.Successor = leftReducerAfterGA;
leftReducerAfterGA.Successor = iterationCounter;
iterationCounter.Successor = moduloOperator;
moduloOperator.Successor = analyzerComparator;
analyzerComparator.Successor = analyzerConditionalBranch;
analyzerConditionalBranch.Successor = maxIterationsComparator;
analyzerConditionalBranch.TrueBranch = analyzer;
#endregion
}
internal void SetCurrentProblem(IConditionActionProblem problem) {
initialSolutionsCreator.SolutionCreatorParameter.ActualName = problem.SolutionCreatorParameter.Name;
initialSolutionsCreator.EvaluatorParameter.ActualName = problem.EvaluatorParameter.Name;
problem.ActionExecuter.SelectedActionParameter.ActualName = actionSelector.SelectedActionParameter.ActualName;
problem.ClassifierFetcher.IterationParameter.ActualName = "Iteration";
evaluator.OperatorParameter.ActualName = problem.EvaluatorParameter.Name;
classifierFetcher.OperatorParameter.ActualName = problem.ClassifierFetcherParameter.Name;
actionExecuter.OperatorParameter.ActualName = problem.ActionExecuterParameter.Name;
problem.ActionSetSubsumptionOperator.ThetaSubsumptionParameter.ActualName = "ThetaSubsumption";
problem.ActionSetSubsumptionOperator.ErrorsParameter.ActualName = "Error";
problem.ActionSetSubsumptionOperator.ErrorZeroParameter.ActualName = "ErrorZero";
problem.ActionSetSubsumptionOperator.ExperiencesParameter.ActualName = "Experience";
problem.ActionSetSubsumptionOperator.NumerositiesParameter.ActualName = "Numerosity";
problem.ActionSetSubsumptionOperator.HasBeenSubsumedParameter.ActualName = HASBEENSUBSUMED;
actionSetSubsumption.OperatorParameter.ActualName = problem.ActionSetSubsumptionOperatorParameter.Name;
matchConditionOperator.TargetMatchParameter.ActualName = problem.ClassifierFetcher.CurrentInputToMatchParameter.ActualName;
doDeletionBeforeCovering.MinimalNumberOfUniqueActionsParameter.ActualName = problem.ThetaMinimalNumberOfActionsParameter.Name;
doDeletionBeforeCovering.ClassifierComparerParameter.ActualName = problem.ClassifierComparerParameter.Name;
covering.SolutionCreatorParameter.ActualName = problem.CoveringSolutionCreatorParameter.Name;
covering.EvaluatorParameter.ActualName = problem.EvaluatorParameter.Name;
covering.MinimalNumberOfUniqueActionsParameter.ActualName = problem.ThetaMinimalNumberOfActionsParameter.Name;
covering.PossibleActionsParameter.ActualName = problem.PossibleActionsParameter.Name;
predictionArrayCalculator.PredictionParameter.ActualName = problem.Evaluator.PredictionParameter.ActualName;
predictionArrayCalculator.FitnessParameter.ActualName = problem.Evaluator.FitnessParameter.ActualName;
predictionArrayCalculator.ClassifierComparerParameter.ActualName = problem.ClassifierComparerParameter.Name;
countNumberOfUniqueActions.ClassifierComparerParameter.ActualName = problem.ClassifierComparerParameter.Name;
matchConditionOperator.MatchParameter.ActualName = problem.ChildName;
countNumberOfUniqueActions.ClassifiersParameter.ActualName = problem.ChildName;
doDeletionBeforeCovering.ClassifiersParameter.ActualName = problem.ChildName;
matchActionOperator.MatchParameter.ActualName = problem.ChildName;
predictionArrayCalculator.MatchParameter.ActualName = problem.ChildName;
insertInPopulation.ClassifiersParameter.ActualName = problem.ChildName;
adaptedGeneticAlgorithmMainLoop.SetChildName(problem.ChildName);
}
}
}