Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/14 12:53:58 (11 years ago)
Author:
sawinkle
Message:

#2109: Fetched random number generator in Evaluator implementations from scope, so that the same results are produced using the same seed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicRegressionSingleObjectiveEvaluator.cs

    r10276 r10280  
    3333
    3434    public const string EvaluatorParameterName = "Evaluator";
     35    public const string RandomParameterName = "Random";
     36
    3537    public IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter {
    3638      get { return (IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator>)Parameters[EvaluatorParameterName]; }
     39    }
     40    public ILookupParameter<IRandom> RandomParameter {
     41      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
    3742    }
    3843
     
    4045      get { return EvaluatorParameter.Value; }
    4146    }
     47
    4248
    4349    [StorableConstructor]
     
    6268      // translate to phenotype
    6369      var tree = GenotypeToPhenotypeMapperParameter.ActualValue.Map(
     70        RandomParameter.ActualValue,
    6471        SymbolicExpressionTreeGrammarParameter.ActualValue,
    6572        genotype
Note: See TracChangeset for help on using the changeset viewer.