Changeset 13492 for branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits
- Timestamp:
- 01/10/16 17:13:27 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/Policies/UCTPolicy.cs
r12503 r13492 12 12 private readonly double c; 13 13 14 public UCTPolicy(double c = 1.0) { 14 // c = sqrt(2) 15 public UCTPolicy(double c = 1.41421356237) 16 { 15 17 this.c = c; 16 18 } … … 30 32 q = double.PositiveInfinity; 31 33 } else { 32 q = aInfo.SumReward / aInfo.Tries + 2.0 *c * Math.Sqrt(Math.Log(totalTries) / aInfo.Tries);34 q = aInfo.SumReward / aInfo.Tries + c * Math.Sqrt(Math.Log(totalTries) / aInfo.Tries); 33 35 } 34 36 if (q > bestQ) {
Note: See TracChangeset
for help on using the changeset viewer.