Index: branches/2886_SymRegGrammarEnumeration/Test/GrammarEnumerationTest.cs
===================================================================
--- branches/2886_SymRegGrammarEnumeration/Test/GrammarEnumerationTest.cs	(revision 15714)
+++ branches/2886_SymRegGrammarEnumeration/Test/GrammarEnumerationTest.cs	(revision 15723)
@@ -1,4 +1,3 @@
 ﻿using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration;
@@ -10,10 +9,13 @@
 
 namespace HeuristicLab.Algorithms.DataAnalysis.MctsSymbolicRegression {
-  //[TestClass()]
+  [TestClass()]
   public class MctsSymbolicRegressionTest {
     private const int Seed = 1234;
     private IRandom rand;
 
-    private const double SuccessThreshold = 0.99999;
+    private const double SuccessThreshold = 0.9999999;
+
+    private GrammarEnumerationAlgorithm alg;
+    private RegressionProblem problem;
 
     [TestInitialize]
@@ -21,30 +23,66 @@
       Console.Write("init called... ");
       rand = new FastRandom(Seed);
-    }
+
+      alg = new GrammarEnumerationAlgorithm();
+      problem = new RegressionProblem();
+      alg.Problem = problem;
+      alg.GuiUpdateInterval = int.MaxValue;
+    }
+
+
+    private void TestGrammarEnumeration(IRegressionProblemData problemData) {
+      alg.Problem.ProblemData = problemData;
+
+      // Run
+      alg.Start();
+
+      // Evaluate results
+      var eps = 1.0 - SuccessThreshold;
+
+      // Check if algorithm terminated correctly
+      Assert.IsTrue(alg.Results.ContainsKey("Best solution quality (training)"), "No training solution returned!");
+      Assert.IsTrue(alg.Results.ContainsKey("Best solution quality (test)"), "No test solution returned!");
+
+      // Check resultss
+      Assert.AreEqual(1.0, ((DoubleValue)alg.Results["Best solution quality (training)"].Value).Value, eps, "Training quality too low!");
+      Assert.AreEqual(1.0, ((DoubleValue)alg.Results["Best solution quality (test)"].Value).Value, eps, "Test quality too low!");
+
+      // Check overfitting
+      Assert.AreEqual(alg.Results["Best solution string (training)"].Value.ToString(),
+                      alg.Results["Best solution string (test)"].Value.ToString());
+    }
+
 
     #region test structure search (no constants)
     [TestMethod]
-    [TestCategory("Algorithms.DataAnalysis")]
-    [TestProperty("Time", "short")]
+    [TestProperty("Goal", "structure search")]
     public void MctsSymbReg_NoConstants_Nguyen1() {
       // x³ + x² + x
+      alg.MaxTreeSize = 15;
       var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed);
       var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F1 ")));
       TestGrammarEnumeration(regProblem);
-    }
-    [TestMethod]
-    [TestCategory("Algorithms.DataAnalysis")]
-    [TestProperty("Time", "short")]
+
+      Console.WriteLine("Nguyen1: " + alg.Results["Best solution string (training)"].Value);
+    }
+
+    [TestMethod]
+    [TestProperty("Goal", "structure search")]
     public void MctsSymbReg_NoConstants_Nguyen2() {
       // x^4 + x³ + x² + x
+      alg.MaxTreeSize = 20;
       var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed);
       var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F2 ")));
       TestGrammarEnumeration(regProblem);
-    }
-    [TestMethod]
-    [TestCategory("Algorithms.DataAnalysis")]
-    [TestProperty("Time", "short")]
+
+      Console.WriteLine("Nguyen2: " + alg.Results["Best solution string (training)"].Value);
+    }
+
+    /*  NEXT UP
+    [TestMethod]
+    [TestProperty("Goal", "structure search")]
     public void MctsSymbReg_NoConstants_Nguyen3() {
       // x^5 + x^4 + x³ + x² + x
+      alg.MaxTreeSize = 25;
       var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed);
       var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F3 ")));
@@ -52,13 +90,20 @@
     }
     [TestMethod]
-    [TestCategory("Algorithms.DataAnalysis")]
-    [TestProperty("Time", "short")]
+    [TestProperty("Goal", "structure search")]
     public void MctsSymbReg_NoConstants_Nguyen4() {
+
       // x^6 + x^5 + x^4 + x³ + x² + x
+      alg.MaxTreeSize = 30;
       var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed);
       var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F4 ")));
       TestGrammarEnumeration(regProblem);
-    }
-
+    } */
+
+
+    #endregion
+
+    #region TODO
+
+#if false
     [TestMethod]
     [TestCategory("Algorithms.DataAnalysis")]
@@ -357,5 +402,4 @@
       TestGrammarEnumeration(problemData);
     }
-    #endregion
 
     #region restricted structure but including numeric constants
@@ -557,26 +601,6 @@
     #endregion
 
-    private void TestGrammarEnumeration(IRegressionProblemData problemData)
-    {
-      // Configure algorithm and problem
-      var alg = new GrammarEnumerationAlgorithm();
-      var problem = new RegressionProblem();
-      alg.Problem = problem;
-      problem.ProblemData = problemData;
-      
-      // Run
-      alg.Start();
-
-      // Evaluate results
-      var eps = 1.0 - SuccessThreshold;
-
-      // Check if algorithm terminated correctly
-      Assert.IsTrue(alg.Results.ContainsKey("Best solution quality (training)"), "No training solution returned!");
-      Assert.IsTrue(alg.Results.ContainsKey("Best solution quality (test)"), "No test solution returned!");
-
-      // Check resultss
-      Assert.AreEqual(1.0, ((DoubleValue)alg.Results["Best solution quality (training)"].Value).Value, eps, "Training quality too low!");
-      Assert.AreEqual(1.0, ((DoubleValue)alg.Results["Best solution quality (test)"].Value).Value, eps, "Test quality too low!");
-    }
+#endif
+    #endregion
   }
 }
