Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/GrammaticalOptimization.sln
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/GrammaticalOptimization.sln	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/GrammaticalOptimization.sln	(revision 11851)
@@ -3,6 +3,4 @@
 # Visual Studio 2012
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GrammaticalOptimization", "HeuristicLab.Problems.GrammaticalOptimization\HeuristicLab.Problems.GrammaticalOptimization.csproj", "{CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GrammaticalOptimization.Test", "HeuristicLab.Problems.GrammaticalOptimization.Test\HeuristicLab.Problems.GrammaticalOptimization.Test.csproj", "{3FB49880-7127-40D4-A9D3-A6C30BDDE885}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.GrammaticalOptimization", "HeuristicLab.Algorithms.GrammaticalOptimization\HeuristicLab.Algorithms.GrammaticalOptimization.csproj", "{EEA07488-1A51-412A-A52C-53B754A628B3}"
@@ -34,8 +32,4 @@
 		{CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3FB49880-7127-40D4-A9D3-A6C30BDDE885}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3FB49880-7127-40D4-A9D3-A6C30BDDE885}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3FB49880-7127-40D4-A9D3-A6C30BDDE885}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3FB49880-7127-40D4-A9D3-A6C30BDDE885}.Release|Any CPU.Build.0 = Release|Any CPU
 		{EEA07488-1A51-412A-A52C-53B754A628B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEA07488-1A51-412A-A52C-53B754A628B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/ActionInfos/ModelPolicyActionInfo.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/ActionInfos/ModelPolicyActionInfo.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/ActionInfos/ModelPolicyActionInfo.cs	(revision 11851)
@@ -12,5 +12,5 @@
     public double Value {
       get {
-        return model.SampleExpectedReward(new Random());
+        return model.Sample(new Random());
       }
     }
@@ -27,5 +27,5 @@
 
     public double SampleExpectedReward(Random random) {
-      return model.SampleExpectedReward(random);
+      return model.Sample(random);
     }
 
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/HeuristicLab.Algorithms.Bandits.csproj	(revision 11851)
@@ -31,7 +31,4 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ALGLIB-3.7.0">
-      <HintPath>..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -69,8 +66,4 @@
       <Name>HeuristicLab.Distributions</Name>
     </ProjectReference>
-    <ProjectReference Include="..\HeuristicLab.Problems.GrammaticalOptimization\HeuristicLab.Problems.GrammaticalOptimization.csproj">
-      <Project>{cb9dccf6-667e-4a13-b82d-dbd6b45a045e}</Project>
-      <Name>HeuristicLab.Problems.GrammaticalOptimization</Name>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/HeuristicLab.Algorithms.GeneticProgramming.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/HeuristicLab.Algorithms.GeneticProgramming.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/HeuristicLab.Algorithms.GeneticProgramming.csproj	(revision 11851)
@@ -67,14 +67,6 @@
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
     </Reference>
-    <Reference Include="HeuristicLab.SequentialEngine-3.3">
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/OffspringSelectionGP.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/OffspringSelectionGP.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/OffspringSelectionGP.cs	(revision 11851)
@@ -8,5 +8,4 @@
 using HeuristicLab.Problems.GrammaticalOptimization;
 using HeuristicLab.Selection;
-using HeuristicLab.SequentialEngine;
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 
@@ -33,5 +32,12 @@
     public override void Run(int maxEvaluations) {
       var hlProblem = new GenericSymbExprProblem(problem);
-      hlProblem.Evaluator.SolutionEvaluated += OnSolutionEvaluated; // raise solution evaluated event for each GP solution, don't scale quality to 0..1 
+      var onEvalLocker = new object();
+      hlProblem.Evaluator.SolutionEvaluated += (sentence, quality) => {
+        // raise solution evaluated event for each GP solution, don't scale quality to 0..1 
+        // need to synchronize in case we are using a parallel engine
+        lock (onEvalLocker) {
+          OnSolutionEvaluated(sentence, quality);
+        }
+      };
       hlProblem.MaximumSymbolicExpressionTreeLength.Value = MaxSolutionSize;
       hlProblem.MaximumSymbolicExpressionTreeDepth.Value = MaxSolutionDepth;
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/StandardGP.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/StandardGP.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/StandardGP.cs	(revision 11851)
@@ -8,5 +8,4 @@
 using HeuristicLab.Problems.GrammaticalOptimization;
 using HeuristicLab.Selection;
-using HeuristicLab.SequentialEngine;
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 
@@ -35,5 +34,12 @@
     public override void Run(int maxEvaluations) {
       var hlProblem = new GenericSymbExprProblem(problem);
-      hlProblem.Evaluator.SolutionEvaluated += OnSolutionEvaluated; // raise solution evaluated event for each GP solution, don't scale quality to 0..1 
+      var onEvalLocker = new object();
+      hlProblem.Evaluator.SolutionEvaluated += (sentence, quality) => {
+        // raise solution evaluated event for each GP solution, don't scale quality to 0..1 
+        // need to synchronize in case we are using a parallel engine
+        lock (onEvalLocker) {
+          OnSolutionEvaluated(sentence, quality);
+        }
+      };
       hlProblem.MaximumSymbolicExpressionTreeLength.Value = MaxSolutionSize;
       hlProblem.MaximumSymbolicExpressionTreeDepth.Value = MaxSolutionDepth;
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/BernoulliModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/BernoulliModel.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/BernoulliModel.cs	(revision 11851)
@@ -22,5 +22,5 @@
     }
 
-    public double SampleExpectedReward(Random random) {
+    public double Sample(Random random) {
       // sample bernoulli mean from beta prior
       return Rand.BetaRand(random, success + alpha, failure + beta);
@@ -41,8 +41,4 @@
     }
 
-    public void PrintStats() {
-      Console.Write("{0:F2} ", success / (double)failure);
-    }
-
     public object Clone() {
       return new BernoulliModel() { failure = this.failure, success = this.success };
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianMixtureModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianMixtureModel.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianMixtureModel.cs	(revision 11851)
@@ -23,5 +23,5 @@
 
 
-    public double SampleExpectedReward(Random random) {
+    public double Sample(Random random) {
       var k = Enumerable.Range(0, numComponents).SampleProportional(random, componentProbs);
       return alglib.invnormaldistribution(random.NextDouble()) * Math.Sqrt(componentVars[k]) + componentMeans[k];
@@ -96,8 +96,4 @@
       this.componentVars = Enumerable.Range(0, numComponents).Select((_) => 0.01).ToArray();
     }
-
-    public void PrintStats() {
-      throw new NotImplementedException();
-    }
   }
 }
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianModel.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/GaussianModel.cs	(revision 11851)
@@ -45,5 +45,5 @@
 
 
-    public double SampleExpectedReward(Random random) {
+    public double Sample(Random random) {
       if (knownVariance) {
         return SampleExpectedRewardKnownVariance(random);
@@ -113,8 +113,4 @@
     }
 
-    public void PrintStats() {
-      Console.Write("{0:F2} ", estimator.Avg);
-    }
-
     public object Clone() {
       if (knownVariance)
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/HeuristicLab.Distributions.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/HeuristicLab.Distributions.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/HeuristicLab.Distributions.csproj	(revision 11851)
@@ -36,9 +36,4 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/IModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/IModel.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/IModel.cs	(revision 11851)
@@ -8,8 +8,7 @@
   // represents a model for the reward distribution (of an action given a state)
   public interface IModel : ICloneable {
-    double SampleExpectedReward(Random random);
+    double Sample(Random random);
     void Update(double reward);
     void Reset();
-    void PrintStats();
   }
 }
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/LogitNormalModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/LogitNormalModel.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Distributions/LogitNormalModel.cs	(revision 11851)
@@ -13,6 +13,6 @@
 
 
-    public double SampleExpectedReward(Random random) {
-      return 1.0 / (1 + Math.Exp(-gaussian.SampleExpectedReward(random)));
+    public double Sample(Random random) {
+      return 1.0 / (1 + Math.Exp(-gaussian.Sample(random)));
     }
 
@@ -23,7 +23,4 @@
     public void Reset() {
       gaussian.Reset();
-    }
-
-    public void PrintStats() {
     }
 
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.Bandits/HeuristicLab.Problems.Bandits.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.Bandits/HeuristicLab.Problems.Bandits.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.Bandits/HeuristicLab.Problems.Bandits.csproj	(revision 11851)
@@ -36,9 +36,4 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/HeuristicLab.Problems.GrammaticalOptimization.SymbReg.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/HeuristicLab.Problems.GrammaticalOptimization.SymbReg.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/HeuristicLab.Problems.GrammaticalOptimization.SymbReg.csproj	(revision 11851)
@@ -31,11 +31,4 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
-    </Reference>
-    <Reference Include="AutoDiff-1.0">
-      <HintPath>..\..\..\trunk\sources\bin\AutoDiff-1.0.dll</HintPath>
-    </Reference>
     <Reference Include="HeuristicLab.Common-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
@@ -47,13 +40,6 @@
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     </Reference>
-    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
-    </Reference>
     <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Problems.Instances-3.3">
@@ -65,9 +51,4 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/SymbolicRegressionProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/SymbolicRegressionProblem.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.SymbReg/SymbolicRegressionProblem.cs	(revision 11851)
@@ -5,5 +5,4 @@
 using System.Security.AccessControl;
 using System.Text;
-using AutoDiff;
 using HeuristicLab.Common;
 using HeuristicLab.Problems.DataAnalysis;
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Grammar.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Grammar.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Grammar.cs	(revision 11851)
@@ -1,5 +1,4 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Data;
 using System.Diagnostics;
 using System.IO;
@@ -7,5 +6,4 @@
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Xml.Linq;
 using HeuristicLab.Common;
 
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization.csproj	(revision 11851)
@@ -72,8 +72,4 @@
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/FindPhrasesProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/FindPhrasesProblem.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/FindPhrasesProblem.cs	(revision 11851)
@@ -1,9 +1,6 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Data.Odbc;
 using System.Diagnostics;
 using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
 using HeuristicLab.Common;
 
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/Test.csproj
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/Test.csproj	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/Test.csproj	(revision 11851)
@@ -47,13 +47,7 @@
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     </Reference>
-    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Problems.Instances-3.3">
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3">
-      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     </Reference>
     <Reference Include="System" />
@@ -86,4 +80,8 @@
       <Project>{24408f7d-ee0f-4886-a08b-ec324d662e47}</Project>
       <Name>HeuristicLab.Algorithms.Bandits</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Algorithms.GeneticProgramming\HeuristicLab.Algorithms.GeneticProgramming.csproj">
+      <Project>{14BEC23F-63FD-4954-B8AE-E2F4962E9B57}</Project>
+      <Name>HeuristicLab.Algorithms.GeneticProgramming</Name>
     </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Algorithms.GrammaticalOptimization\HeuristicLab.Algorithms.GrammaticalOptimization.csproj">
Index: /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/TestSolvers.cs
===================================================================
--- /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/TestSolvers.cs	(revision 11850)
+++ /branches/HeuristicLab.Problems.GrammaticalOptimization/Test/TestSolvers.cs	(revision 11851)
@@ -1,3 +1,4 @@
 ﻿using System;
+using HeuristicLab.Algorithms.GeneticProgramming;
 using HeuristicLab.Algorithms.GrammaticalOptimization;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -128,4 +129,51 @@
     }
 
+    [TestMethod]
+    public void TestStandardGP() {
+      var prob = new SymbolicRegressionPoly10Problem();
+      var rand = new Random(31415);
+      var sgp = new StandardGP(prob, rand);
+      sgp.PopulationSize = 10000;
+      sgp.MaxSolutionSize = 50;
+      sgp.MaxSolutionDepth = 20;
+
+      string bestSentence = string.Empty;
+      double bestQuality = double.NegativeInfinity;
+
+      sgp.FoundNewBestSolution += (sentence, quality) => {
+        Assert.Inconclusive(string.Format("{0:N3} {1}", quality, sentence));
+        bestSentence = sentence;
+        bestQuality = quality;
+      };
+
+      sgp.Run(100000);
+
+      Assert.AreEqual(1.0, bestQuality, 1E-6);
+      Assert.AreEqual("", bestSentence);
+    }
+
+    [TestMethod]
+    public void TestOSGP() {
+      var prob = new SymbolicRegressionPoly10Problem();
+      var rand = new Random(31415);
+      var osgp = new OffspringSelectionGP(prob, rand);
+      osgp.PopulationSize = 1000;
+      osgp.MaxSolutionSize = 50;
+      osgp.MaxSolutionDepth = 20;
+
+      string bestSentence = string.Empty;
+      double bestQuality = double.NegativeInfinity;
+
+      osgp.FoundNewBestSolution += (sentence, quality) => {
+        Assert.Inconclusive(string.Format("{0:N3} {1}", quality, sentence));
+        bestSentence = sentence;
+        bestQuality = quality;
+      };
+
+      osgp.Run(100000);
+
+      Assert.AreEqual(1.0, bestQuality, 1E-6);
+      Assert.AreEqual("", bestSentence);
+    }
   }
 }
