Changeset 1224


Ignore:
Timestamp:
02/24/09 10:19:56 (11 years ago)
Author:
abeham
Message:

Changed ComparisonFactor to global variable, corrected description slightly (finishes #475)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection.OffspringSelection/WeightedOffspringFitnessComparer.cs

    r1223 r1224  
    2828namespace HeuristicLab.Selection.OffspringSelection {
    2929  /// <summary>
    30   /// Analyzes the offspring on whether it is successful or not based on its quality in comparison to its parents' qualities.
     30  /// Analyzes the offspring on whether it is successful or not based on its quality in comparison to its best and worst parents' qualities.
    3131  /// </summary>
    3232  public class WeightedOffspringFitnessComparer : OperatorBase  {
     
    3434    public override string Description {
    3535      get {
    36         return @"Compares the quality values of the child with a weighted average of the parents'.
     36        return @"Compares the quality values of the child with a weighted average of the best and worst parents' qualities.
    3737Adds a variable SuccessfulChild into the current scope with the result of the comparison.";
    3838      }
     
    4848      AddVariableInfo(new VariableInfo("Quality", "Quality value", typeof(DoubleData), VariableKind.In));
    4949      AddVariableInfo(new VariableInfo("SuccessfulChild", "True if the child is successful", typeof(BoolData), VariableKind.New));
    50 
    51       VariableInfo compFactorInfo = new VariableInfo("ComparisonFactor", "Factor for comparing the quality of a child with the qualities of its parents (0 = better than worst parent, 1 = better than best parent)", typeof(DoubleData), VariableKind.In);
    52       compFactorInfo.Local = true;
    53       AddVariableInfo(compFactorInfo);
    54       AddVariable(new Variable("ComparisonFactor", new DoubleData(0.5)));
     50      AddVariableInfo(new VariableInfo("ComparisonFactor", "Factor for comparing the quality of a child with the qualities of its parents (0 = better than worst parent, 1 = better than best parent)", typeof(DoubleData), VariableKind.In));
    5551    }
    5652
Note: See TracChangeset for help on using the changeset viewer.