Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/28/15 14:57:21 (9 years ago)
Author:
gkronber
Message:

#2471

  • refactoring to use state value function V(s) instead of state/action value function Q(s,a)
  • added test case for artificial ant problem
File:
1 edited

Legend:

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

    r12909 r12923  
    1717    }
    1818
    19     protected override int Select(object state, IEnumerable<int> actions, IRandom random) {
    20       return actions.SampleRandom(random, 1).First();
     19    protected override int Select(IReadOnlyList<object> followStates, IRandom random) {
     20      var idxs = Enumerable.Range(0, followStates.Count);
     21      return idxs.SampleRandom(random);
    2122    }
    2223
    23     public override void Update(IEnumerable<Tuple<object, int>> stateActionSequence, double quality) {
     24    public sealed override void Update(IEnumerable<object> stateSequence, double quality) {
     25
    2426      // ignore
    2527    }
    2628
    27     protected override object CreateState(ISymbolicExpressionTreeNode root, List<int> actions, ISymbolicExpressionTreeNode parent, int childIdx) {
     29    protected override object CreateState(ISymbolicExpressionTreeNode root, List<ISymbol> actions, ISymbolicExpressionTreeNode parent, int childIdx) {
    2830      return null; // doesn't use state information
    2931    }
Note: See TracChangeset for help on using the changeset viewer.