Changeset 13661


Ignore:
Timestamp:
03/07/16 15:40:51 (4 years ago)
Author:
gkronber
Message:

#2581: updated unit test to compile with r13658

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/EpsGreedy.cs

    r13659 r13661  
    1212namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies {
    1313  [Item("EpsilonGreedy", "Epsilon greedy policy with parameter eps to balance between exploitation and exploration")]
    14   internal class EpsilonGreedy : PolicyBase {
     14  public class EpsilonGreedy : PolicyBase {
    1515    private class ActionStatistics : IActionStatistics {
    1616      public double SumQuality { get; set; }
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/PolicyBase.cs

    r13659 r13661  
    1111namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies {
    1212  [StorableClass]
    13   internal abstract class PolicyBase : Item, IParameterizedItem, IPolicy {
     13  public abstract class PolicyBase : Item, IParameterizedItem, IPolicy {
    1414    [Storable]
    1515    public IKeyedItemCollection<string, IParameter> Parameters { get; private set; }
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/Ucb.cs

    r13659 r13661  
    1212namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies {
    1313  [Item("Ucb Policy", "Ucb with parameter c to balance between exploitation and exploration")]
    14   internal class Ucb : PolicyBase {
     14  public class Ucb : PolicyBase {
    1515    private class ActionStatistics : IActionStatistics {
    1616      public double SumQuality { get; set; }
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/Policies/UcbTuned.cs

    r13659 r13661  
    1212namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies {
    1313  [Item("UcbTuned Policy", "UcbTuned is similar to Ucb but tracks empirical variance. Use parameter c to balance between exploitation and exploration")]
    14   internal class UcbTuned : PolicyBase {
     14  public class UcbTuned : PolicyBase {
    1515    private class ActionStatistics : IActionStatistics {
    1616      public double SumQuality { get; set; }
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/MctsSymbolicRegressionTest.cs

    r13654 r13661  
    44using System.Threading;
    55using HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression;
     6using HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression.Policies;
    67using HeuristicLab.Data;
    78using HeuristicLab.Optimization;
     
    274275    #endregion
    275276
    276  
     277
    277278    #region Nguyen
    278279    [TestMethod]
     
    505506      mctsSymbReg.Iterations = iterations;
    506507      mctsSymbReg.MaxVariableReferences = 10;
    507       mctsSymbReg.C = 2; // less greedy
     508      var ucbPolicy = new Ucb();
     509      ucbPolicy.C = 2;
     510      mctsSymbReg.Policy = ucbPolicy;
    508511      mctsSymbReg.SetSeedRandomly = false;
    509512      mctsSymbReg.Seed = 1234;
     
    540543      mctsSymbReg.Iterations = int.MaxValue; // stopping when all solutions have been enumerated
    541544      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;
    543548      mctsSymbReg.AllowedFactors.SetItemCheckedState(mctsSymbReg.AllowedFactors.Single(s => s.Value.StartsWith("prod")), allowProd);
    544549      mctsSymbReg.AllowedFactors.SetItemCheckedState(mctsSymbReg.AllowedFactors.Single(s => s.Value.Contains("exp")), allowExp);
Note: See TracChangeset for help on using the changeset viewer.