Changeset 3907
- Timestamp:
- 06/09/10 09:09:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs
r3659 r3907 38 38 /// The default value for alpha is 0.75, the default value for beta is 0.25. 39 39 /// </remarks> 40 [Item("BlendAlphaBetaCrossover", "The blend alpha beta crossover (BLX-a-b) for real vectors is similar to the blend alpha crossover (BLX-a), but distinguishes between the better and worse of the parents. The interval from which to choose the new offspring can be extended more around the better parent by specifying a higher alpha value. It is implemented as described in Takahashi, M. and Kita, H. 2001. A crossover operator using independent component analysis for real-coded genetic algorithms Proceedings of the 2001 Congress on Evolutionary Computation, pp. 643-649.")]40 [Item("BlendAlphaBetaCrossover", "The blend alpha beta crossover (BLX-a-b) for real vectors is similar to the blend alpha crossover (BLX-a), but distinguishes between the better and worse of the parents. The interval from which to choose the new offspring can be extended beyond the better parent by specifying a higher alpha value, and beyond the worse parent by specifying a higher beta value. The new offspring is sampled uniformly in the extended range. It is implemented as described in Takahashi, M. and Kita, H. 2001. A crossover operator using independent component analysis for real-coded genetic algorithms Proceedings of the 2001 Congress on Evolutionary Computation, pp. 643-649.")] 41 41 [StorableClass] 42 42 public class BlendAlphaBetaCrossover : RealVectorCrossover { … … 54 54 } 55 55 /// <summary> 56 /// The alpha parameter specifies how much the interval between the parents should be extended in direction of the better parent.56 /// The Alpha parameter controls the extension of the range beyond the better parent. The value must be >= 0 and does not depend on Beta. 57 57 /// </summary> 58 58 public ValueLookupParameter<DoubleValue> AlphaParameter { … … 60 60 } 61 61 /// <summary> 62 /// The beta parameter specifies how much the interval between the parents should be extended in direction of the worse parent.62 /// The Beta parameter controls the extension of the range beyond the worse parent. The value must be >= 0 and does not depend on Alpha. 63 63 /// </summary> 64 64 public ValueLookupParameter<DoubleValue> BetaParameter { … … 74 74 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem or not.")); 75 75 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The quality values of the parents.")); 76 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The value for alpha.", new DoubleValue(0.75)));77 Parameters.Add(new ValueLookupParameter<DoubleValue>("Beta", "The value for beta.", new DoubleValue(0.25)));76 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The Alpha parameter controls the extension of the range beyond the better parent. The value must be >= 0 and does not depend on Beta.", new DoubleValue(0.75))); 77 Parameters.Add(new ValueLookupParameter<DoubleValue>("Beta", "The Beta parameter controls the extension of the range beyond the worse parent. The value must be >= 0 and does not depend on Alpha.", new DoubleValue(0.25))); 78 78 } 79 79 … … 141 141 ItemArray<DoubleValue> qualities = QualityParameter.ActualValue; 142 142 bool maximization = MaximizationParameter.ActualValue.Value; 143 // the better parent144 143 if (maximization && qualities[0].Value >= qualities[1].Value || !maximization && qualities[0].Value <= qualities[1].Value) 145 144 return Apply(random, parents[0], parents[1], AlphaParameter.ActualValue, BetaParameter.ActualValue);
Note: See TracChangeset
for help on using the changeset viewer.