Changeset 13661
- Timestamp:
- 03/07/16 15:40:51 (9 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/EpsGreedy.cs
r13659 r13661 12 12 namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies { 13 13 [Item("EpsilonGreedy", "Epsilon greedy policy with parameter eps to balance between exploitation and exploration")] 14 internalclass EpsilonGreedy : PolicyBase {14 public class EpsilonGreedy : PolicyBase { 15 15 private class ActionStatistics : IActionStatistics { 16 16 public double SumQuality { get; set; } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/PolicyBase.cs
r13659 r13661 11 11 namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies { 12 12 [StorableClass] 13 internalabstract class PolicyBase : Item, IParameterizedItem, IPolicy {13 public abstract class PolicyBase : Item, IParameterizedItem, IPolicy { 14 14 [Storable] 15 15 public IKeyedItemCollection<string, IParameter> Parameters { get; private set; } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/Ucb.cs
r13659 r13661 12 12 namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies { 13 13 [Item("Ucb Policy", "Ucb with parameter c to balance between exploitation and exploration")] 14 internalclass Ucb : PolicyBase {14 public class Ucb : PolicyBase { 15 15 private class ActionStatistics : IActionStatistics { 16 16 public double SumQuality { get; set; } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/UcbTuned.cs
r13659 r13661 12 12 namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies { 13 13 [Item("UcbTuned Policy", "UcbTuned is similar to Ucb but tracks empirical variance. Use parameter c to balance between exploitation and exploration")] 14 internalclass UcbTuned : PolicyBase {14 public class UcbTuned : PolicyBase { 15 15 private class ActionStatistics : IActionStatistics { 16 16 public double SumQuality { get; set; } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/MctsSymbolicRegressionTest.cs
r13654 r13661 4 4 using System.Threading; 5 5 using HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression; 6 using HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies; 6 7 using HeuristicLab.Data; 7 8 using HeuristicLab.Optimization; … … 274 275 #endregion 275 276 276 277 277 278 #region Nguyen 278 279 [TestMethod] … … 505 506 mctsSymbReg.Iterations = iterations; 506 507 mctsSymbReg.MaxVariableReferences = 10; 507 mctsSymbReg.C = 2; // less greedy 508 var ucbPolicy = new Ucb(); 509 ucbPolicy.C = 2; 510 mctsSymbReg.Policy = ucbPolicy; 508 511 mctsSymbReg.SetSeedRandomly = false; 509 512 mctsSymbReg.Seed = 1234; … … 540 543 mctsSymbReg.Iterations = int.MaxValue; // stopping when all solutions have been enumerated 541 544 mctsSymbReg.MaxVariableReferences = maxNumberOfVariables; 542 mctsSymbReg.C = 1000; // essentially breath first seach 545 var ucbPolicy = new Ucb(); 546 ucbPolicy.C = 1000; // essentially breadth first search 547 mctsSymbReg.Policy = ucbPolicy; 543 548 mctsSymbReg.AllowedFactors.SetItemCheckedState(mctsSymbReg.AllowedFactors.Single(s => s.Value.StartsWith("prod")), allowProd); 544 549 mctsSymbReg.AllowedFactors.SetItemCheckedState(mctsSymbReg.AllowedFactors.Single(s => s.Value.Contains("exp")), allowExp);
Note: See TracChangeset
for help on using the changeset viewer.