Changeset 11742 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/BanditPolicies/GaussianThompsonSamplingPolicy.cs
- Timestamp:
- 01/09/15 14:57:28 (9 years ago)
- Location:
- branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/BanditPolicies
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/BanditPolicies/GaussianThompsonSamplingPolicy.cs
r11732 r11742 5 5 using HeuristicLab.Common; 6 6 7 namespace HeuristicLab.Algorithms.Bandits {7 namespace HeuristicLab.Algorithms.Bandits.BanditPolicies { 8 8 9 public class GaussianThompsonSamplingPolicy : IPolicy { 9 [Obsolete("Replaced by GenericThompsonSamplingPolicy(GaussianModel(0.5, 1.0, 0.1))")] 10 public class GaussianThompsonSamplingPolicy : IBanditPolicy { 10 11 private bool compatibility; 11 12 … … 22 23 } 23 24 24 public int SelectAction(Random random, IEnumerable<I PolicyActionInfo> actionInfos) {25 public int SelectAction(Random random, IEnumerable<IBanditPolicyActionInfo> actionInfos) { 25 26 var myActionInfos = actionInfos.OfType<MeanAndVariancePolicyActionInfo>(); 26 27 int bestAction = -1; … … 38 39 double theta; 39 40 if (compatibility) { 41 // old code used for old experiments (preserved because it performed very well) 40 42 if (tries < 2) return aIdx; 41 43 var mu = sampleMean; … … 65 67 } 66 68 67 public I PolicyActionInfo CreateActionInfo() {69 public IBanditPolicyActionInfo CreateActionInfo() { 68 70 return new MeanAndVariancePolicyActionInfo(); 69 71 }
Note: See TracChangeset
for help on using the changeset viewer.