Changeset 11980 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GrammaticalOptimization/SequentialDecisionPolicies/GenericFunctionApproximationGrammarPolicy.cs
- Timestamp:
- 02/11/15 13:06:02 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GrammaticalOptimization/SequentialDecisionPolicies/GenericFunctionApproximationGrammarPolicy.cs
r11977 r11980 61 61 } 62 62 63 64 65 const double beta = 20;63 64 /* 65 const double beta = 10; 66 66 var w = from idx in Enumerable.Range(0, maxIdx) 67 67 let afterStateQ = activeAfterStates[idx] … … 71 71 selectedStateIdx = actionIndexMap[bestAction]; 72 72 Debug.Assert(selectedStateIdx >= 0); 73 74 75 /*76 if (random.NextDouble() < 0. 2) {73 */ 74 75 76 if (random.NextDouble() < 0.5) { 77 77 selectedStateIdx = actionIndexMap[random.Next(maxIdx)]; 78 78 } else { … … 91 91 selectedStateIdx = actionIndexMap[bestIdxs[random.Next(bestIdxs.Count)]]; 92 92 } 93 */93 94 94 return true; 95 95 } … … 140 140 double delta = reward - GetValue(state); 141 141 // delta /= problem.GetFeatures(state).Count(); 142 //const double alpha = 0.0 1;142 //const double alpha = 0.001; 143 143 foreach (var feature in problem.GetFeatures(state)) { 144 144 featureTries[feature.Id] = GetFeatureTries(feature.Id) + 1;
Note: See TracChangeset
for help on using the changeset viewer.