Changeset 3336 for trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy
- Timestamp:
- 04/13/10 18:32:07 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/EvolutionStrategyMainLoop.cs ¶
r3193 r3336 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.Selection; 30 using HeuristicLab.Encodings.RealVectorEncoding;31 30 32 31 namespace HeuristicLab.Algorithms.EvolutionStrategy { … … 59 58 get { return (ValueLookupParameter<IntValue>)Parameters["Children"]; } 60 59 } 61 public ValueLookupParameter<RealVector> StrategyVectorParameter {62 get { return (ValueLookupParameter<RealVector>)Parameters["StrategyVector"]; }63 }64 public ValueLookupParameter<DoubleMatrix> StrategyVectorBoundsParameter {65 get { return (ValueLookupParameter<DoubleMatrix>)Parameters["StrategyVectorBounds"]; }66 }67 public ValueLookupParameter<DoubleValue> GeneralLearningRateParameter {68 get { return (ValueLookupParameter<DoubleValue>)Parameters["GeneralLearningRate"]; }69 }70 public ValueLookupParameter<DoubleValue> LearningRateParameter {71 get { return (ValueLookupParameter<DoubleValue>)Parameters["LearningRate"]; }72 }73 60 public ValueLookupParameter<BoolValue> PlusSelectionParameter { 74 61 get { return (ValueLookupParameter<BoolValue>)Parameters["PlusSelection"]; } … … 97 84 private ScopeParameter CurrentScopeParameter { 98 85 get { return (ScopeParameter)Parameters["CurrentScope"]; } 86 } 87 private ValueLookupParameter<IOperator> StrategyParameterManipulatorParameter { 88 get { return (ValueLookupParameter<IOperator>)Parameters["StrategyParameterManipulator"]; } 89 } 90 private ValueLookupParameter<IOperator> StrategyParameterCrossoverParameter { 91 get { return (ValueLookupParameter<IOperator>)Parameters["StrategyParameterCrossover"]; } 99 92 } 100 93 … … 121 114 Parameters.Add(new ValueLookupParameter<IntValue>("Children", "λ (lambda) - the size of the offspring population.")); 122 115 Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.")); 123 Parameters.Add(new ValueLookupParameter<RealVector>("StrategyVector", "The strategy vector."));124 Parameters.Add(new LookupParameter<DoubleMatrix>("StrategyVectorBounds", "2 column matrix with one row for each dimension specifying upper and lower bound for the strategy vector. If there are less rows than dimensions, the strategy vector will be read in a cycle."));125 Parameters.Add(new ValueLookupParameter<DoubleValue>("GeneralLearningRate", "τ0 (tau0) - the factor with which adjustments in the strategy vector is dampened over all dimensions. Recommendation is to use 1/Sqrt(2*ProblemDimension)."));126 Parameters.Add(new ValueLookupParameter<DoubleValue>("LearningRate", "τ (tau) - the factor with which adjustments in the strategy vector are dampened in a single dimension. Recommendation is to use 1/Sqrt(2*Sqrt(ProblemDimension))."));127 116 Parameters.Add(new ValueLookupParameter<BoolValue>("PlusSelection", "True for plus selection (elitist population), false for comma selection (non-elitist population).")); 128 117 Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions.")); … … 133 122 Parameters.Add(new LookupParameter<IItem>("Visualization", "The item which represents the visualization of solutions.")); 134 123 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the EvolutionStrategy should be applied.")); 124 Parameters.Add(new ValueLookupParameter<IOperator>("StrategyParameterManipulator", "The operator to mutate the endogeneous strategy parameters.")); 125 Parameters.Add(new ValueLookupParameter<IOperator>("StrategyParameterCrossover", "The operator to cross the endogeneous strategy parameters.")); 135 126 #endregion 136 127 … … 151 142 UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor(); 152 143 Placeholder recombinator = new Placeholder(); 153 StrategyVectorManipulator strategyMutator1 = new StrategyVectorManipulator(); 144 Placeholder strategyRecombinator = new Placeholder(); 145 Placeholder strategyMutator1 = new Placeholder(); 154 146 Placeholder mutator1 = new Placeholder(); 155 147 Placeholder evaluator1 = new Placeholder(); 156 148 SubScopesRemover subScopesRemover = new SubScopesRemover(); 157 149 UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor(); 158 StrategyVectorManipulator strategyMutator2 = new StrategyVectorManipulator();150 Placeholder strategyMutator2 = new Placeholder(); 159 151 Placeholder mutator2 = new Placeholder(); 160 152 Placeholder evaluator2 = new Placeholder(); … … 230 222 useRecombinationBranch.ConditionParameter.ActualName = "UseRecombination"; 231 223 224 childrenCreator.ParentsPerChild = null; 232 225 childrenCreator.ParentsPerChildParameter.ActualName = ParentsPerChildParameter.Name; 233 226 … … 235 228 recombinator.OperatorParameter.ActualName = RecombinatorParameter.Name; 236 229 237 strategyMutator1.StrategyVectorParameter.ActualName = StrategyVectorParameter.Name; 238 strategyMutator1.GeneralLearningRateParameter.ActualName = GeneralLearningRateParameter.Name; 239 strategyMutator1.LearningRateParameter.ActualName = LearningRateParameter.Name; 240 strategyMutator1.RandomParameter.ActualName = RandomParameter.Name; 230 strategyRecombinator.Name = "Strategy Parameter Recombinator (placeholder)"; 231 strategyRecombinator.OperatorParameter.ActualName = StrategyParameterCrossoverParameter.Name; 232 233 strategyMutator1.Name = "Strategy Parameter Manipulator (placeholder)"; 234 strategyMutator1.OperatorParameter.ActualName = StrategyParameterManipulatorParameter.Name; 241 235 242 236 mutator1.Name = "Mutator (placeholder)"; … … 248 242 subScopesRemover.RemoveAllSubScopes = true; 249 243 250 strategyMutator2.StrategyVectorParameter.ActualName = StrategyVectorParameter.Name; 251 strategyMutator2.GeneralLearningRateParameter.ActualName = GeneralLearningRateParameter.Name; 252 strategyMutator2.LearningRateParameter.ActualName = LearningRateParameter.Name; 253 strategyMutator2.RandomParameter.ActualName = RandomParameter.Name; 244 strategyMutator2.Name = "Strategy Parameter Manipulator (placeholder)"; 245 strategyMutator2.OperatorParameter.ActualName = StrategyParameterManipulatorParameter.Name; 254 246 255 247 mutator2.Name = "Mutator (placeholder)"; … … 327 319 uniformSubScopesProcessor1.Operator = recombinator; 328 320 uniformSubScopesProcessor1.Successor = null; 329 recombinator.Successor = strategyMutator1; 321 recombinator.Successor = strategyRecombinator; 322 strategyRecombinator.Successor = strategyMutator1; 330 323 strategyMutator1.Successor = mutator1; 331 324 mutator1.Successor = evaluator1; -
TabularUnified trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/HeuristicLab.Algorithms.EvolutionStrategy-3.3.csproj ¶
r3183 r3336 84 84 <Compile Include="EvolutionStrategy.cs" /> 85 85 <Compile Include="EvolutionStrategyMainLoop.cs" /> 86 <Compile Include="SelfAdaptiveCrossover.cs" />87 <Compile Include="StrategyVectorManipulator.cs" />88 86 <Compile Include="WithoutRepeatingBatchedRandomSelector.cs" /> 89 87 </ItemGroup> … … 109 107 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 110 108 <Name>HeuristicLab.Data-3.3</Name> 111 </ProjectReference>112 <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">113 <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>114 <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>115 109 </ProjectReference> 116 110 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
Note: See TracChangeset
for help on using the changeset viewer.