Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/21/17 11:33:53 (7 years ago)
Author:
pkimmesw
Message:

#2665 Testet Problems, Testet error functions, Small fixes, Created HL files

Location:
branches/PushGP/HeuristicLab.PushGP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP

    • Property svn:ignore
      •  

        old new  
        11*.user
         2packages
         3TestResults
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/SolutionCreator/PlushCreator.cs

    r15289 r15334  
    2424      Parameters.Add(new ValueLookupParameter<IntValue>("MinLength", "The min length of the vector."));
    2525      Parameters.Add(new ValueLookupParameter<IntValue>("MaxLength", "The max length of the vector."));
    26       Parameters.Add(new ValueLookupParameter<IntValue>("MinClose", "The min close variable for a plush genome entry."));
    2726      Parameters.Add(new ValueLookupParameter<IntValue>("MaxClose", "The max close variable for a plush genome entry."));
    2827      Parameters.Add(new ValueLookupParameter<DoubleValue>("CloseBiasLevel", "Determines how strongly the random close variable is biased towards 0."));
     
    6968      get { return (IValueLookupParameter<PercentValue>)Parameters["InInstructionProbability"]; }
    7069    }
    71     public IValueLookupParameter<IntValue> MinCloseParameter
    72     {
    73       get { return (IValueLookupParameter<IntValue>)Parameters["MinClose"]; }
    74     }
    7570    public IValueLookupParameter<IntValue> MaxCloseParameter
    7671    {
     
    9792      var instructions = InstructionsParameter.ActualValue;
    9893      var inInstructionProbability = InInstructionProbabilityParameter.ActualValue.Value;
    99       var minClose = MinCloseParameter.ActualValue.Value;
    10094      var maxClose = MaxCloseParameter.ActualValue.Value;
    10195      var biasLevel = CloseBiasLevelParameter.ActualValue.Value;
     
    10397      if (minLength > maxLength)
    10498        throw new InvalidOperationException("MinLength > MaxLength");
    105 
    106       if (minClose > maxClose)
    107         throw new InvalidOperationException("MinClose > MaxClose");
    10899
    109100      var length = random.Next(minLength, maxLength);
     
    117108          inInstructionProbability);
    118109
    119         var close = random.NextBiased(minClose, maxClose, biasLevel);
     110        var close = maxClose == 0 ? 1 : random.NextBiased(0, maxClose, biasLevel);
    120111
    121112        result.Add(new PlushEntry {
Note: See TracChangeset for help on using the changeset viewer.