Index: branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs
===================================================================
--- branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs	(revision 11865)
+++ branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs	(revision 11895)
@@ -3,4 +3,5 @@
 using System.Diagnostics;
 using System.Globalization;
+using System.Runtime.Remoting.Messaging;
 using System.Text;
 using System.Threading;
@@ -13,4 +14,5 @@
 using HeuristicLab.Algorithms.GrammaticalOptimization;
 using HeuristicLab.Problems.GrammaticalOptimization;
+using HeuristicLab.Problems.GrammaticalOptimization.SymbReg;
 using BoltzmannExplorationPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.BoltzmannExplorationPolicy;
 using EpsGreedyPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.EpsGreedyPolicy;
@@ -25,7 +27,7 @@
 
       //RunDemo();
-      //RunGpDemo();
+      RunGpDemo();
       // RunGridTest();
-      RunGpGridTest();
+      //RunGpGridTest();
     }
 
@@ -297,4 +299,8 @@
       const int maxIterations = 100000;
 
+      //var prob = new SymbolicRegressionProblem(new Random(31415), "Tower");
+      var prob = new SymbolicRegressionPoly10Problem();
+      var sgp = new OffspringSelectionGP(prob, new Random(seed), true);
+      RunGP(sgp, prob, 200000, 500, 0.15, 50);
     }
 
@@ -303,26 +309,31 @@
       const int nReps = 20;
       const int seed = 31415;
-      const int maxIters = 100000;
+      const int maxIters = 200000;
       var rand = new Random(seed);
       var problemFactories = new Func<ISymbolicExpressionTreeProblem>[]
       {
+        () => new SymbolicRegressionPoly10Problem(), 
         () => new SantaFeAntProblem(), 
-        () => new SymbolicRegressionPoly10Problem(), 
-      };
-      foreach (var popSize in new int[] { 50, 100, 250, 500, 1000, 2500, 5000 }) {
-        foreach (var mutationRate in new double[] {/* 0.05, 0.10, */ 0.15, /* 0.25, 0.3 */ }) {
-          foreach (var maxSize in new int[] { 30, 50, 100 }) {
-            foreach (var problemFactory in problemFactories)
-              for (int i = 0; i < nReps; i++) {
-                var solverSeed = rand.Next();
-                {
-                  var prob = problemFactory();
-                  RunStandardGP(prob, solverSeed, maxIters, popSize, mutationRate, maxSize);
+      };
+      foreach (var popSize in new int[] { 50, 100, 250, 500, 1000, 2500, 5000, 10000 }) {
+        foreach (var mutationRate in new double[] { /* 0.05, /* 0.10, */ 0.15, /* 0.25, 0.3 */}) {
+          foreach (var maxSize in new int[] { 30, 50, 100, 150, 250 }) {
+            // skip experiments that are already done
+            if (popSize == 10000 || maxSize == 150 || maxSize == 250) {
+              foreach (var problemFactory in problemFactories)
+                for (int i = 0; i < nReps; i++) {
+                  var solverSeed = rand.Next();
+                  {
+                    var prob = problemFactory();
+                    var sgp = new StandardGP(prob, new Random(solverSeed));
+                    RunGP(sgp, prob, maxIters, popSize, mutationRate, maxSize);
+                  }
+                  // {
+                  //   var prob = problemFactory();
+                  //   var osgp = new OffspringSelectionGP(prob, new Random(solverSeed));
+                  //   RunGP(osgp, prob, maxIters, popSize, mutationRate, maxSize);
+                  // }
                 }
-                {
-                  var prob = problemFactory();
-                  RunOSGP(prob, solverSeed, maxIters, popSize, mutationRate, maxSize);
-                }
-              }
+            }
           }
         }
@@ -330,15 +341,15 @@
     }
 
-    private static void RunStandardGP(ISymbolicExpressionTreeProblem prob, int solverSeed, int maxIters, int popSize, double mutationRate, int maxSize) {
+    private static void RunGP(IGPSolver gp, ISymbolicExpressionTreeProblem prob, int maxIters, int popSize, double mutationRate, int maxSize) {
       int iterations = 0;
       var globalStatistics = new SentenceSetStatistics(prob.BestKnownQuality(maxSize));
-
-      var gp = new StandardGP(prob, new Random(solverSeed));
+      var gpName = gp.GetType().Name;
+      var probName = prob.GetType().Name;
       gp.SolutionEvaluated += (sentence, quality) => {
         iterations++;
         globalStatistics.AddSentence(sentence, quality);
 
-        if (iterations % 10000 == 0) {
-          Console.WriteLine("\"{0,25}\" \"{1,25}\" {2}", gp, prob, globalStatistics);
+        if (iterations % 1000 == 0) {
+          Console.WriteLine("\"{0,25}\" {1} {2:N2} {3} \"{4,25}\" {5}", gpName, popSize, mutationRate, maxSize, probName, globalStatistics);
         }
       };
@@ -349,49 +360,5 @@
       gp.MaxSolutionDepth = maxSize + 2;
 
-      var sw = new Stopwatch();
-
-      sw.Start();
       gp.Run(maxIters);
-      sw.Stop();
-
-      Console.WriteLine("\"{0,25}\" \"{1,25}\" {2}", gp, prob, globalStatistics);
-
-      // Console.WriteLine("{0:F2} sec {1,10:F1} sols/sec {2,10:F1} ns/sol",
-      //   sw.Elapsed.TotalSeconds,
-      //   maxIters / (double)sw.Elapsed.TotalSeconds,
-      //   (double)sw.ElapsedMilliseconds * 1000 / maxIters);
-    }
-
-    private static void RunOSGP(ISymbolicExpressionTreeProblem prob, int solverSeed, int maxIters, int popSize, double mutationRate, int maxSize) {
-      int iterations = 0;
-      var globalStatistics = new SentenceSetStatistics(prob.BestKnownQuality(maxSize));
-
-      var gp = new OffspringSelectionGP(prob, new Random(solverSeed));
-      gp.SolutionEvaluated += (sentence, quality) => {
-        iterations++;
-        globalStatistics.AddSentence(sentence, quality);
-
-        if (iterations % 10000 == 0) {
-          Console.WriteLine("\"{0,25}\" \"{1,25}\" {2}", gp, prob, globalStatistics);
-        }
-      };
-
-      gp.PopulationSize = popSize;
-      gp.MutationRate = mutationRate;
-      gp.MaxSolutionSize = maxSize + 2;
-      gp.MaxSolutionDepth = maxSize + 2;
-
-      var sw = new Stopwatch();
-
-      sw.Start();
-      gp.Run(maxIters);
-      sw.Stop();
-
-      Console.WriteLine("\"{0,25}\" \"{1,25}\" {2}", gp, prob, globalStatistics);
-
-      // Console.WriteLine("{0:F2} sec {1,10:F1} sols/sec {2,10:F1} ns/sol",
-      //   sw.Elapsed.TotalSeconds,
-      //   maxIters / (double)sw.Elapsed.TotalSeconds,
-      //   (double)sw.ElapsedMilliseconds * 1000 / maxIters);
     }
   }
