Index: branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/Test/RunMctsExperiments.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/Test/RunMctsExperiments.cs	(revision 12290)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/Test/RunMctsExperiments.cs	(revision 12354)
@@ -2,6 +2,9 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Globalization;
+using HeuristicLab.Algorithms.Bandits;
 using HeuristicLab.Algorithms.Bandits.BanditPolicies;
 using HeuristicLab.Algorithms.Bandits.GrammarPolicies;
+using HeuristicLab.Algorithms.Bandits.Models;
 using HeuristicLab.Algorithms.GeneticProgramming;
 using HeuristicLab.Algorithms.GrammaticalOptimization;
@@ -9,4 +12,5 @@
 using HeuristicLab.Problems.GrammaticalOptimization.SymbReg;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using RandomPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.RandomPolicy;
 
 namespace HeuristicLab.Problems.GrammaticalOptimization.Test {
@@ -18,16 +22,85 @@
     internal class Configuration {
       public ISymbolicExpressionTreeProblem Problem;
+      public IBanditPolicy Policy;
       public int MaxSize;
       public int RandSeed;
 
       public override string ToString() {
-        return string.Format("{0} {1} {2}", RandSeed, Problem, MaxSize);
-      }
-    }
-
+        return string.Format("{0} {1} {2} {3}", RandSeed, Problem, Policy, MaxSize);
+      }
+    }
+
+    private Func<IBanditPolicy>[] policyFactories = new Func<IBanditPolicy>[]
+    {
+          () => new RandomPolicy(), 
+          () => new ActiveLearningPolicy(),  
+         () => new GaussianThompsonSamplingPolicy(true), 
+         () => new GenericThompsonSamplingPolicy(new GaussianModel(0.5, 10, 1)), 
+         () => new GenericThompsonSamplingPolicy(new GaussianModel(0.5, 10, 1, 1)), 
+         () => new GenericThompsonSamplingPolicy(new BernoulliModel(1, 1)), 
+         () => new EpsGreedyPolicy(0.01), 
+         () => new EpsGreedyPolicy(0.05), 
+         () => new EpsGreedyPolicy(0.1), 
+         () => new EpsGreedyPolicy(0.2), 
+         () => new EpsGreedyPolicy(0.5), 
+         () => new UCTPolicy(0.01),
+         () => new UCTPolicy(0.05),
+         () => new UCTPolicy(0.1),
+         () => new UCTPolicy(0.5),
+         () => new UCTPolicy(1),
+         () => new UCTPolicy(2),
+         () => new UCTPolicy( 5),
+         () => new UCTPolicy( 10),
+         () => new ModifiedUCTPolicy(0.01),
+         () => new ModifiedUCTPolicy(0.05),
+         () => new ModifiedUCTPolicy(0.1),
+         () => new ModifiedUCTPolicy(0.5),
+         () => new ModifiedUCTPolicy(1),
+         () => new ModifiedUCTPolicy(2),
+         () => new ModifiedUCTPolicy( 5),
+         () => new ModifiedUCTPolicy( 10),
+         () => new UCB1Policy(), 
+         () => new UCB1TunedPolicy(), 
+         () => new UCBNormalPolicy(), 
+         () => new BoltzmannExplorationPolicy(1),
+         () => new BoltzmannExplorationPolicy(10),
+         () => new BoltzmannExplorationPolicy(20),
+         () => new BoltzmannExplorationPolicy(100),
+         () => new BoltzmannExplorationPolicy(200),
+         () => new BoltzmannExplorationPolicy(500),
+          () => new ChernoffIntervalEstimationPolicy( 0.01), 
+          () => new ChernoffIntervalEstimationPolicy( 0.05),
+          () => new ChernoffIntervalEstimationPolicy( 0.1),
+          () => new ChernoffIntervalEstimationPolicy( 0.2),
+         () => new ThresholdAscentPolicy(5, 0.01), 
+         () => new ThresholdAscentPolicy(5, 0.05),
+         () => new ThresholdAscentPolicy(5, 0.1),
+         () => new ThresholdAscentPolicy(5, 0.2),
+         () => new ThresholdAscentPolicy(10, 0.01), 
+         () => new ThresholdAscentPolicy(10, 0.05),
+         () => new ThresholdAscentPolicy(10, 0.1),
+         () => new ThresholdAscentPolicy(10, 0.2),
+         () => new ThresholdAscentPolicy(50, 0.01), 
+         () => new ThresholdAscentPolicy(50, 0.05),
+         () => new ThresholdAscentPolicy(50, 0.1),
+         () => new ThresholdAscentPolicy(50, 0.2),
+         () => new ThresholdAscentPolicy(100, 0.01), 
+         () => new ThresholdAscentPolicy(100, 0.05),
+         () => new ThresholdAscentPolicy(100, 0.1),
+         () => new ThresholdAscentPolicy(100, 0.2),
+         () => new ThresholdAscentPolicy(500, 0.01), 
+         () => new ThresholdAscentPolicy(500, 0.05),
+         () => new ThresholdAscentPolicy(500, 0.1),
+         () => new ThresholdAscentPolicy(500, 0.2),
+         () => new ThresholdAscentPolicy(5000, 0.01), 
+         () => new ThresholdAscentPolicy(10000, 0.01),  
+    };
 
     #region artificial ant
     [TestMethod]
+    [Timeout(1000 * 60 * 60 * 72)] // 72 hours
     public void RunSeqSolvFuncApproxArtificialAntProblem() {
+      CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
+
       var instanceFactories = new Func<int, ISymbolicExpressionTreeProblem>[]
       {
@@ -39,6 +112,8 @@
       int maxIterations = 100000; // randomsearch finds the optimum almost always for 100000 evals
       foreach (var instanceFactory in instanceFactories) {
-        foreach (var conf in GenerateConfigurations(instanceFactory, nReps, maxSizes)) {
-          RunMctsForProblem(conf.RandSeed, conf.Problem, maxIterations, conf.MaxSize);
+        foreach (var policyFactory in policyFactories) {
+          foreach (var conf in GenerateConfigurations(instanceFactory, policyFactory, nReps, maxSizes)) {
+            RunMctsForProblem(conf.RandSeed, conf.Problem, conf.Policy, maxIterations, conf.MaxSize);
+          }
         }
       }
@@ -49,5 +124,8 @@
     #region symb-reg-poly-10
     [TestMethod]
+    [Timeout(1000 * 60 * 60 * 72)] // 72 hours
     public void RunSeqSolvFuncApproxPoly10Problem() {
+      CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
+
       var instanceFactories = new Func<int, ISymbolicExpressionTreeProblem>[]
       {
@@ -57,8 +135,10 @@
       var maxSizes = new int[] { 23 }; // size of sequential representation is 23
       int nReps = 30;
-      int maxIterations = 200000; // sequentialsearch should find the optimum within 100000 evals
+      int maxIterations = 100000; // sequentialsearch should find the optimum within 100000 evals
       foreach (var instanceFactory in instanceFactories) {
-        foreach (var conf in GenerateConfigurations(instanceFactory, nReps, maxSizes)) {
-          RunMctsForProblem(conf.RandSeed, conf.Problem, maxIterations, conf.MaxSize);
+        foreach (var policyFactory in policyFactories) {
+          foreach (var conf in GenerateConfigurations(instanceFactory, policyFactory, nReps, maxSizes)) {
+            RunMctsForProblem(conf.RandSeed, conf.Problem, conf.Policy, maxIterations, conf.MaxSize);
+          }
         }
       }
@@ -68,5 +148,7 @@
 
     #region helpers
-    private IEnumerable<Configuration> GenerateConfigurations(Func<int, ISymbolicExpressionTreeProblem> problemFactory,
+    private IEnumerable<Configuration> GenerateConfigurations(
+      Func<int, ISymbolicExpressionTreeProblem> problemFactory,
+      Func<IBanditPolicy> policyFactory,
       int nReps,
       IEnumerable<int> maxSizes
@@ -85,4 +167,5 @@
             MaxSize = maxSize,
             Problem = problemFactory(problemSeed),
+            Policy = policyFactory(),
             RandSeed = solverSeed
           };
@@ -94,9 +177,10 @@
       int randSeed,
       IProblem problem,
+      IBanditPolicy policy,
       int maxIters,
       int maxSize
       ) {
       var solver = new SequentialSearch(problem, maxSize, new Random(randSeed), 0,
-        new GenericGrammarPolicy(problem, new UCB1Policy(), false));
+        new GenericGrammarPolicy(problem, policy, false));
       var problemName = problem.GetType().Name;
       var bestKnownQuality = problem.BestKnownQuality(maxSize);
