Ignore:
Timestamp:
09/23/15 14:50:18 (7 years ago)
Author:
gkronber
Message:

#2471: implemented linear state value approximation using sparse binary features and implemented a state function for generating features for symbolic expression trees

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Algorithms.IteratedSentenceConstruction/HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction/3.3/Policies/BoltzmannExplorationSymbolicExpressionConstructionPolicy.cs

    r12955 r12967  
    2020    }
    2121
    22     public ITabularStateValueFunction StateValueFunction {
     22    public IStateValueFunction StateValueFunction {
    2323      get {
    24         return ((IValueParameter<ITabularStateValueFunction>)Parameters["Quality function"]).Value;
     24        return ((IValueParameter<IStateValueFunction>)Parameters["Quality function"]).Value;
    2525      }
    26       set { ((IValueParameter<ITabularStateValueFunction>)Parameters["Quality function"]).Value = value; }
     26      set { ((IValueParameter<IStateValueFunction>)Parameters["Quality function"]).Value = value; }
    2727    }
    2828
     
    3939      : base() {
    4040      Parameters.Add(new FixedValueParameter<DoubleValue>("Beta", "The weighting factor beta", new DoubleValue(1.0)));
    41       Parameters.Add(new ValueParameter<ITabularStateValueFunction>("Quality function", "The quality function to use", new TabularAvgStateValueFunction()));
     41      Parameters.Add(new ValueParameter<IStateValueFunction>("Quality function", "The quality function to use", new TabularAvgStateValueFunction()));
    4242    }
    4343
    4444    protected sealed override int Select(IReadOnlyList<object> followStates, IRandom random) {
    4545      var idxs = Enumerable.Range(0, followStates.Count);
    46       // find best action
    47       if (followStates.Any(s => StateValueFunction.Tries(s) == 0)) {
    48         return idxs.Where(idx => StateValueFunction.Tries(followStates[idx]) == 0).SampleRandom(random);
    49       }
    5046
    5147      // windowing
     
    7268    }
    7369
    74     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
     70    public override IDeepCloneable Clone(Cloner cloner) {
    7571      return new BoltzmannExplorationSymbolicExpressionConstructionPolicy(this, cloner);
    7672    }
Note: See TracChangeset for help on using the changeset viewer.