Changeset 12923 for branches/HeuristicLab.Algorithms.IteratedSentenceConstruction/HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction/3.3/Policies/RandomSymbolicExpressionConstructionPolicy.cs
- Timestamp:
- 08/28/15 14:57:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Algorithms.IteratedSentenceConstruction/HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction/3.3/Policies/RandomSymbolicExpressionConstructionPolicy.cs
r12909 r12923 17 17 } 18 18 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); 21 22 } 22 23 23 public override void Update(IEnumerable<Tuple<object, int>> stateActionSequence, double quality) { 24 public sealed override void Update(IEnumerable<object> stateSequence, double quality) { 25 24 26 // ignore 25 27 } 26 28 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) { 28 30 return null; // doesn't use state information 29 31 }
Note: See TracChangeset
for help on using the changeset viewer.