Changeset 9160 for branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LCSAdaptedGeneticAlgorithm.cs
- Timestamp:
- 01/15/13 10:47:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LCSAdaptedGeneticAlgorithm.cs
r9154 r9160 63 63 get { return (ValueLookupParameter<PercentValue>)Parameters["MutationProbability"]; } 64 64 } 65 public ValueLookupParameter<PercentValue> CrossoverProbabilityParameter { 66 get { return (ValueLookupParameter<PercentValue>)Parameters["CrossoverProbability"]; } 67 } 65 68 public ValueLookupParameter<IOperator> MutatorParameter { 66 69 get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; } … … 111 114 Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions.")); 112 115 Parameters.Add(new ValueLookupParameter<IOperator>("AfterCrossover", "The operator executed after crossing the solutions.")); 113 Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution.")); 116 Parameters.Add(new ValueLookupParameter<PercentValue>("CrossoverProbability", "The probability that the crossover operator is applied on a solution.")); 117 Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that druing the mutation operator a mutation takes place.")); 114 118 Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions.")); 115 119 Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.")); … … 128 132 ChildrenCreator childrenCreator = new ChildrenCreator(); 129 133 UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor(); 134 StochasticBranch crossoverStochasticBranch = new StochasticBranch(); 135 RandomSelector randomSelector = new RandomSelector(); 136 PreservingRightReducer preservingRightReducer = new PreservingRightReducer(); 137 Assigner numerosityAssigner = new Assigner(); 138 Assigner experienceAssigner = new Assigner(); 130 139 Placeholder crossover = new Placeholder(); 131 140 Placeholder afterCrossover = new Placeholder(); … … 167 176 childrenCreator.ParentsPerChild = new IntValue(2); 168 177 178 crossoverStochasticBranch.ProbabilityParameter.ActualName = CrossoverProbabilityParameter.ActualName; 179 crossoverStochasticBranch.RandomParameter.ActualName = "Random"; 180 181 randomSelector.CopySelected.Value = true; 182 randomSelector.NumberOfSelectedSubScopesParameter.Value = new IntValue(1); 183 169 184 crossover.Name = "Crossover"; 170 185 crossover.OperatorParameter.ActualName = "Crossover"; 186 187 numerosityAssigner.LeftSideParameter.ActualName = "Numerosity"; 188 numerosityAssigner.RightSideParameter.Value = new IntValue(1); 189 190 experienceAssigner.LeftSideParameter.ActualName = "Experience"; 191 experienceAssigner.RightSideParameter.Value = new IntValue(0); 171 192 172 193 afterCrossover.Name = "AfterCrossover"; … … 228 249 subScopesProcessor1.Successor = mergingReducer; 229 250 childrenCreator.Successor = uniformSubScopesProcessor1; 230 uniformSubScopesProcessor1.Operator = crossover ;251 uniformSubScopesProcessor1.Operator = crossoverStochasticBranch; 231 252 uniformSubScopesProcessor1.Successor = subScopesCounter; 253 crossoverStochasticBranch.FirstBranch = crossover; 254 crossoverStochasticBranch.SecondBranch = randomSelector; 255 randomSelector.Successor = preservingRightReducer; 256 preservingRightReducer.Successor = numerosityAssigner; 257 numerosityAssigner.Successor = experienceAssigner; 258 experienceAssigner.Successor = null; 259 crossoverStochasticBranch.Successor = mutator; 232 260 crossover.Successor = afterCrossover; 233 afterCrossover.Successor = mutator;234 261 mutator.Successor = doGASubsumptionBranch1; 235 262 doGASubsumptionBranch1.TrueBranch = checkGASubsumptionOperator;
Note: See TracChangeset
for help on using the changeset viewer.