Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/15 18:24:58 (9 years ago)
Author:
gkronber
Message:

#2283 fixed compile errors and refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/GrammarPolicies/RandomPolicy.cs

    r11770 r11793  
    1313    }
    1414
    15     public override bool TrySelect(Random random, ReadonlySequence curState, IEnumerable<ReadonlySequence> afterStates, out ReadonlySequence selectedState) {
     15    public override bool TrySelect(Random random, string curState, IEnumerable<string> afterStates, out int selectedStateIdx) {
    1616      // never fail => allows re-visits of terminal states
    17       selectedState = afterStates.SelectRandom(random);
     17      selectedStateIdx = random.Next(afterStates.Count());
    1818      return true;
    1919    }
Note: See TracChangeset for help on using the changeset viewer.