Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/HeuristicLab.Problems.GaussianProcessTuning.Tests.csproj
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/HeuristicLab.Problems.GaussianProcessTuning.Tests.csproj	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/HeuristicLab.Problems.GaussianProcessTuning.Tests.csproj	(revision 8753)
@@ -0,0 +1,99 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{98C8AD2B-B035-4863-A01E-B659465FF6B2}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.GaussianProcessTuning.Tests</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.GaussianProcessTuning.Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <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.Random-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.SequentialEngine-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Windows.Forms" />
+  </ItemGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="UnitTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Problems.GaussianProcessTuning\HeuristicLab.Problems.GaussianProcessTuning.csproj">
+      <Project>{9A04599C-D608-4240-8DA6-D41F51C515A3}</Project>
+      <Name>HeuristicLab.Problems.GaussianProcessTuning</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/Properties/AssemblyInfo.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/Properties/AssemblyInfo.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/Properties/AssemblyInfo.cs	(revision 8753)
@@ -0,0 +1,35 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.GaussianProcessTuning.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("HeuristicLab.Problems.GaussianProcessTuning.Tests")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("27ac3742-85a5-46d9-bd4e-d0c465ea0f6a")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.Tests/UnitTest.cs	(revision 8753)
@@ -0,0 +1,85 @@
+﻿using System;
+using System.Linq;
+using System.Threading;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning.Tests {
+  [TestClass]
+  public class UnitTest {
+    [TestMethod]
+    public void TestGrammar() {
+      var g = new Grammar();
+      var r = new MersenneTwister();
+      var trees = (from i in Enumerable.Range(0, 1000)
+                   select
+                     HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ProbabilisticTreeCreator.Create(r, g, 100, 10))
+        .ToArray();
+    }
+
+    [TestMethod]
+    public void TestInterpreter() {
+      var interpreter = new Interpreter();
+      var g = new Grammar();
+      g.Symbols.Single(s => s is MeanMask).Enabled = true;
+      g.Dimension = 1;
+      var r = new MersenneTwister(31415);
+      var problemData = new RegressionProblemData();
+
+      for (int i = 0; i < 1000; i++) {
+        var t = HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ProbabilisticTreeCreator.Create(r, g, 50, 7);
+        Console.WriteLine(interpreter.EvaluateGaussianProcessConfiguration(t, problemData));
+      }
+    }
+
+    [TestMethod]
+    public void TestGeneticAlgorithm() {
+      var prob = new Problem();
+      prob.DimensionParameter.Value.Value = 1;
+      var ga = new GeneticAlgorithm();
+      ga.Engine = new SequentialEngine.SequentialEngine();
+      ga.PopulationSize.Value = 100;
+      ga.MaximumGenerations.Value = 10;
+      ga.Problem = prob;
+
+      var signal = new AutoResetEvent(false);
+      Exception ex = null;
+
+      ga.ExceptionOccurred += (sender, args) => {
+        ex = args.Value;
+        signal.Set();
+      };
+      ga.Stopped += (sender, args) => {
+        signal.Set();
+      };
+
+      ga.Prepare();
+      ga.Start();
+
+      signal.WaitOne();
+      if (ex != null) throw ex;
+
+    }
+
+    /*
+    [TestMethod]
+    public void TestInterpreterPrediction() {
+      var interpreter = new Interpreter();
+      var g = new Grammar();
+      g.Symbols.Single(s => s is MeanMask).Enabled = true;
+      g.Dimension = 1;
+      var r = new MersenneTwister(31415);
+      var problemData = new RegressionProblemData();
+
+      double[] means;
+      double[] stdDev;
+      for (int i = 0; i < 10; i++) {
+        var t = HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ProbabilisticTreeCreator.Create(r, g, 50, 7);
+        interpreter.EvaluateGaussianProcessConfiguration(t, problemData, problemData.Dataset, problemData.TestIndices, out means, out stdDev);
+      }
+    }
+     */
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.sln
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.sln	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning.sln	(revision 8753)
@@ -0,0 +1,36 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GaussianProcessTuning", "HeuristicLab.Problems.GaussianProcessTuning\HeuristicLab.Problems.GaussianProcessTuning.csproj", "{9A04599C-D608-4240-8DA6-D41F51C515A3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GaussianProcessTuning.Tests", "HeuristicLab.Problems.GaussianProcessTuning.Tests\HeuristicLab.Problems.GaussianProcessTuning.Tests.csproj", "{98C8AD2B-B035-4863-A01E-B659465FF6B2}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3768D612-38EB-47D8-9E79-75D8E5AB00A8}"
+	ProjectSection(SolutionItems) = preProject
+		HeuristicLab.Problems.GaussianProcessTuning.vsmdi = HeuristicLab.Problems.GaussianProcessTuning.vsmdi
+		Local.testsettings = Local.testsettings
+		TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(TestCaseManagementSettings) = postSolution
+		CategoryFile = HeuristicLab.Problems.GaussianProcessTuning.vsmdi
+	EndGlobalSection
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9A04599C-D608-4240-8DA6-D41F51C515A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9A04599C-D608-4240-8DA6-D41F51C515A3}.Release|Any CPU.Build.0 = Release|Any CPU
+		{98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{98C8AD2B-B035-4863-A01E-B659465FF6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{98C8AD2B-B035-4863-A01E-B659465FF6B2}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/BestSolutionAnalyzer.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/BestSolutionAnalyzer.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/BestSolutionAnalyzer.cs	(revision 8753)
@@ -0,0 +1,110 @@
+﻿using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("Gaussian Process Solution Analyzer", "Analyzer that stores the best Gaussian process tuning solution.")]
+  public class BestSolutionAnalyzer : SingleSuccessorOperator, ISymbolicExpressionTreeAnalyzer {
+
+    private const string QualityParameterName = "Quality";
+    private const string SymbolicExpressionTreeParameterName = "GaussianProcessConfiguration";
+    private const string BestSolutionParameterName = "Best solution";
+    private const string ResultsParameterName = "Results";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string InterpreterParameterName = "Interpreter";
+    private const string SolutionParameterName = "Solution";
+
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public IScopeTreeLookupParameter<IGaussianProcessSolution> SolutionParameter {
+      get { return (IScopeTreeLookupParameter<IGaussianProcessSolution>)Parameters[SolutionParameterName]; }
+    }
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<Solution> BestSolutionParameter {
+      get { return (ILookupParameter<Solution>)Parameters[BestSolutionParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    public ILookupParameter<IRegressionProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<Interpreter> InterpreterParameter {
+      get { return (ILookupParameter<Interpreter>)Parameters[InterpreterParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected BestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected BestSolutionAnalyzer(BestSolutionAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public BestSolutionAnalyzer() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The solution quality of the Gaussian process configuration."));
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The Gaussian process configuration to evaluate represented as symbolic expression tree."));
+      Parameters.Add(new ScopeTreeLookupParameter<IGaussianProcessSolution>(SolutionParameterName, "The solution of the Gaussian process algorithm."));
+      Parameters.Add(new LookupParameter<Solution>(BestSolutionParameterName, "The best Gaussian process configuration."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection of the algorithm."));
+      Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, ""));
+      Parameters.Add(new LookupParameter<Interpreter>(InterpreterParameterName, ""));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestSolutionAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      var trees = SymbolicExpressionTreeParameter.ActualValue;
+      var qualities = QualityParameter.ActualValue;
+      var solutions = SolutionParameter.ActualValue;
+      // find max tree
+      double maxQuality = double.PositiveInfinity;
+      ISymbolicExpressionTree bestTree = null;
+      IGaussianProcessSolution bestSolution = null;
+      for (int i = 0; i < qualities.Length; i++) {
+        if (qualities[i].Value < maxQuality) {
+          maxQuality = qualities[i].Value;
+          bestTree = trees[i];
+          bestSolution = solutions[i];
+        }
+      }
+      var cloner = new Cloner();
+      var problemData = cloner.Clone(ProblemDataParameter.ActualValue);
+      var interpreter = cloner.Clone(InterpreterParameter.ActualValue);
+      bestTree = cloner.Clone(bestTree);
+      var bestModel = new GaussianProcessRegressionModel(bestTree, problemData, interpreter);
+      var bestSolutionConfiguration = new Solution(bestModel, problemData);
+
+      BestSolutionParameter.ActualValue = bestSolutionConfiguration;
+
+      var resultCollection = ResultParameter.ActualValue;
+      if (!resultCollection.ContainsKey(BestSolutionParameterName)) {
+        resultCollection.Add(new Result(BestSolutionParameterName, "The best Gaussian process solution", bestSolutionConfiguration));
+        resultCollection.Add(new Result(SolutionParameterName, "The Gaussian process algorithm solution", bestSolution));
+      } else {
+        resultCollection[BestSolutionParameterName].Value = bestSolutionConfiguration;
+        resultCollection[SolutionParameterName].Value = bestSolution;
+      }
+
+      return base.Apply();
+    }
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Evaluator.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Evaluator.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Evaluator.cs	(revision 8753)
@@ -0,0 +1,73 @@
+﻿using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("Gaussian Process Configuration Evaluator", "Evaluator for the Gaussian process Configuration problem.")]
+  public class Evaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
+
+    private const string QualityParameterName = "Quality";
+    private const string GaussianProcessConfigurationParameterName = "GaussianProcessConfiguration";
+    private const string InterpreterParameterName = "Interpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string SolutionParameterName = "Solution";
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<IGaussianProcessSolution> SolutionParameter {
+      get { return (ILookupParameter<IGaussianProcessSolution>)Parameters[SolutionParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> GaussianProcessConfigurationParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[GaussianProcessConfigurationParameterName]; }
+    }
+    public ILookupParameter<Interpreter> InterpreterParameter {
+      get { return (ILookupParameter<Interpreter>)Parameters[InterpreterParameterName]; }
+    }
+    public ILookupParameter<IRegressionProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected Evaluator(bool deserializing) : base(deserializing) { }
+    protected Evaluator(Evaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Evaluator() {
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The solution quality of the Gaussian process configuration."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(GaussianProcessConfigurationParameterName, "The Gaussian process configuration to evaluate represented as symbolic expression tree."));
+      Parameters.Add(new LookupParameter<Interpreter>(InterpreterParameterName, "The interpreter to use for evaluating Gaussian process configurations represented as trees."));
+      Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, "To regression problem data for which to learn a Gaussian process."));
+      Parameters.Add(new LookupParameter<IGaussianProcessSolution>(SolutionParameterName, "The solution produced by Gaussian process regression algorithm"));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Evaluator(this, cloner);
+    }
+    public override IOperation Apply() {
+      ISymbolicExpressionTree tree = GaussianProcessConfigurationParameter.ActualValue;
+
+      double quality;
+      IGaussianProcessSolution solution;
+      InterpreterParameter.ActualValue.EvaluateGaussianProcessConfiguration(tree, ProblemDataParameter.ActualValue, out quality, out solution);
+
+      QualityParameter.ActualValue = new DoubleValue(quality);
+      if (solution != null)
+        SolutionParameter.ActualValue = solution;
+      return base.Apply();
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.cs	(revision 8753)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [View("Gaussian Process model view")]
+  [Content(typeof(GaussianProcessRegressionModel), true)]
+  public partial class GaussianProcessRegressionModelView : AsynchronousContentView {
+    public GaussianProcessRegressionModelView()
+      : base() {
+      InitializeComponent();
+    }
+
+    public new GaussianProcessRegressionModel Content {
+      get { return (GaussianProcessRegressionModel)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null)
+        symbolicExpressionTreeView.Content = Content.Configuration;
+      else
+        symbolicExpressionTreeView.Content = null;
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.designer.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.designer.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessModelView.designer.cs	(revision 8753)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  partial class GaussianProcessRegressionModelView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.symbolicExpressionTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView();
+      this.SuspendLayout();
+      // 
+      // expressionTreeView
+      // 
+      this.symbolicExpressionTreeView.AllowDrop = true;
+      this.symbolicExpressionTreeView.Caption = "Graphical SymbolicExpressionTree View";
+      this.symbolicExpressionTreeView.Content = null;
+      this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0);
+      this.symbolicExpressionTreeView.Name = "expressionTreeView";
+      this.symbolicExpressionTreeView.ReadOnly = false;
+      this.symbolicExpressionTreeView.Size = new System.Drawing.Size(352, 413);
+      this.symbolicExpressionTreeView.TabIndex = 0;
+      // 
+      // SymbolicExpressionModelView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.symbolicExpressionTreeView);
+      this.Name = "SymbolicExpressionModelView";
+      this.Size = new System.Drawing.Size(352, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+    private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView symbolicExpressionTreeView;
+
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessRegressionModel.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessRegressionModel.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/GaussianProcessRegressionModel.cs	(revision 8753)
@@ -0,0 +1,55 @@
+﻿using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("GaussianProcessRegressionModel", "A Gaussian process model")]
+  public class GaussianProcessRegressionModel : NamedItem, IRegressionModel {
+    [Storable]
+    private ISymbolicExpressionTree configuration;
+    public ISymbolicExpressionTree Configuration { get { return configuration; } }
+
+    [Storable]
+    private IRegressionProblemData trainingData;
+    [Storable]
+    private Interpreter interpreter;
+
+    [StorableConstructor]
+    protected GaussianProcessRegressionModel(bool deserializing) : base(deserializing) { }
+    protected GaussianProcessRegressionModel(GaussianProcessRegressionModel original, Cloner cloner)
+      : base(original, cloner) {
+      this.configuration = cloner.Clone(original.configuration);
+      this.trainingData = cloner.Clone(original.trainingData);
+      this.interpreter = cloner.Clone(original.interpreter);
+    }
+    public GaussianProcessRegressionModel(ISymbolicExpressionTree configuration, IRegressionProblemData trainingData, Interpreter interpreter) {
+      this.Name = "GaussianProcessRegressionModel";
+      this.Description = "A Gaussian process model";
+      this.configuration = configuration;
+      this.trainingData = trainingData;
+      this.interpreter = interpreter;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GaussianProcessRegressionModel(this, cloner);
+    }
+
+    public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
+      return new Solution(this, problemData);
+    }
+
+    public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
+      //if (!rows.Any()) return Enumerable.Empty<double>();
+
+      //double[] means, variances;
+      //interpreter.EvaluateGaussianProcessConfiguration(configuration, trainingData, dataset, rows, out means,
+      //                                                 out variances);
+      //return means;
+      return rows.Select(x => 0.0);
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Grammar.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Grammar.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Grammar.cs	(revision 8753)
@@ -0,0 +1,150 @@
+﻿using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("Gaussian Process Configuration Grammar", "The grammar for the Gaussian process configration problem.")]
+  public sealed class Grammar : SymbolicExpressionGrammar {
+    [Storable]
+    private int dimension;
+    public int Dimension {
+      get { return dimension; }
+      set {
+        if (dimension != value) {
+          dimension = value;
+          UpdateSymbolDimension();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    private Grammar(bool deserializing) : base(deserializing) { }
+    private Grammar(Grammar original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Grammar()
+      : base("Gaussian Process Configuration Grammar", "The grammar for the Gaussian process configuration problem.") {
+      Dimension = 10;
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Grammar(this, cloner);
+    }
+    private void Initialize() {
+      // create all symbols
+      //var meanOne = new MeanOne();
+      var meanConst = new MeanConst();
+      var meanLinear = new MeanLinear(Dimension);
+      //var meanScale = new MeanScale();
+      var meanSum = new MeanSum();
+      var meanProd = new MeanProd();
+      //var meanPow2 = new MeanPow(2) { Name = "MeanPow2" };
+      //var meanPow3 = new MeanPow(3) { Name = "MeanPow3" };
+      //var meanMask = new MeanMask(Dimension);
+      var covConst = new CovConst();
+      var covLin = new CovLin();
+      var covLinArd = new CovLinArd(Dimension);
+      var covSeArd = new CovSeArd(Dimension);
+      var covSeIso = new CovSeIso();
+      var covRQard = new CovRQArd(Dimension);
+      var covRQiso = new CovRQIso();
+      var covMatern1 = new CovMatern(1);
+      covMatern1.Name = "CovMatern1";
+      var covMatern3 = new CovMatern(3);
+      covMatern3.Name = "CovMatern3";
+      var covMatern5 = new CovMatern(5);
+      covMatern5.Name = "CovMatern5";
+      var covPeriodic = new CovPeriodic();
+      var covNoise = new CovNoise();
+      var covScale = new CovScale();
+      var covSum = new CovSum();
+      var covProd = new CovProd();
+      var covMask = new CovMask(Dimension);
+      var likGauss = new LikGauss();
+
+      var configurationStartSymbol = new ConfigurationStartSymbol();
+
+      var meanSymbols = new List<ISymbol>()
+                         {
+                            meanConst, 
+                            meanLinear,
+                            meanSum,  
+                            meanProd, 
+                            //meanPow2, 
+                            //meanPow3, 
+                            //meanMask, 
+                         };
+      var covSymbols = new List<ISymbol>()
+                         {
+                            covConst, 
+                            covLin, 
+                            covLinArd, 
+                            covSeArd, 
+                            covSeIso, 
+                            covRQiso,
+                            covRQard,
+                            covMatern1,
+                            covMatern3,
+                            covMatern5,
+                            covPeriodic,
+                            covNoise,
+                            covScale, 
+                            covSum,
+                            covProd,  
+                            covMask, 
+                         };
+      var likSymbols = new List<ISymbol>()
+                         {
+                           likGauss
+                         };
+      var allSymbols = covSymbols.Concat(meanSymbols).Concat(likSymbols);
+
+      AddSymbol(configurationStartSymbol);
+      // add all symbols to the grammar
+      foreach (var s in allSymbols)
+        AddSymbol(s);
+
+      AddAllowedChildSymbol(StartSymbol, configurationStartSymbol, 0);
+
+      foreach (var meanSymbol in meanSymbols) {
+        AddAllowedChildSymbol(configurationStartSymbol, meanSymbol, 0);
+      }
+      foreach (var covSymbol in covSymbols) {
+        AddAllowedChildSymbol(configurationStartSymbol, covSymbol, 1);
+      }
+      foreach (var likSymbol in likSymbols) {
+        AddAllowedChildSymbol(configurationStartSymbol, likSymbol, 2);
+      }
+      foreach (var meanFunctionSymbol in new ISymbol[] { meanSum, meanProd }) {
+        foreach (var meanSymbol in meanSymbols) {
+          for (int i = 0; i < meanFunctionSymbol.MaximumArity; i++) {
+            AddAllowedChildSymbol(meanFunctionSymbol, meanSymbol, i);
+          }
+        }
+      }
+
+      foreach (var covFunctionSymbol in new ISymbol[] { covSum, covProd, covMask, covScale }) {
+        foreach (var covSymbol in covSymbols) {
+          for (int i = 0; i < covFunctionSymbol.MaximumArity; i++) {
+            AddAllowedChildSymbol(covFunctionSymbol, covSymbol, i);
+          }
+        }
+      }
+    }
+
+    private void UpdateSymbolDimension() {
+      foreach (var s in Symbols.OfType<IDimensionSymbol>()) {
+        s.Dimension = dimension;
+      }
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.csproj
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.csproj	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning.csproj	(revision 8753)
@@ -0,0 +1,151 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{9A04599C-D608-4240-8DA6-D41F51C515A3}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.GaussianProcessTuning</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.GaussianProcessTuning-1.0</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\HeuristicLab\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject />
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.ALGLIB-3.6.0">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.ALGLIB-3.6.0.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-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.DataAnalysis.Symbolic.Regression-3.4">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Selection-3.3">
+      <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.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BestSolutionAnalyzer.cs" />
+    <Compile Include="GaussianProcessRegressionModel.cs" />
+    <Compile Include="GaussianProcessModelView.designer.cs" />
+    <Compile Include="Interpreter.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parameters.cs" />
+    <Compile Include="Provider.cs" />
+    <Compile Include="Solution.cs" />
+    <Compile Include="Grammar.cs" />
+    <Compile Include="Problem.cs" />
+    <Compile Include="Evaluator.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="GaussianProcessModelView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Symbols.cs" />
+    <Compile Include="TreeNodes.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter MATLAB.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter MATLAB.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter MATLAB.cs	(revision 8753)
@@ -0,0 +1,458 @@
+﻿using System;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using MLApp;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("Interpreter", "An interpreter for Gaussian process configurations represented as trees.")]
+  public class Interpreter : Item {
+    [ThreadStatic]
+    private MLApp.MLApp ml;
+
+    private MLApp.MLApp MLApp {
+      get {
+        if (ml == null) {
+          ml = new MLApp.MLApp();
+        }
+        return ml;
+      }
+    }
+
+    [StorableConstructor]
+    protected Interpreter(bool deserializing) : base(deserializing) { }
+    protected Interpreter(Interpreter original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public Interpreter()
+      : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Interpreter(this, cloner);
+    }
+
+    public double EvaluateGaussianProcessConfiguration(ISymbolicExpressionTree tree, IRegressionProblemData problemData) {
+      string meanExpression, meanHyperParameter;
+      string covExpression, covHyperParameter;
+      string likFunction, likHyperParameter;
+      GetMeanFunction(tree, problemData.AllowedInputVariables.Count(), out meanExpression, out meanHyperParameter);
+      GetCovFunction(tree, problemData.AllowedInputVariables.Count(), out covExpression, out covHyperParameter);
+      GetLikelihoodFunction(tree, out likFunction, out likHyperParameter);
+
+      double[,] y = new double[problemData.TrainingIndizes.Count(), 1];
+      double[,] yImg = new double[problemData.TrainingIndizes.Count(), 1];
+
+      int r, c;
+      r = 0;
+      foreach (var e in problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndizes)) {
+        y[r++, 0] = e;
+      }
+      double[,] x = new double[y.Length, problemData.AllowedInputVariables.Count()];
+      double[,] xImg = new double[y.Length, problemData.AllowedInputVariables.Count()];
+      c = 0;
+      foreach (var allowedInput in problemData.AllowedInputVariables) {
+        r = 0;
+        foreach (var e in problemData.Dataset.GetDoubleValues(allowedInput, problemData.TrainingIndizes)) {
+          x[r++, c] = e;
+        }
+        c++;
+      }
+
+      object oldX = null;
+      try { oldX = MLApp.GetVariable("x", "base"); }
+      catch {
+      }
+      if (oldX == null || oldX is Missing || ((double[,])oldX).Length != x.Length) {
+        MLApp.PutFullMatrix("y", "base", y, yImg);
+        MLApp.PutFullMatrix("x", "base", x, xImg);
+      }
+      ExecuteMatlab("hyp0 = " + GetHyperParameterString(meanHyperParameter, covHyperParameter, likHyperParameter) + ";");
+      ExecuteMatlab("infFun =  " + GetInferenceMethodString(tree) + ";");
+      ExecuteMatlab("meanExpr = " + meanExpression + ";");
+      ExecuteMatlab("covExpr = " + covExpression + ";");
+      ExecuteMatlab("likExp = " + likFunction + ";");
+      try
+      {
+        ExecuteMatlab("hyp = minimize(hyp0,'gp', -50, infFun, meanExpr, covExpr, likExp, x, y);");
+        ExecuteMatlab("[nlZ, dnlZ] = gp(hyp, infFun, meanExpr, covExpr, likExp, x, y);");
+        ExecuteMatlab("if isnan(nlZ) nlz = " + double.MaxValue + "; end;");
+        var d = MLApp.GetVariable("nlZ", "base");
+        if (d is Missing) return double.PositiveInfinity;
+        else return (double)d;
+      }
+      catch {
+        return double.PositiveInfinity;
+      }
+    }
+
+    public void EvaluateGaussianProcessConfiguration(ISymbolicExpressionTree tree, IRegressionProblemData trainingData, Dataset testData, IEnumerable<int> testRows,
+      out double[] means, out double[] variances) {
+      string meanExpression, meanHyperParameter;
+      string covExpression, covHyperParameter;
+      string likFunction, likHyperParameter;
+      GetMeanFunction(tree, trainingData.AllowedInputVariables.Count(), out meanExpression, out meanHyperParameter);
+      GetCovFunction(tree, trainingData.AllowedInputVariables.Count(), out covExpression, out covHyperParameter);
+      GetLikelihoodFunction(tree, out likFunction, out likHyperParameter);
+
+      double[,] y = new double[trainingData.TrainingIndizes.Count(), 1];
+      double[,] yImg = new double[trainingData.TrainingIndizes.Count(), 1];
+
+      int r, c;
+      r = 0;
+      foreach (var e in trainingData.Dataset.GetDoubleValues(trainingData.TargetVariable, trainingData.TrainingIndizes)) {
+        y[r++, 0] = e;
+      }
+      double[,] x = new double[y.Length, trainingData.AllowedInputVariables.Count()];
+      double[,] xImg = new double[y.Length, trainingData.AllowedInputVariables.Count()];
+      c = 0;
+      foreach (var allowedInput in trainingData.AllowedInputVariables) {
+        r = 0;
+        foreach (var e in trainingData.Dataset.GetDoubleValues(allowedInput, trainingData.TrainingIndizes)) {
+          x[r++, c] = e;
+        }
+        c++;
+      }
+
+      double[,] xTest = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
+      double[,] xTestImg = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
+      c = 0;
+      foreach (var allowedInput in trainingData.AllowedInputVariables) {
+        r = 0;
+        foreach (var e in testData.GetDoubleValues(allowedInput, testRows)) {
+          xTest[r++, c] = e;
+        }
+        c++;
+      }
+
+      object oldX = null;
+      try {
+        oldX = MLApp.GetVariable("x", "base");
+      }
+      catch {
+      }
+      if (oldX == null || oldX is Missing || ((double[,])oldX).Length != x.Length) {
+        MLApp.PutFullMatrix("y", "base", y, yImg);
+        MLApp.PutFullMatrix("x", "base", x, xImg);
+      }
+      MLApp.PutFullMatrix("xTest", "base", xTest, xTestImg);
+      ExecuteMatlab("hyp0 = " + GetHyperParameterString(meanHyperParameter, covHyperParameter, likHyperParameter) + ";");
+      ExecuteMatlab("infFun =  " + GetInferenceMethodString(tree) + ";");
+      ExecuteMatlab("meanExpr = " + meanExpression + ";");
+      ExecuteMatlab("covExpr = " + covExpression + ";");
+      ExecuteMatlab("likExp = " + likFunction + ";");
+      ExecuteMatlab(
+        "try " +
+        "  hyp = minimize(hyp0,'gp', -50, infFun, meanExpr, covExpr, likExp, x, y);" +
+        "  [ymu, ys2, fmu, fs2] = gp(hyp, infFun, meanExpr, covExpr, likExp, x, y, xTest); " +
+        "catch " +
+        "  ymu = zeros(size(xTest, 1), 1); " +
+        "  ys2 = ones(size(xTest, 1), 1); " +
+        "end");
+      var meansMat = (double[,])MLApp.GetVariable("ymu", "base");
+      var variancesMat = (double[,])MLApp.GetVariable("ys2", "base");
+      means = new double[meansMat.GetLength(0)];
+      for (int i = 0; i < means.Length; i++)
+        means[i] = meansMat[i, 0];
+      variances = new double[variancesMat.GetLength(0)];
+      for (int i = 0; i < variances.Length; i++)
+        variances[i] = variancesMat[i, 0];
+    }
+
+    private string GetInferenceMethodString(ISymbolicExpressionTree tree) {
+      return "'infEP'";
+    }
+
+    private void GetMeanFunction(ISymbolicExpressionTree tree, int dimension, out string expression, out string hyperParameter) {
+      var expressionBuilder = new StringBuilder();
+      var hyperParameterBuilder = new StringBuilder();
+      // var mask = CalculateMask(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(0)) ?? 
+      var mask = new bool[dimension];
+
+      hyperParameterBuilder.Append("[");
+
+      GetMeanFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(0), expressionBuilder, hyperParameterBuilder, mask);
+
+      hyperParameterBuilder.Append("]");
+
+      expression = expressionBuilder.ToString();
+      hyperParameter = hyperParameterBuilder.ToString();
+    }
+
+    private void GetCovFunction(ISymbolicExpressionTree tree, int dimension, out string expression, out string hyperParameter) {
+      var expressionBuilder = new StringBuilder();
+      var hyperParameterBuilder = new StringBuilder();
+      //expressionBuilder.Append("{");
+      hyperParameterBuilder.Append("[");
+
+      var mask = new bool[dimension];
+      GetCovFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(1), expressionBuilder, hyperParameterBuilder, mask);
+
+      hyperParameterBuilder.Append("]");
+      //expressionBuilder.Append("}");
+
+      expression = expressionBuilder.ToString();
+      hyperParameter = hyperParameterBuilder.ToString();
+    }
+
+
+    private void GetLikelihoodFunction(ISymbolicExpressionTree tree, out string expression, out string hyperParameter) {
+      var expressionBuilder = new StringBuilder();
+      var hyperParameterBuilder = new StringBuilder();
+      hyperParameterBuilder.Append("[");
+      GetLikelihoodFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(2), expressionBuilder,
+                                   hyperParameterBuilder);
+      hyperParameterBuilder.Append("]");
+      expression = expressionBuilder.ToString();
+      hyperParameter = hyperParameterBuilder.ToString();
+    }
+
+    private void GetLikelihoodFunction(ISymbolicExpressionTreeNode node, StringBuilder expressionBuilder, StringBuilder hyperParameterBuilder) {
+      if (node.Symbol is LikGauss) {
+        var likNode = node as LikGaussTreeNode;
+        expressionBuilder.Append("'likGauss'");
+        hyperParameterBuilder.Append(likNode.Sigma);
+      } else {
+        throw new ArgumentException("unknown likelihood function " + node.Symbol);
+      }
+    }
+
+    private string GetHyperParameterString(string meanHyp, string covHyp, string likHyp) {
+      return "struct('mean', " + meanHyp +
+             ", 'cov', " + covHyp +
+             ", 'lik', " + likHyp +
+             ")";
+      ;
+    }
+
+
+    private void GetCovFunction(ISymbolicExpressionTreeNode node, StringBuilder expressionStringBuilder, StringBuilder hyperParameterStringBuilder, bool[] mask) {
+      if (node.Symbol is CovConst) {
+        var constNode = node as CovConstTreeNode;
+        expressionStringBuilder.Append("{'covConst'}");
+        hyperParameterStringBuilder.Append(constNode.Sigma).Append("; ");
+      } else if (node.Symbol is CovLin) {
+        expressionStringBuilder.Append("{'covLIN'}");
+      } else if (node.Symbol is CovLinArd) {
+        var covNode = node as CovLinArdTreeNode;
+        expressionStringBuilder.Append("{'covLINard'}");
+        hyperParameterStringBuilder.Append(ToVectorString(covNode.Lambda, mask));
+      } else if (node.Symbol is CovSeArd) {
+        var covNode = node as CovSeArdTreeNode;
+        expressionStringBuilder.Append("{'covSEard'}");
+        hyperParameterStringBuilder.Append("[").Append(ToVectorString(covNode.Lambda, mask));
+        hyperParameterStringBuilder.AppendFormat("; {0} ]", covNode.Sigma);
+      } else if (node.Symbol is CovSeIso) {
+        var covNode = node as CovSeIsoTreeNode;
+        expressionStringBuilder.Append("{'covSEiso'}");
+        hyperParameterStringBuilder.AppendFormat("[{0}", covNode.L);
+        hyperParameterStringBuilder.AppendFormat("; {0}]", covNode.Sigma);
+      } else if (node.Symbol is CovSum) {
+        expressionStringBuilder.Append("{'covSum', {");
+        hyperParameterStringBuilder.Append("[");
+        GetCovFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          expressionStringBuilder.Append(", ");
+          hyperParameterStringBuilder.Append("; ");
+          GetCovFunction(subTree, expressionStringBuilder, hyperParameterStringBuilder, mask);
+        }
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}}");
+      } else if (node.Symbol is CovProd) {
+        expressionStringBuilder.Append("{'covProd', {");
+        hyperParameterStringBuilder.Append("[");
+        GetCovFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          expressionStringBuilder.Append(", ");
+          hyperParameterStringBuilder.Append("; ");
+          GetCovFunction(subTree, expressionStringBuilder, hyperParameterStringBuilder, mask);
+        }
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}}");
+      } else if (node.Symbol is CovScale) {
+        var covNode = node as CovScaleTreeNode;
+        expressionStringBuilder.Append("{'covScale', ");
+        hyperParameterStringBuilder.AppendFormat("[{0}; ", covNode.Alpha);
+        GetCovFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}");
+      } else if (node.Symbol is CovMask) {
+        var covNode = (CovMaskTreeNode)node;
+        // when nothing is masked then we can just return the child
+        if (!covNode.Mask.Any(t => t == false)) {
+          GetCovFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        } else {
+          expressionStringBuilder.Append("{'covMask', {");
+          hyperParameterStringBuilder.Append("[");
+          expressionStringBuilder.Append(ToVectorString(covNode.Mask)).Append(", ");
+          int startIndex = expressionStringBuilder.Length;
+          GetCovFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, covNode.Mask);
+          expressionStringBuilder.Remove(startIndex, 1);
+          expressionStringBuilder.Remove(expressionStringBuilder.Length - 1, 1);
+          hyperParameterStringBuilder.Append("]");
+          expressionStringBuilder.Append("}}");
+        }
+      } else {
+        throw new ArgumentException("unknown symbol " + node.Symbol);
+      }
+    }
+
+
+    private void GetMeanFunction(ISymbolicExpressionTreeNode node, StringBuilder expressionStringBuilder, StringBuilder hyperParameterStringBuilder, bool[] mask) {
+      if (node.Symbol is MeanConst) {
+        var constNode = node as MeanConstTreeNode;
+        expressionStringBuilder.Append("{'meanConst'}");
+        hyperParameterStringBuilder.Append(constNode.Value).Append("; ");
+      } else if (node.Symbol is MeanLinear) {
+        var meanLinNode = node as MeanLinearTreeNode;
+        expressionStringBuilder.Append("{'meanLinear'}");
+        hyperParameterStringBuilder.Append(ToVectorString(meanLinNode.Alpha, mask));
+      } else if (node.Symbol is MeanMask) {
+        var meanMaskNode = (MeanMaskTreeNode)node;
+        // when nothing is masked then we can just return the child
+        if (!meanMaskNode.Mask.Any(t => t == false)) {
+          GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        } else {
+          expressionStringBuilder.Append("{'meanMask', {");
+          hyperParameterStringBuilder.Append("[");
+          expressionStringBuilder.Append(ToVectorString(meanMaskNode.Mask)).Append(", ");
+          int startIndex = expressionStringBuilder.Length;
+          GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, meanMaskNode.Mask);
+          expressionStringBuilder.Remove(startIndex, 1);
+          expressionStringBuilder.Remove(expressionStringBuilder.Length - 1, 1);
+          hyperParameterStringBuilder.Append("]");
+          expressionStringBuilder.Append("}}");
+        }
+      } else if (node.Symbol is MeanOne) {
+        expressionStringBuilder.Append("{'meanOne'}");
+      } else if (node.Symbol is MeanPow) {
+        var meanPowSymbol = (MeanPow)node.Symbol;
+        expressionStringBuilder.Append("{'meanPow', {");
+        hyperParameterStringBuilder.Append("[");
+        expressionStringBuilder.Append(meanPowSymbol.Exponent).Append(", ");
+        GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}}");
+      } else if (node.Symbol is MeanProd) {
+        expressionStringBuilder.Append("{'meanProd', {");
+        hyperParameterStringBuilder.Append("[");
+        GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          expressionStringBuilder.Append(", ");
+          hyperParameterStringBuilder.Append("; ");
+          GetMeanFunction(subTree, expressionStringBuilder, hyperParameterStringBuilder, mask);
+        }
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}}");
+      } else if (node.Symbol is MeanScale) {
+        var meanScaleNode = node as MeanScaleTreeNode;
+        expressionStringBuilder.Append("{'meanScale', ");
+        hyperParameterStringBuilder.AppendFormat("[{0}; ", meanScaleNode.Alpha);
+        GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}");
+      } else if (node.Symbol is MeanSum) {
+        expressionStringBuilder.Append("{'meanSum', {");
+        hyperParameterStringBuilder.Append("[");
+        GetMeanFunction(node.GetSubtree(0), expressionStringBuilder, hyperParameterStringBuilder, mask);
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          expressionStringBuilder.Append(", ");
+          hyperParameterStringBuilder.Append("; ");
+          GetMeanFunction(subTree, expressionStringBuilder, hyperParameterStringBuilder, mask);
+        }
+        hyperParameterStringBuilder.Append("]");
+        expressionStringBuilder.Append("}}");
+      } else if (node.Symbol is MeanZero) {
+        expressionStringBuilder.Append("{'meanZero'}");
+      } else {
+        throw new ArgumentException("Unknown mean function", "node");
+      }
+    }
+
+    //private bool[] CalculateMask(ISymbolicExpressionTreeNode node) {
+    //  var maskNode = node as MeanMaskTreeNode;
+    //  if (maskNode != null) {
+    //    bool[] newMask = CombineMasksProd(maskNode.Mask, CalculateMask(node.GetSubtree(0)));
+    //    return newMask;
+    //  } else if (node.Symbol is MeanProd) {
+    //    bool[] newMask = CalculateMask(node.GetSubtree(0));
+    //    foreach (var subTree in node.Subtrees.Skip(1)) {
+    //      newMask = CombineMasksProd(newMask, CalculateMask(subTree));
+    //    }
+    //    return newMask;
+    //  } else if (node.Symbol is MeanSum) {
+    //    bool[] newMask = CalculateMask(node.GetSubtree(0));
+    //    foreach (var subTree in node.Subtrees.Skip(1)) {
+    //      newMask = CombineMasksSum(newMask, CalculateMask(subTree));
+    //    }
+    //    return newMask;
+    //  } else if (node.SubtreeCount == 1) {
+    //    return CalculateMask(node.GetSubtree(0));
+    //  } else if (node is SymbolicExpressionTreeTerminalNode) {
+    //    return null;
+    //  } else {
+    //    throw new NotImplementedException();
+    //  }
+    //}
+
+    //private bool[] CombineMasksProd(bool[] m, bool[] n) {
+    //  if (m == null) return n;
+    //  if (n == null) return m;
+    //  if (m.Length != n.Length) throw new ArgumentException();
+    //  bool[] res = new bool[m.Length];
+    //  for (int i = 0; i < res.Length; i++)
+    //    res[i] = m[i] | n[i];
+    //  return res;
+    //}
+
+
+    //private bool[] CombineMasksSum(bool[] m, bool[] n) {
+    //  if (m == null) return n;
+    //  if (n == null) return m;
+    //  if (m.Length != n.Length) throw new ArgumentException();
+    //  bool[] res = new bool[m.Length];
+    //  for (int i = 0; i < res.Length; i++)
+    //    res[i] = m[i] & n[i];
+    //  return res;
+    //}
+
+    private string ToVectorString(bool[] b) {
+      var strBuilder = new StringBuilder();
+      strBuilder.Append("[");
+      if (b.Length == 1) // workaround for bug in GPML
+      {
+        if (!b[0]) strBuilder.Append("1");
+      } else {
+        for (int i = 0; i < b.Length; i++) {
+          if (i > 0) strBuilder.Append(", ");
+          strBuilder.Append(b[i] ? "0" : "1");
+        }
+      }
+      strBuilder.Append("]");
+      return strBuilder.ToString();
+    }
+    private string ToVectorString(double[] xs, bool[] mask) {
+      if (xs.Length != mask.Length) throw new ArgumentException();
+      var strBuilder = new StringBuilder();
+      strBuilder.Append("[");
+      for (int i = 0; i < xs.Length; i++)
+        if (!mask[i]) {
+          if (i > 0) strBuilder.Append("; ");
+          strBuilder.Append(xs[i]);
+        }
+      strBuilder.Append("]");
+      return strBuilder.ToString();
+    }
+
+
+    private void ExecuteMatlab(string command) {
+      var result = MLApp.Execute(command);
+      if (result.Contains("???")) throw new ArgumentException(command + " " + result, "command");
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Interpreter.cs	(revision 8753)
@@ -0,0 +1,338 @@
+﻿using System;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Item("Interpreter", "An interpreter for Gaussian process configurations represented as trees.")]
+  public class Interpreter : Item {
+    [StorableConstructor]
+    protected Interpreter(bool deserializing) : base(deserializing) { }
+    protected Interpreter(Interpreter original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public Interpreter()
+      : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Interpreter(this, cloner);
+    }
+
+    public void EvaluateGaussianProcessConfiguration(ISymbolicExpressionTree tree, IRegressionProblemData problemData, out double negLogLikelihood, out IGaussianProcessSolution solution) {
+      var meanFunction = GetMeanFunction(tree);
+      var covFunction = GetCovFunction(tree);
+
+      var gprAlg = new GaussianProcessRegression();
+      gprAlg.Problem.ProblemDataParameter.Value = problemData;
+      gprAlg.CovarianceFunction = covFunction;
+      gprAlg.MeanFunction = meanFunction;
+
+      var signal = new AutoResetEvent(false);
+      double result = double.MaxValue;
+      IGaussianProcessSolution regSolution = null;
+      gprAlg.Stopped += (sender, args) => {
+        result = ((DoubleValue)gprAlg.Results["NegativeLogLikelihood"].Value).Value;
+        if (gprAlg.Results.ContainsKey("Solution"))
+          regSolution = (IGaussianProcessSolution)gprAlg.Results["Solution"].Value;
+        signal.Set();
+      };
+      Exception ex = null;
+      gprAlg.ExceptionOccurred += (sender, args) => {
+        result = double.MaxValue;
+        regSolution = null;
+        ex = args.Value;
+        signal.Set();
+      };
+
+      gprAlg.Prepare();
+      gprAlg.Start();
+
+      signal.WaitOne();
+      if (ex != null) throw ex;
+
+      gprAlg.Prepare();
+      gprAlg.Problem = null;
+      solution = regSolution;
+      negLogLikelihood = result;
+    }
+
+    /*
+    public void EvaluateGaussianProcessConfiguration(ISymbolicExpressionTree tree, IRegressionProblemData trainingData, Dataset testData, IEnumerable<int> testRows,
+      out double[] means, out double[] variances) {
+      string meanExpression, meanHyperParameter;
+      string covExpression, covHyperParameter;
+      string likFunction, likHyperParameter;
+      GetMeanFunction(tree, trainingData.AllowedInputVariables.Count(), out meanExpression, out meanHyperParameter);
+      GetCovFunction(tree, trainingData.AllowedInputVariables.Count(), out covExpression, out covHyperParameter);
+      GetLikelihoodFunction(tree, out likFunction, out likHyperParameter);
+
+      double[,] y = new double[trainingData.TrainingIndices.Count(), 1];
+      double[,] yImg = new double[trainingData.TrainingIndices.Count(), 1];
+
+      int r, c;
+      r = 0;
+      foreach (var e in trainingData.Dataset.GetDoubleValues(trainingData.TargetVariable, trainingData.TrainingIndices)) {
+        y[r++, 0] = e;
+      }
+      double[,] x = new double[y.Length, trainingData.AllowedInputVariables.Count()];
+      double[,] xImg = new double[y.Length, trainingData.AllowedInputVariables.Count()];
+      c = 0;
+      foreach (var allowedInput in trainingData.AllowedInputVariables) {
+        r = 0;
+        foreach (var e in trainingData.Dataset.GetDoubleValues(allowedInput, trainingData.TrainingIndices)) {
+          x[r++, c] = e;
+        }
+        c++;
+      }
+
+      double[,] xTest = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
+      double[,] xTestImg = new double[testRows.Count(), trainingData.AllowedInputVariables.Count()];
+      c = 0;
+      foreach (var allowedInput in trainingData.AllowedInputVariables) {
+        r = 0;
+        foreach (var e in testData.GetDoubleValues(allowedInput, testRows)) {
+          xTest[r++, c] = e;
+        }
+        c++;
+      }
+
+      object oldX = null;
+      try {
+        oldX = MLApp.GetVariable("x", "base");
+      }
+      catch {
+      }
+      if (oldX == null || oldX is Missing || ((double[,])oldX).Length != x.Length) {
+        MLApp.PutFullMatrix("y", "base", y, yImg);
+        MLApp.PutFullMatrix("x", "base", x, xImg);
+      }
+      MLApp.PutFullMatrix("xTest", "base", xTest, xTestImg);
+      ExecuteMatlab("hyp0 = " + GetHyperParameterString(meanHyperParameter, covHyperParameter, likHyperParameter) + ";");
+      ExecuteMatlab("infFun =  " + GetInferenceMethodString(tree) + ";");
+      ExecuteMatlab("meanExpr = " + meanExpression + ";");
+      ExecuteMatlab("covExpr = " + covExpression + ";");
+      ExecuteMatlab("likExp = " + likFunction + ";");
+      ExecuteMatlab(
+        "try " +
+        "  hyp = minimize(hyp0,'gp', -50, infFun, meanExpr, covExpr, likExp, x, y);" +
+        "  [ymu, ys2, fmu, fs2] = gp(hyp, infFun, meanExpr, covExpr, likExp, x, y, xTest); " +
+        "catch " +
+        "  ymu = zeros(size(xTest, 1), 1); " +
+        "  ys2 = ones(size(xTest, 1), 1); " +
+        "end");
+      var meansMat = (double[,])MLApp.GetVariable("ymu", "base");
+      var variancesMat = (double[,])MLApp.GetVariable("ys2", "base");
+      means = new double[meansMat.GetLength(0)];
+      for (int i = 0; i < means.Length; i++)
+        means[i] = meansMat[i, 0];
+      variances = new double[variancesMat.GetLength(0)];
+      for (int i = 0; i < variances.Length; i++)
+        variances[i] = variancesMat[i, 0];
+    }
+    */
+    private string GetInferenceMethodString(ISymbolicExpressionTree tree) {
+      return "'infEP'";
+    }
+
+    private IMeanFunction GetMeanFunction(ISymbolicExpressionTree tree) {
+      return GetMeanFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(0));
+    }
+
+    private ICovarianceFunction GetCovFunction(ISymbolicExpressionTree tree) {
+      return GetCovFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(1));
+    }
+
+
+    private void GetLikelihoodFunction(ISymbolicExpressionTree tree, out string expression, out string hyperParameter) {
+      var expressionBuilder = new StringBuilder();
+      var hyperParameterBuilder = new StringBuilder();
+      hyperParameterBuilder.Append("[");
+      GetLikelihoodFunction(tree.Root.GetSubtree(0).GetSubtree(0).GetSubtree(2), expressionBuilder,
+                                   hyperParameterBuilder);
+      hyperParameterBuilder.Append("]");
+      expression = expressionBuilder.ToString();
+      hyperParameter = hyperParameterBuilder.ToString();
+    }
+
+    private void GetLikelihoodFunction(ISymbolicExpressionTreeNode node, StringBuilder expressionBuilder, StringBuilder hyperParameterBuilder) {
+      if (node.Symbol is LikGauss) {
+        var likNode = node as LikGaussTreeNode;
+        expressionBuilder.Append("'likGauss'");
+        hyperParameterBuilder.Append(likNode.Sigma);
+      } else {
+        throw new ArgumentException("unknown likelihood function " + node.Symbol);
+      }
+    }
+
+    private string GetHyperParameterString(string meanHyp, string covHyp, string likHyp) {
+      return "struct('mean', " + meanHyp +
+             ", 'cov', " + covHyp +
+             ", 'lik', " + likHyp +
+             ")";
+      ;
+    }
+
+
+    private ICovarianceFunction GetCovFunction(ISymbolicExpressionTreeNode node) {
+      if (node.Symbol is CovConst) {
+        return new CovarianceConst();
+      } else if (node.Symbol is CovScale) {
+        return new CovarianceScale();
+      } else if (node.Symbol is CovMask) {
+        var maskNode = node as CovMaskTreeNode;
+        var covSymbol = node.Symbol as CovMask;
+        var cov = new CovarianceMask();
+        cov.SelectedDimensionsParameter.Value = new IntArray((from i in Enumerable.Range(0, covSymbol.Dimension)
+                                                              where maskNode.Mask[i]
+                                                              select i).ToArray());
+        return cov;
+      } else if (node.Symbol is CovLin) {
+        return new CovarianceLinear();
+      } else if (node.Symbol is CovLinArd) {
+        return new CovarianceLinearArd();
+      } else if (node.Symbol is CovMatern) {
+        var covSymbol = node.Symbol as CovMatern;
+        var cov = new CovarianceMaternIso();
+        cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == covSymbol.D);
+        return cov;
+      } else if (node.Symbol is CovSeArd) {
+        return new CovarianceSquaredExponentialArd();
+      } else if (node.Symbol is CovSeIso) {
+        return new CovarianceSquaredExponentialIso();
+      } else if (node.Symbol is CovRQIso) {
+        return new CovarianceRationalQuadraticIso();
+      } else if (node.Symbol is CovRQArd) {
+        return new CovarianceRationalQuadraticArd();
+      } else if (node.Symbol is CovPeriodic) {
+        return new CovariancePeriodic();
+      } else if (node.Symbol is CovNoise) {
+        return new CovarianceNoise();
+      } else if (node.Symbol is CovSum) {
+        var covSum = new Algorithms.DataAnalysis.CovarianceSum();
+        covSum.Terms.Add(GetCovFunction(node.GetSubtree(0)));
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          covSum.Terms.Add(GetCovFunction(subTree));
+        }
+        return covSum;
+      } else if (node.Symbol is CovProd) {
+        var covProd = new Algorithms.DataAnalysis.CovarianceProduct();
+        covProd.Factors.Add(GetCovFunction(node.GetSubtree(0)));
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          covProd.Factors.Add(GetCovFunction(subTree));
+        }
+        return covProd;
+      } else {
+        throw new ArgumentException("unknown symbol " + node.Symbol);
+      }
+    }
+
+
+    private IMeanFunction GetMeanFunction(ISymbolicExpressionTreeNode node) {
+      if (node.Symbol is MeanConst) {
+        return new Algorithms.DataAnalysis.MeanConst();
+      } else if (node.Symbol is MeanLinear) {
+        return new Algorithms.DataAnalysis.MeanLinear();
+      } else if (node.Symbol is MeanProd) {
+        var meanProd = new Algorithms.DataAnalysis.MeanProduct();
+        meanProd.Factors.Add(GetMeanFunction(node.GetSubtree(0)));
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          meanProd.Factors.Add(GetMeanFunction(subTree));
+        }
+        return meanProd;
+      } else if (node.Symbol is MeanSum) {
+        var meanSum = new Algorithms.DataAnalysis.MeanSum();
+        meanSum.Terms.Add(GetMeanFunction(node.GetSubtree(0)));
+        foreach (var subTree in node.Subtrees.Skip(1)) {
+          meanSum.Terms.Add(GetMeanFunction(subTree));
+        }
+        return meanSum;
+      } else if (node.Symbol is MeanZero) {
+        return new Algorithms.DataAnalysis.MeanZero();
+      } else {
+        throw new ArgumentException("Unknown mean function" + node.Symbol);
+      }
+    }
+
+    //private bool[] CalculateMask(ISymbolicExpressionTreeNode node) {
+    //  var maskNode = node as MeanMaskTreeNode;
+    //  if (maskNode != null) {
+    //    bool[] newMask = CombineMasksProd(maskNode.Mask, CalculateMask(node.GetSubtree(0)));
+    //    return newMask;
+    //  } else if (node.Symbol is MeanProd) {
+    //    bool[] newMask = CalculateMask(node.GetSubtree(0));
+    //    foreach (var subTree in node.Subtrees.Skip(1)) {
+    //      newMask = CombineMasksProd(newMask, CalculateMask(subTree));
+    //    }
+    //    return newMask;
+    //  } else if (node.Symbol is MeanSum) {
+    //    bool[] newMask = CalculateMask(node.GetSubtree(0));
+    //    foreach (var subTree in node.Subtrees.Skip(1)) {
+    //      newMask = CombineMasksSum(newMask, CalculateMask(subTree));
+    //    }
+    //    return newMask;
+    //  } else if (node.SubtreeCount == 1) {
+    //    return CalculateMask(node.GetSubtree(0));
+    //  } else if (node is SymbolicExpressionTreeTerminalNode) {
+    //    return null;
+    //  } else {
+    //    throw new NotImplementedException();
+    //  }
+    //}
+
+    //private bool[] CombineMasksProd(bool[] m, bool[] n) {
+    //  if (m == null) return n;
+    //  if (n == null) return m;
+    //  if (m.Length != n.Length) throw new ArgumentException();
+    //  bool[] res = new bool[m.Length];
+    //  for (int i = 0; i < res.Length; i++)
+    //    res[i] = m[i] | n[i];
+    //  return res;
+    //}
+
+
+    //private bool[] CombineMasksSum(bool[] m, bool[] n) {
+    //  if (m == null) return n;
+    //  if (n == null) return m;
+    //  if (m.Length != n.Length) throw new ArgumentException();
+    //  bool[] res = new bool[m.Length];
+    //  for (int i = 0; i < res.Length; i++)
+    //    res[i] = m[i] & n[i];
+    //  return res;
+    //}
+
+    private string ToVectorString(bool[] b) {
+      var strBuilder = new StringBuilder();
+      strBuilder.Append("[");
+      if (b.Length == 1) // workaround for bug in GPML
+      {
+        if (!b[0]) strBuilder.Append("1");
+      } else {
+        for (int i = 0; i < b.Length; i++) {
+          if (i > 0) strBuilder.Append(", ");
+          strBuilder.Append(b[i] ? "0" : "1");
+        }
+      }
+      strBuilder.Append("]");
+      return strBuilder.ToString();
+    }
+    private string ToVectorString(double[] xs, bool[] mask) {
+      if (xs.Length != mask.Length) throw new ArgumentException();
+      var strBuilder = new StringBuilder();
+      strBuilder.Append("[");
+      for (int i = 0; i < xs.Length; i++)
+        if (!mask[i]) {
+          if (i > 0) strBuilder.Append("; ");
+          strBuilder.Append(xs[i]);
+        }
+      strBuilder.Append("]");
+      return strBuilder.ToString();
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Parameters.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Parameters.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Parameters.cs	(revision 8753)
@@ -0,0 +1,22 @@
+﻿
+using System;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  public class Parameters {
+    public int PopulationSize { get; set; }
+    public int Generations { get; set; }
+    public int MaxTreeLength { get; set; }
+    public int MaxTreeDepth { get; set; }
+    public double MutationRate { get; set; }
+    public double MaxSelectionPressure { get; set; }
+
+    public Parameters() {
+      PopulationSize = 100;
+      Generations = 10;
+      MaxTreeLength = 20;
+      MaxTreeDepth = 6;
+      MutationRate = 0.15;
+      MaxSelectionPressure = 100;
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Plugin.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Plugin.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Plugin.cs	(revision 8753)
@@ -0,0 +1,15 @@
+﻿
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [Plugin("HeuristicLab.Problems.GaussianProcessTuning", "Gaussian process configuration problem for genetic programming", "1.0.0")]
+  [PluginFile("HeuristicLab.Problems.GaussianProcessTuning-1.0.exe", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabProblemsGaussianProcessTuningPlugin : PluginBase {
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Problem.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Problem.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Problem.cs	(revision 8753)
@@ -0,0 +1,170 @@
+﻿using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  [Creatable("Problems")]
+  [Item("Gaussian Process Configuration Problem", "The Gaussian process configuration problem for genetic programming.")]
+  public class Problem : SingleObjectiveHeuristicOptimizationProblem<Evaluator, ISymbolicExpressionTreeCreator> {
+    private const string GaussianProcessConfigurationParameterName = "GaussianProcessConfiguration";
+    private const string MaxGaussianProcessConfigurationLengthParameterName = "MaxConfigurationLength";
+    private const string MaxGaussianProcessConfigurationParameterName = "MaxConfigurationDepth";
+    private const string GaussianProcessConfigurationGrammarParameterName = "Grammar";
+    private const string DimensionParameterName = "Dimension";
+    private const string InterpreterParameterName = "Interpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+
+
+    public IFixedValueParameter<IntValue> MaxGaussianProcessConfigurationLengthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaxGaussianProcessConfigurationLengthParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaxGaussianProcessConfigurationDepthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaxGaussianProcessConfigurationParameterName]; }
+    }
+    public IValueParameter<Grammar> GrammarParameter {
+      get { return (IValueParameter<Grammar>)Parameters[GaussianProcessConfigurationGrammarParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> DimensionParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[DimensionParameterName]; }
+    }
+    public IValueParameter<Interpreter> InterpreterParameter {
+      get { return (IValueParameter<Interpreter>)Parameters[InterpreterParameterName]; }
+    }
+    public IValueParameter<IRegressionProblemData> ProblemDataParameter {
+      get { return (IValueParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected Problem(bool deserializing)
+      : base(deserializing) {
+    }
+    protected Problem(Problem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    public Problem()
+      : base(new Evaluator(), new ProbabilisticTreeCreator()) {
+      Parameters.Add(new ValueParameter<Interpreter>(InterpreterParameterName, "The interpreter for Gaussian process configurations represented as trees.", new Interpreter()));
+      Parameters.Add(new FixedValueParameter<IntValue>(DimensionParameterName, "The dimension parameter for the Gaussian process configuration.", new IntValue(10)));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaxGaussianProcessConfigurationParameterName, "Maximal depth of the Gaussian process configuration.", new IntValue(6)));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaxGaussianProcessConfigurationLengthParameterName, "Maximal length of the Gaussian process configuration.", new IntValue(15)));
+      Parameters.Add(new ValueParameter<Grammar>(GaussianProcessConfigurationGrammarParameterName, "Grammar for the Gaussian process configuration.",
+                     new Grammar()));
+      Parameters.Add(new ValueParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data to learn a Gaussian process for.", new RegressionProblemData()));
+      Maximization.Value = false;
+      InitializeOperators();
+
+      RegisterEventHandlers();
+    }
+
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Problem(this, cloner);
+    }
+
+    private void InitializeOperators() {
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
+      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
+      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
+      Operators.Add(new BestSolutionAnalyzer());
+      ParameterizeOperators();
+      ParameterizeAnalyzers();
+    }
+
+
+    private void RegisterEventHandlers() {
+      Evaluator.QualityParameter.ActualNameChanged += QualityParameterOnActualNameChanged;
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged +=
+        SymbolicExpressionTreeParameterOnActualNameChanged;
+      DimensionParameter.Value.ValueChanged += DimensionParameterOnValueChanged;
+      GrammarParameter.ValueChanged += new EventHandler(GrammarParameter_ValueChanged);
+    }
+
+    void GrammarParameter_ValueChanged(object sender, EventArgs e) {
+      GrammarParameter.Value.Dimension = DimensionParameter.Value.Value;
+    }
+
+    private void DimensionParameterOnValueChanged(object sender, EventArgs eventArgs) {
+      GrammarParameter.Value.Dimension = DimensionParameter.Value.Value;
+    }
+
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.GaussianProcessConfigurationParameter.ActualName = GaussianProcessConfigurationParameterName;
+      Evaluator.QualityParameter.ActualNameChanged += QualityParameterOnActualNameChanged;
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualName = GaussianProcessConfigurationParameterName;
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += SymbolicExpressionTreeParameterOnActualNameChanged;
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void SymbolicExpressionTreeParameterOnActualNameChanged(object sender, EventArgs eventArgs) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void QualityParameterOnActualNameChanged(object sender, EventArgs eventArgs) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeAnalyzers() {
+      var analyzers = Operators.OfType<IAnalyzer>();
+      foreach (var o in analyzers.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        o.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var o in analyzers.OfType<BestSolutionAnalyzer>()) {
+        o.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+      }
+    }
+
+    private void ParameterizeOperators() {
+      var operators = Parameters
+        .OfType<IValueParameter>()
+        .Select(p => p.Value)
+        .OfType<IOperator>()
+        .Union(Operators);
+      foreach (var o in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        o.SymbolicExpressionTreeGrammarParameter.ActualName = GaussianProcessConfigurationGrammarParameterName;
+      }
+      foreach (var o in operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        o.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaxGaussianProcessConfigurationParameterName;
+        o.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaxGaussianProcessConfigurationLengthParameterName;
+      }
+      foreach (var op in operators.OfType<Evaluator>()) {
+        op.GaussianProcessConfigurationParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeCreator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Properties/AssemblyInfo.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Properties/AssemblyInfo.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Properties/AssemblyInfo.cs	(revision 8753)
@@ -0,0 +1,35 @@
+﻿using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.GaussianProcessTuning")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("Copyright © HEAL 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c75ca6a0-0d72-4ca8-a24c-8d7b03c81caa")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Provider.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Provider.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Provider.cs	(revision 8753)
@@ -0,0 +1,215 @@
+﻿using System;
+using System.Linq;
+using System.Threading;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  public class Provider {
+    public static void Main(string[] args) {
+      // use random data for testing (3000 rows, 500 variables)
+
+      int rows = 13;
+      double[,] inputData = GenerateRandomData(rows, 5);
+      double[] targetData = GenerateRandomData(rows);
+
+      var prov = new Provider();
+      var p = new Parameters();
+      p.Generations = 1;
+      p.PopulationSize = 10;
+      var sol = prov.Train(targetData, inputData, null, p);
+      // Console.WriteLine(sol.TestRSquared);
+
+      //double[,] inputDataTest = GenerateRandomData(rows, 10);
+      //double[] predictionTest = prov.Predict(inputDataTest, sol);
+      //double[] targetDataTest = GenerateRandomData(rows);
+      //OnlineCalculatorError error;
+      //double r2 = OnlinePearsonsRSquaredCalculator.Calculate(predictionTest, targetDataTest, out error);
+      //if (error != OnlineCalculatorError.None) Console.WriteLine(error);
+      //else Console.WriteLine(r2);
+    }
+
+    // train a symb reg model
+    public IRegressionSolution Train(double[] target, double[,] input, Solution oldSolution, Parameters parameters) {
+      var targetVariable = "y";
+
+      if (target.Length != input.GetLength(0)) throw new ArgumentException("length of input vectors does not match.");
+      int rows = target.Length;
+      int columns = input.GetLength(1);
+
+      var variableNames =
+        new string[] { targetVariable }.Concat(Enumerable.Range(1, input.GetLength(1)).Select(i => string.Format("x{0}", i)));
+
+      double[,] combinedMatrix = new double[rows, columns + 1];
+      for (int r = 0; r < rows; r++) {
+        combinedMatrix[r, 0] = target[r];
+        for (int c = 0; c < columns; c++) {
+          combinedMatrix[r, c + 1] = input[r, c];
+        }
+      }
+
+      var allowedInputVariables = variableNames.Skip(1);
+      var ds = new Dataset(variableNames, combinedMatrix);
+      var probData = new RegressionProblemData(ds, allowedInputVariables, targetVariable);
+      probData.TrainingPartition.Start = 0;
+      probData.TrainingPartition.End = rows;
+      probData.TestPartition.Start = rows;
+      probData.TestPartition.End = rows;
+      var prob = new Problem();
+      prob.ProblemDataParameter.Value = probData;
+      prob.DimensionParameter.Value.Value = allowedInputVariables.Count();
+
+
+      var configuredAlgorithm = CreateGeneticProgrammingAlgorithm(prob, parameters);
+      // save the configured algorithm
+      // XmlGenerator.Serialize(configuredAlgorithm, "osgp_" + targetVariable + ".hl");
+
+
+      var resetEvent = new AutoResetEvent(false);
+      configuredAlgorithm.ExceptionOccurred += (sender, args) => {
+        Console.WriteLine("Exception: " + args.Value);
+        configuredAlgorithm.Stop();
+      };
+
+      Solution solution = null;
+      configuredAlgorithm.Stopped += (sender, args) => {
+        try {
+          Console.WriteLine("Run finished (execution time: {0})", configuredAlgorithm.ExecutionTime);
+          solution = (Solution)configuredAlgorithm.Results["Best solution"].Value;
+        }
+        finally {
+          resetEvent.Set();
+        }
+      };
+
+
+      configuredAlgorithm.Prepare();
+      configuredAlgorithm.Start(); // start run asynchronously
+      resetEvent.WaitOne(); // wait until stopped
+
+      //save ensemble solution
+      //XmlGenerator.Serialize(ensemble, "osgp_ensemble" + targetVariable + ".hl");
+
+      return solution;
+    }
+
+    // predict a single row
+    public double Predict(double[] input, IRegressionSolution solution) {
+      var allowedInputVariables = Enumerable.Range(1, input.GetLength(0)).Select(i => string.Format("x{0}", i));
+      int columns = input.GetLength(0);
+      double[,] combinedMatrix = new double[1, columns + 1];
+      combinedMatrix[0, 0] = 0.0;
+      for (int c = 0; c < columns; c++) {
+        combinedMatrix[0, c + 1] = input[c];
+      }
+
+      var ds = new Dataset(allowedInputVariables.Concat(new string[] { "y" }), combinedMatrix);
+      var newProbData = new RegressionProblemData(ds, allowedInputVariables, "y");
+      var newSolution = solution.Model.CreateRegressionSolution(newProbData);
+      return newSolution.EstimatedValues.Single();
+    }
+
+
+    // predict multiple rows
+    public double[] Predict(double[,] input, IRegressionSolution solution) {
+      var allowedInputVariables = Enumerable.Range(1, input.GetLength(1)).Select(i => string.Format("x{0}", i));
+      int rows = input.GetLength(0);
+      int columns = input.GetLength(1);
+      double[,] combinedMatrix = new double[rows, columns + 1];
+      for (int r = 0; r < rows; r++) {
+        combinedMatrix[r, 0] = 0.0;
+        for (int c = 0; c < columns; c++) {
+          combinedMatrix[r, c + 1] = input[r, c];
+        }
+      }
+
+      var ds = new Dataset(allowedInputVariables.Concat(new string[] { "y" }), combinedMatrix);
+      var newProbData = new RegressionProblemData(ds, allowedInputVariables, "y");
+      var newSolution = solution.Model.CreateRegressionSolution(newProbData);
+      return newSolution.EstimatedValues.ToArray();
+    }
+
+    #region helper for algorithm and problem configuration
+    public HeuristicOptimizationEngineAlgorithm CreateGeneticProgrammingAlgorithm(Problem problem, Parameters parameters) {
+      // offspring selection GA proved to be very successful for GP
+      var osga = new OffspringSelectionGeneticAlgorithm();
+
+      problem.MaxGaussianProcessConfigurationLengthParameter.Value.Value = parameters.MaxTreeLength;
+      problem.MaxGaussianProcessConfigurationDepthParameter.Value.Value = parameters.MaxTreeDepth;
+
+      var grammar = new Grammar();
+
+      problem.GrammarParameter.Value = grammar;
+
+      // prepare grammar for time series prognosis 
+      // combine algorithm + problem
+      osga.Problem = problem;
+
+      // set algorithm parameters
+      ConfigureOffspringSelectionGeneticAlgorithmParameters<GenderSpecificSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>
+        (osga, parameters.PopulationSize, 0, parameters.Generations, parameters.MaxSelectionPressure, parameters.MutationRate);
+
+      return osga;
+    }
+
+    private void ConfigureOffspringSelectionGeneticAlgorithmParameters<S, C, M>(OffspringSelectionGeneticAlgorithm osga, int popSize, int elites, int maxGens, double maxSelectionPressure, double mutationRate = 0.15, double comparisonFactorLowerBound = 1.0, double comparisonFactorUpperBound = 1.0, double successRatio = 1.0)
+      where S : ISelector
+      where C : ICrossover
+      where M : IManipulator {
+      osga.Elites.Value = elites;
+      osga.MaximumGenerations.Value = maxGens;
+      osga.MutationProbability.Value = mutationRate;
+      osga.PopulationSize.Value = popSize;
+      osga.ComparisonFactorLowerBound.Value = comparisonFactorLowerBound;
+      osga.ComparisonFactorUpperBound.Value = comparisonFactorUpperBound;
+      osga.SuccessRatio.Value = successRatio;
+      osga.OffspringSelectionBeforeMutation.Value = false;
+      osga.MaximumSelectionPressure.Value = maxSelectionPressure;
+
+      osga.Seed.Value = 0;
+      osga.SetSeedRandomly.Value = true;
+      osga.Selector = osga.SelectorParameter.ValidValues
+        .OfType<S>()
+        .Single();
+
+      osga.Crossover = osga.CrossoverParameter.ValidValues
+        .OfType<C>()
+        .Single();
+
+      osga.Mutator = osga.MutatorParameter.ValidValues
+        .OfType<M>()
+        .Single();
+
+      osga.Engine = new SequentialEngine.SequentialEngine();
+    }
+    #endregion
+
+
+    #region helper for testing
+    private static double[,] GenerateRandomData(int rows, int columns) {
+      var data = new double[rows, columns];
+      // generate data using a PRNG with N(0, 1) distribution
+      var normalPRNG = new NormalDistributedRandom(new MersenneTwister(), 0.0, 1.0);
+      for (int r = 0; r < rows; r++)
+        for (int c = 0; c < columns; c++) {
+          data[r, c] = normalPRNG.NextDouble();
+        }
+      return data;
+    }
+    private static double[] GenerateRandomData(int rows) {
+      var data = new double[rows];
+      // generate data using a PRNG with N(0, 1) distribution
+      var normalPRNG = new NormalDistributedRandom(new MersenneTwister(), 0.0, 1.0);
+      for (int r = 0; r < rows; r++)
+
+        data[r] = normalPRNG.NextDouble();
+
+      return data;
+    }
+    #endregion
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Solution.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Solution.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Solution.cs	(revision 8753)
@@ -0,0 +1,27 @@
+﻿using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [StorableClass]
+  public sealed class Solution : RegressionSolution {
+    [StorableConstructor]
+    private Solution(bool deserializing) : base(deserializing) { }
+    private Solution(Solution original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Solution(GaussianProcessRegressionModel model, IRegressionProblemData problemData)
+      : base(model, problemData) {
+      RecalculateResults();
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Solution(this, cloner);
+    }
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/SolutionTreeView.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/SolutionTreeView.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/SolutionTreeView.cs	(revision 8753)
@@ -0,0 +1,74 @@
+﻿using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+  [View("Gaussian Process Configuration Tree View")]
+  [Content(typeof(Solution), IsDefaultView = false)]
+  public sealed partial class SolutionProgramView : NamedItemView {
+    private Panel panel;
+    private GraphicalSymbolicExpressionTreeView graphTreeView;
+    public new Solution Content {
+      get { return (Solution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SolutionProgramView() {
+      InitializeComponent();
+      this.graphTreeView = new GraphicalSymbolicExpressionTreeView();
+      graphTreeView.Dock = DockStyle.Fill;
+      panel.Controls.Add(graphTreeView);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        graphTreeView.Content = null;
+      } else {
+        graphTreeView.Content = Content.Tree;
+      }
+    }
+
+    private void InitializeComponent() {
+      this.panel = new System.Windows.Forms.Panel();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      // 
+      // panel
+      // 
+      this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.panel.Location = new System.Drawing.Point(3, 26);
+      this.panel.Name = "panel";
+      this.panel.Size = new System.Drawing.Size(345, 190);
+      this.panel.TabIndex = 3;
+      // 
+      // SolutionProgramView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.panel);
+      this.Name = "SolutionProgramView";
+      this.Size = new System.Drawing.Size(351, 219);
+      this.Controls.SetChildIndex(this.panel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+
+
+
+  }
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Symbols.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Symbols.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/Symbols.cs	(revision 8753)
@@ -0,0 +1,1170 @@
+﻿using System;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+
+  #region interfaces
+  public interface IDimensionSymbol : ISymbol {
+    int Dimension { get; set; }
+  }
+  #endregion
+
+  [StorableClass]
+  public sealed class ConfigurationStartSymbol : Symbol {
+    public override int MinimumArity {
+      get { return 3; }
+    }
+    public override int MaximumArity {
+      get { return 3; }
+    }
+    [StorableConstructor]
+    private ConfigurationStartSymbol(bool deserializing) : base(deserializing) { }
+    private ConfigurationStartSymbol(ConfigurationStartSymbol original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public ConfigurationStartSymbol()
+      : base("GP Configuration", "The start symbol for a GP configuration") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ConfigurationStartSymbol(this, cloner);
+    }
+  }
+
+  #region mean function terminals
+  [StorableClass]
+  public sealed class MeanZero : Symbol {
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private MeanZero(bool deserializing) : base(deserializing) { }
+    private MeanZero(MeanZero original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public MeanZero()
+      : base("MeanZero", "Zero mean function") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new EmptyTerminalTreeNode(new MeanZero());
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanZero(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanOne : Symbol {
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private MeanOne(bool deserializing) : base(deserializing) { }
+    private MeanOne(MeanOne original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public MeanOne()
+      : base("MeanOne", "One mean function") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new EmptyTerminalTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanOne(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanConst : Symbol {
+    [Storable]
+    public double MinValue { get; set; }
+    [Storable]
+    public double MaxValue { get; set; }
+    [Storable]
+    public double ValueShakingMu { get; set; }
+    [Storable]
+    public double ValueShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private MeanConst(bool deserializing) : base(deserializing) { }
+    private MeanConst(MeanConst original, Cloner cloner)
+      : base(original, cloner) {
+      MinValue = original.MinValue;
+      MaxValue = original.MaxValue;
+      ValueShakingMu = original.ValueShakingMu;
+      ValueShakingSigma = original.ValueShakingSigma;
+    }
+
+    public MeanConst()
+      : base("MeanConst", "Constant mean function") {
+      MinValue = -100.0;
+      MaxValue = 100.0;
+      ValueShakingMu = 1.0;
+      ValueShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new MeanConstTreeNode();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanConst(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanLinear : Symbol, IDimensionSymbol {
+    [Storable]
+    public double AlphaMu { get; set; }
+    [Storable]
+    public double AlphaSigma { get; set; }
+    [Storable]
+    public double AlphaShakingMu { get; set; }
+    [Storable]
+    public double AlphaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private MeanLinear(bool deserializing) : base(deserializing) { }
+    private MeanLinear(MeanLinear original, Cloner cloner)
+      : base(original, cloner) {
+      Dimension = original.Dimension;
+      AlphaMu = original.AlphaMu;
+      AlphaSigma = original.AlphaSigma;
+      AlphaShakingMu = original.AlphaShakingMu;
+      AlphaShakingSigma = original.AlphaShakingSigma;
+    }
+
+    public MeanLinear(int dimension)
+      : base("MeanLinear", "Linear mean function") {
+      this.Dimension = dimension;
+      AlphaMu = 0.0;
+      AlphaSigma = 1.0;
+      AlphaShakingMu = 1.0;
+      AlphaShakingSigma = 0.1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new MeanLinearTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanLinear(this, cloner);
+    }
+  }
+  #endregion
+
+  #region mean function functions
+  [StorableClass]
+  public sealed class MeanScale : Symbol {
+    [Storable]
+    public double AlphaMu { get; set; }
+    [Storable]
+    public double AlphaSigma { get; set; }
+    [Storable]
+    public double AlphaShakingMu { get; set; }
+    [Storable]
+    public double AlphaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+
+    [StorableConstructor]
+    private MeanScale(bool deserializing) : base(deserializing) { }
+    private MeanScale(MeanScale original, Cloner cloner)
+      : base(original, cloner) {
+      AlphaMu = original.AlphaMu;
+      AlphaSigma = original.AlphaSigma;
+      AlphaShakingMu = original.AlphaShakingMu;
+      AlphaShakingSigma = original.AlphaShakingSigma;
+    }
+
+    public MeanScale()
+      : base("MeanScale", "Scaled version of a mean function") {
+      AlphaMu = 0.0;
+      AlphaSigma = 1.0;
+      AlphaShakingMu = 1.0;
+      AlphaShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new MeanScaleTreeNode();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanScale(this, cloner);
+    }
+  }
+
+
+  [StorableClass]
+  public sealed class MeanPow : Symbol {
+    [Storable]
+    public int Exponent { get; set; }
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+
+    [StorableConstructor]
+    private MeanPow(bool deserializing) : base(deserializing) { }
+    private MeanPow(MeanPow original, Cloner cloner)
+      : base(original, cloner) {
+      Exponent = original.Exponent;
+    }
+
+    public MeanPow(int exponent = 2)
+      : base("MeanPow", "Power of a mean function") {
+      Exponent = exponent;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanPow(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanProd : Symbol {
+    public override int MinimumArity {
+      get { return 2; }
+    }
+    public override int MaximumArity {
+      get { return 2; }
+    }
+
+    [StorableConstructor]
+    private MeanProd(bool deserializing) : base(deserializing) { }
+    private MeanProd(MeanProd original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public MeanProd()
+      : base("MeanProd", "Product of two functions") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanProd(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanSum : Symbol {
+    public override int MinimumArity {
+      get { return 2; }
+    }
+    public override int MaximumArity {
+      get { return 2; }
+    }
+
+    [StorableConstructor]
+    private MeanSum(bool deserializing) : base(deserializing) { }
+    private MeanSum(MeanSum original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public MeanSum()
+      : base("MeanSum", "Sum of two functions") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanSum(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class MeanMask : Symbol, IDimensionSymbol {
+    [Storable]
+    public double MaskingProbability { get; set; }
+
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private MeanMask(bool deserializing) : base(deserializing) { }
+    private MeanMask(MeanMask original, Cloner cloner)
+      : base(original, cloner) {
+      MaskingProbability = original.MaskingProbability;
+      Dimension = original.Dimension;
+    }
+
+    public MeanMask(int dimension)
+      : base("MeanMask", "Mask some dimensions of the data") {
+      this.Dimension = dimension;
+      MaskingProbability = 0.2;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new MeanMaskTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanMask(this, cloner);
+    }
+  }
+
+  #endregion
+
+  #region covariance function terminals
+  [StorableClass]
+  public sealed class CovConst : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private CovConst(bool deserializing) : base(deserializing) { }
+    private CovConst(CovConst original, Cloner cloner)
+      : base(original, cloner) {
+      this.MaxSigma = original.MaxSigma;
+      this.MinSigma = original.MinSigma;
+      this.SigmaShakingMu = original.SigmaShakingMu;
+      this.SigmaShakingSigma = original.SigmaShakingSigma;
+    }
+
+    public CovConst()
+      : base("CovConst", "Covariance for constant functions") {
+      MinSigma = 0.0;
+      MaxSigma = 100;
+      SigmaShakingMu = 1;
+      SigmaShakingSigma = 1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovConstTreeNode();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovConst(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovNoise : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private CovNoise(bool deserializing) : base(deserializing) { }
+    private CovNoise(CovNoise original, Cloner cloner)
+      : base(original, cloner) {
+      this.MaxSigma = original.MaxSigma;
+      this.MinSigma = original.MinSigma;
+      this.SigmaShakingMu = original.SigmaShakingMu;
+      this.SigmaShakingSigma = original.SigmaShakingSigma;
+    }
+
+    public CovNoise()
+      : base("CovNoise", "Noise covariance function") {
+      MinSigma = 0.0;
+      MaxSigma = 100;
+      SigmaShakingMu = 1;
+      SigmaShakingSigma = 1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovNoiseTreeNode();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovNoise(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovLin : Symbol {
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private CovLin(bool deserializing) : base(deserializing) { }
+    private CovLin(CovLin original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public CovLin()
+      : base("CovLin", "linear covariance function") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new EmptyTerminalTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovLin(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovLinArd : Symbol, IDimensionSymbol {
+    [Storable]
+    public double LambdaMu { get; set; }
+    [Storable]
+    public double LambdaSigma { get; set; }
+    [Storable]
+    public double LambdaShakingMu { get; set; }
+    [Storable]
+    public double LambdaShakingSigma { get; set; }
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private CovLinArd(bool deserializing) : base(deserializing) { }
+    private CovLinArd(CovLinArd original, Cloner cloner)
+      : base(original, cloner) {
+      Dimension = original.Dimension;
+      LambdaMu = original.LambdaMu;
+      LambdaSigma = original.LambdaSigma;
+      LambdaShakingMu = original.LambdaShakingMu;
+      LambdaShakingSigma = original.LambdaShakingSigma;
+    }
+
+    public CovLinArd(int dimension)
+      : base("CovLinArd", "linear covariance function with ARD") {
+      this.Dimension = dimension;
+      LambdaMu = 0.0;
+      LambdaSigma = 1.0;
+      LambdaShakingMu = 1.0;
+      LambdaShakingSigma = 0.1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovLinArdTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovLinArd(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovSeArd : Symbol, IDimensionSymbol {
+    [Storable]
+    public double LambdaMu { get; set; }
+    [Storable]
+    public double LambdaSigma { get; set; }
+    [Storable]
+    public double LambdaShakingMu { get; set; }
+    [Storable]
+    public double LambdaShakingSigma { get; set; }
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private CovSeArd(bool deserializing) : base(deserializing) { }
+    private CovSeArd(CovSeArd original, Cloner cloner)
+      : base(original, cloner) {
+      Dimension = original.Dimension;
+      LambdaMu = original.LambdaMu;
+      LambdaSigma = original.LambdaSigma;
+      LambdaShakingMu = original.LambdaShakingMu;
+      LambdaShakingSigma = original.LambdaShakingSigma;
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+    }
+
+    public CovSeArd(int dimension)
+      : base("CovSeArd", "full squared exponential covariance function with ARD") {
+      this.Dimension = dimension;
+      LambdaMu = 0.0;
+      LambdaSigma = 1.0;
+      LambdaShakingMu = 1.0;
+      LambdaShakingSigma = 0.1;
+      MinSigma = 0.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovSeArdTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovSeArd(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovSeIso : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+    [Storable]
+    public double MinL { get; set; }
+    [Storable]
+    public double MaxL { get; set; }
+    [Storable]
+    public double LShakingMu { get; set; }
+    [Storable]
+    public double LShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private CovSeIso(bool deserializing) : base(deserializing) { }
+    private CovSeIso(CovSeIso original, Cloner cloner)
+      : base(original, cloner) {
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+      MinL = original.MinL;
+      MaxL = original.MaxL;
+      LShakingMu = original.LShakingMu;
+      LShakingSigma = original.LShakingSigma;
+    }
+
+    public CovSeIso()
+      : base("CovSeIso", "diagonal squared exponential covariance function") {
+      MinSigma = 1.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+      MinL = 1.0;
+      MaxL = 100.0;
+      LShakingMu = 1.0;
+      LShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovSeIsoTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovSeIso(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovMatern : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+    [Storable]
+    public double MinL { get; set; }
+    [Storable]
+    public double MaxL { get; set; }
+    [Storable]
+    public double LShakingMu { get; set; }
+    [Storable]
+    public double LShakingSigma { get; set; }
+
+    [Storable]
+    public int D { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private CovMatern(bool deserializing) : base(deserializing) { }
+    private CovMatern(CovMatern original, Cloner cloner)
+      : base(original, cloner) {
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+      MinL = original.MinL;
+      MaxL = original.MaxL;
+      LShakingMu = original.LShakingMu;
+      LShakingSigma = original.LShakingSigma;
+      D = original.D;
+    }
+
+    public CovMatern(int d)
+      : base("CovMatern", "Matern covariance function") {
+      MinSigma = 1.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+      MinL = 1.0;
+      MaxL = 100.0;
+      LShakingMu = 1.0;
+      LShakingSigma = 1.0;
+      this.D = d;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovMaternTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovMatern(this, cloner);
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovPeriodic : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+    [Storable]
+    public double MinL { get; set; }
+    [Storable]
+    public double MaxL { get; set; }
+    [Storable]
+    public double LShakingMu { get; set; }
+    [Storable]
+    public double LShakingSigma { get; set; }
+    [Storable]
+    public double MinPeriod { get; set; }
+    [Storable]
+    public double MaxPeriod { get; set; }
+    [Storable]
+    public double PeriodShakingMu { get; set; }
+    [Storable]
+    public double PeriodShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private CovPeriodic(bool deserializing) : base(deserializing) { }
+    private CovPeriodic(CovPeriodic original, Cloner cloner)
+      : base(original, cloner) {
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+      MinL = original.MinL;
+      MaxL = original.MaxL;
+      LShakingMu = original.LShakingMu;
+      LShakingSigma = original.LShakingSigma;
+      MinPeriod = original.MinL;
+      MaxPeriod = original.MaxL;
+      PeriodShakingMu = original.PeriodShakingMu;
+      PeriodShakingSigma = original.PeriodShakingSigma;
+    }
+
+    public CovPeriodic()
+      : base("CovPeriodic", "Periodic covariance function") {
+      MinSigma = 1.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+      MinL = 1.0;
+      MaxL = 100.0;
+      LShakingMu = 1.0;
+      LShakingSigma = 1.0;
+      MinPeriod = 1.0;
+      MaxPeriod = 100.0;
+      PeriodShakingMu = 1.0;
+      PeriodShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovPeriodicTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovPeriodic(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovRQArd : Symbol, IDimensionSymbol {
+    [Storable]
+    public double LambdaMu { get; set; }
+    [Storable]
+    public double LambdaSigma { get; set; }
+    [Storable]
+    public double LambdaShakingMu { get; set; }
+    [Storable]
+    public double LambdaShakingSigma { get; set; }
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+    [Storable]
+    public double MinShape { get; set; }
+    [Storable]
+    public double MaxShape { get; set; }
+    [Storable]
+    public double ShapeShakingMu { get; set; }
+    [Storable]
+    public double ShapeShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private CovRQArd(bool deserializing) : base(deserializing) { }
+    private CovRQArd(CovRQArd original, Cloner cloner)
+      : base(original, cloner) {
+      Dimension = original.Dimension;
+      LambdaMu = original.LambdaMu;
+      LambdaSigma = original.LambdaSigma;
+      LambdaShakingMu = original.LambdaShakingMu;
+      LambdaShakingSigma = original.LambdaShakingSigma;
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+      MinShape = original.MinShape;
+      MaxShape = original.MaxShape;
+      ShapeShakingMu = original.ShapeShakingMu;
+      ShapeShakingSigma = original.ShapeShakingSigma;
+    }
+
+    public CovRQArd(int dimension)
+      : base("CovRQArd", "full rational quadratic covariance function with ARD") {
+      this.Dimension = dimension;
+      LambdaMu = 0.0;
+      LambdaSigma = 1.0;
+      LambdaShakingMu = 1.0;
+      LambdaShakingSigma = 0.1;
+      MinSigma = 0.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+      MinShape = 1.0;
+      MaxShape = 100.0;
+      ShapeShakingMu = 1.0;
+      ShapeShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovRQArdTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovRQArd(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovRQIso : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+    [Storable]
+    public double MinL { get; set; }
+    [Storable]
+    public double MaxL { get; set; }
+    [Storable]
+    public double LShakingMu { get; set; }
+    [Storable]
+    public double LShakingSigma { get; set; }
+    [Storable]
+    public double MinShape { get; set; }
+    [Storable]
+    public double MaxShape { get; set; }
+    [Storable]
+    public double ShapeShakingMu { get; set; }
+    [Storable]
+    public double ShapeShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private CovRQIso(bool deserializing) : base(deserializing) { }
+    private CovRQIso(CovRQIso original, Cloner cloner)
+      : base(original, cloner) {
+      MinSigma = original.MinSigma;
+      MaxSigma = original.MaxSigma;
+      SigmaShakingMu = original.SigmaShakingMu;
+      SigmaShakingSigma = original.SigmaShakingSigma;
+      MinL = original.MinL;
+      MaxL = original.MaxL;
+      LShakingMu = original.LShakingMu;
+      LShakingSigma = original.LShakingSigma;
+      MinShape = original.MinShape;
+      MaxShape = original.MaxShape;
+      ShapeShakingMu = original.ShapeShakingMu;
+      ShapeShakingSigma = original.ShapeShakingSigma;
+    }
+
+    public CovRQIso()
+      : base("CovRQIso", "Rational quadratic covariance function") {
+      MinSigma = 1.0;
+      MaxSigma = 100.0;
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 1.0;
+      MinL = 1.0;
+      MaxL = 100.0;
+      LShakingMu = 1.0;
+      LShakingSigma = 1.0;
+      MinShape = 1.0;
+      MaxShape = 100.0;
+      ShapeShakingMu = 1.0;
+      ShapeShakingSigma = 1.0;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovRQisoTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovRQIso(this, cloner);
+    }
+  }
+  #endregion
+
+  #region covariance function functions
+  [StorableClass]
+  public sealed class CovSum : Symbol {
+    public override int MinimumArity {
+      get { return 3; }
+    }
+    public override int MaximumArity {
+      get { return 3; }
+    }
+
+    [StorableConstructor]
+    private CovSum(bool deserializing) : base(deserializing) { }
+    private CovSum(CovSum original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public CovSum()
+      : base("CovSum", "Sum of two covariance functions") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovSum(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovProd : Symbol {
+    public override int MinimumArity {
+      get { return 3; }
+    }
+    public override int MaximumArity {
+      get { return 3; }
+    }
+
+    [StorableConstructor]
+    private CovProd(bool deserializing) : base(deserializing) { }
+    private CovProd(CovProd original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public CovProd()
+      : base("CovProd", "Product of two covariance functions") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovProd(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovScale : Symbol {
+    [Storable]
+    public double AlphaMu { get; set; }
+    [Storable]
+    public double AlphaSigma { get; set; }
+    [Storable]
+    public double AlphaShakingMu { get; set; }
+    [Storable]
+    public double AlphaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+
+    [StorableConstructor]
+    private CovScale(bool deserializing) : base(deserializing) { }
+    private CovScale(CovScale original, Cloner cloner)
+      : base(original, cloner) {
+      AlphaMu = original.AlphaMu;
+      AlphaSigma = original.AlphaSigma;
+      AlphaShakingMu = original.AlphaShakingMu;
+      AlphaShakingSigma = original.AlphaShakingSigma;
+    }
+
+    public CovScale()
+      : base("CovScale", "Scale a covariance function") {
+      AlphaMu = 0.0;
+      AlphaSigma = 1.0;
+      AlphaShakingMu = 1.0;
+      AlphaShakingSigma = 0.1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovScaleTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovScale(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class CovMask : Symbol, IDimensionSymbol {
+    [Storable]
+    public double MaskingProbability { get; set; }
+
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+    [Storable]
+    public int Dimension { get; set; }
+
+    [StorableConstructor]
+    private CovMask(bool deserializing) : base(deserializing) { }
+    private CovMask(CovMask original, Cloner cloner)
+      : base(original, cloner) {
+      this.Dimension = original.Dimension;
+      this.MaskingProbability = original.MaskingProbability;
+    }
+
+    public CovMask(int dimension)
+      : base("CovMask", "Mask some dimensions of the data") {
+      this.Dimension = dimension;
+      MaskingProbability = 0.2;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new CovMaskTreeNode(this);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovMask(this, cloner);
+    }
+  }
+  #endregion
+
+  #region likelihood functions
+  [StorableClass]
+  public sealed class LikGauss : Symbol {
+    [Storable]
+    public double MinSigma { get; set; }
+    [Storable]
+    public double MaxSigma { get; set; }
+    [Storable]
+    public double SigmaShakingMu { get; set; }
+    [Storable]
+    public double SigmaShakingSigma { get; set; }
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private LikGauss(bool deserializing) : base(deserializing) { }
+    private LikGauss(LikGauss original, Cloner cloner)
+      : base(original, cloner) {
+      this.MinSigma = original.MinSigma;
+      this.MaxSigma = original.MaxSigma;
+      this.SigmaShakingMu = original.SigmaShakingMu;
+      this.SigmaShakingSigma = original.SigmaShakingSigma;
+    }
+
+    public LikGauss()
+      : base("LikGauss", "Gaussian likelihood function") {
+      MinSigma = Math.Log(0.00001);
+      MaxSigma = Math.Log(100);
+      SigmaShakingMu = 1.0;
+      SigmaShakingSigma = 0.1;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new LikGaussTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LikGauss(this, cloner);
+    }
+  }
+  #endregion
+}
Index: /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/TreeNodes.cs
===================================================================
--- /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/TreeNodes.cs	(revision 8753)
+++ /branches/GaussianProcessEvolution/HeuristicLab.Problems.GaussianProcessTuning/TreeNodes.cs	(revision 8753)
@@ -0,0 +1,707 @@
+﻿using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.GaussianProcessTuning {
+
+  [StorableClass]
+  public sealed class EmptyTerminalTreeNode : SymbolicExpressionTreeTerminalNode {
+    [StorableConstructor]
+    private EmptyTerminalTreeNode(bool deserializing) : base(deserializing) { }
+    private EmptyTerminalTreeNode(EmptyTerminalTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public EmptyTerminalTreeNode(ISymbol symbol)
+      : base(symbol) {
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyTerminalTreeNode(this, cloner);
+    }
+  }
+  [StorableClass]
+  public sealed class MeanConstTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new MeanConst Symbol { get { return (MeanConst)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double value;
+    [Storable]
+    public double Value { get { return value; } private set { this.value = value; } }
+
+    [StorableConstructor]
+    private MeanConstTreeNode(bool deserializing) : base(deserializing) { }
+    private MeanConstTreeNode(MeanConstTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.value = original.value;
+    }
+
+    public MeanConstTreeNode() : base(new MeanConst()) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanConstTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      value = Symbol.MinValue + random.NextDouble() * (Symbol.MaxValue - Symbol.MinValue);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.ValueShakingMu, Symbol.ValueShakingSigma);
+      value = Math.Max(Symbol.MinValue, Math.Min(Symbol.MaxValue, value + normRandom.NextDouble() * shakingFactor));
+    }
+  }
+  [StorableClass]
+  public sealed class MeanLinearTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new MeanLinear Symbol { get { return (MeanLinear)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double[] Alpha { get; set; }
+
+    [StorableConstructor]
+    private MeanLinearTreeNode(bool deserializing) : base(deserializing) { }
+    private MeanLinearTreeNode(MeanLinearTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Alpha = new double[original.Alpha.Length];
+      Array.Copy(original.Alpha, Alpha, Alpha.Length);
+    }
+
+    public MeanLinearTreeNode(MeanLinear symbol)
+      : base(symbol) {
+      Alpha = new double[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanLinearTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
+      for (int i = 0; i < Alpha.Length; i++)
+        Alpha[i] = normRandom.NextDouble();
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
+      int index = random.Next(Alpha.Length);
+      Alpha[index] += shakingFactor * normRandom.NextDouble();
+    }
+  }
+
+
+  [StorableClass]
+  public sealed class MeanScaleTreeNode : SymbolicExpressionTreeNode {
+    public new MeanScale Symbol { get { return (MeanScale)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double alpha;
+    [Storable]
+    public double Alpha { get { return alpha; } private set { this.alpha = value; } }
+
+    [StorableConstructor]
+    private MeanScaleTreeNode(bool deserializing) : base(deserializing) { }
+    private MeanScaleTreeNode(MeanScaleTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.alpha = original.alpha;
+    }
+
+    public MeanScaleTreeNode() : base(new MeanScale()) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanScaleTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
+      alpha = normRandom.NextDouble();
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
+      alpha += shakingFactor * normRandom.NextDouble();
+    }
+  }
+  [StorableClass]
+  public sealed class MeanMaskTreeNode : SymbolicExpressionTreeNode {
+    public new MeanMask Symbol { get { return (MeanMask)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public bool[] Mask { get; set; }
+
+    [StorableConstructor]
+    private MeanMaskTreeNode(bool deserializing) : base(deserializing) { }
+    private MeanMaskTreeNode(MeanMaskTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Mask = new bool[original.Mask.Length];
+      Array.Copy(original.Mask, Mask, Mask.Length);
+    }
+
+    public MeanMaskTreeNode(MeanMask symbol)
+      : base(symbol) {
+      Mask = new bool[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MeanMaskTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      for (int i = 0; i < Mask.Length; i++)
+        Mask[i] = random.NextDouble() < Symbol.MaskingProbability;
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      // one point bit flip
+      int i = random.Next(Mask.Length);
+      Mask[i] = !Mask[i];
+    }
+  }
+  [StorableClass]
+  public sealed class CovConstTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovConst Symbol { get { return (CovConst)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double sigma;
+    [Storable]
+    public double Sigma { get { return sigma; } private set { this.sigma = value; } }
+
+    [StorableConstructor]
+    private CovConstTreeNode(bool deserializing) : base(deserializing) { }
+    private CovConstTreeNode(CovConstTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.sigma = original.sigma;
+    }
+
+    public CovConstTreeNode() : base(new CovConst()) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovConstTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
+    }
+  }
+  [StorableClass]
+  public sealed class CovNoiseTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovNoise Symbol { get { return (CovNoise)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double sigma;
+    [Storable]
+    public double Sigma { get { return sigma; } private set { this.sigma = value; } }
+
+    [StorableConstructor]
+    private CovNoiseTreeNode(bool deserializing) : base(deserializing) { }
+    private CovNoiseTreeNode(CovNoiseTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.sigma = original.sigma;
+    }
+
+    public CovNoiseTreeNode() : base(new CovNoise()) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovNoiseTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
+    }
+  }
+  [StorableClass]
+  public sealed class CovLinArdTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovLinArd Symbol { get { return (CovLinArd)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double[] Lambda { get; set; }
+
+    [StorableConstructor]
+    private CovLinArdTreeNode(bool deserializing) : base(deserializing) { }
+    private CovLinArdTreeNode(CovLinArdTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Lambda = new double[original.Lambda.Length];
+      Array.Copy(original.Lambda, Lambda, Lambda.Length);
+    }
+
+    public CovLinArdTreeNode(CovLinArd symbol)
+      : base(symbol) {
+      Lambda = new double[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovLinArdTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
+      for (int i = 0; i < Lambda.Length; i++)
+        Lambda[i] = normRandom.NextDouble();
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      int index = random.Next(Lambda.Length);
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
+      Lambda[index] += shakingFactor * normRandom.NextDouble();
+    }
+  }
+  [StorableClass]
+  public sealed class CovSeArdTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovSeArd Symbol { get { return (CovSeArd)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double[] Lambda { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [StorableConstructor]
+    private CovSeArdTreeNode(bool deserializing) : base(deserializing) { }
+    private CovSeArdTreeNode(CovSeArdTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Lambda = new double[original.Lambda.Length];
+      Array.Copy(original.Lambda, Lambda, Lambda.Length);
+      Sigma = original.Sigma;
+    }
+
+    public CovSeArdTreeNode(CovSeArd symbol)
+      : base(symbol) {
+      Lambda = new double[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovSeArdTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
+      for (int i = 0; i < Lambda.Length; i++)
+        Lambda[i] = normRandom.NextDouble();
+
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      int index = random.Next(Lambda.Length);
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
+      Lambda[index] += shakingFactor * normRandom.NextDouble();
+
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+    }
+  }
+  [StorableClass]
+  public sealed class CovSeIsoTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovSeIso Symbol { get { return (CovSeIso)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double L { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [StorableConstructor]
+    private CovSeIsoTreeNode(bool deserializing) : base(deserializing) { }
+    private CovSeIsoTreeNode(CovSeIsoTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      L = original.L;
+      Sigma = original.Sigma;
+    }
+
+    public CovSeIsoTreeNode(CovSeIso symbol)
+      : base(symbol) {
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovSeIsoTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+      L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+
+      var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
+      L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
+    }
+  }
+  [StorableClass]
+  public sealed class CovMaternTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovMatern Symbol { get { return (CovMatern)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double L { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [StorableConstructor]
+    private CovMaternTreeNode(bool deserializing) : base(deserializing) { }
+    private CovMaternTreeNode(CovMaternTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      L = original.L;
+      Sigma = original.Sigma;
+    }
+
+    public CovMaternTreeNode(CovMatern symbol)
+      : base(symbol) {
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovMaternTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+      L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+
+      var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
+      L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
+    }
+  }
+  [StorableClass]
+  public sealed class CovPeriodicTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovPeriodic Symbol { get { return (CovPeriodic)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double L { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [Storable]
+    public double Period { get; set; }
+
+    [StorableConstructor]
+    private CovPeriodicTreeNode(bool deserializing) : base(deserializing) { }
+    private CovPeriodicTreeNode(CovPeriodicTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      L = original.L;
+      Sigma = original.Sigma;
+      Period = original.Period;
+    }
+
+    public CovPeriodicTreeNode(CovPeriodic symbol)
+      : base(symbol) {
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovPeriodicTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+      L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
+      Period = Symbol.MinPeriod + random.NextDouble() * (Symbol.MaxPeriod - Symbol.MinPeriod);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+
+      var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
+      L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
+
+      var pRandom = new NormalDistributedRandom(random, Symbol.PeriodShakingMu, Symbol.PeriodShakingSigma);
+      Period = Math.Max(Symbol.MinPeriod, Math.Min(Symbol.MaxPeriod, Period + shakingFactor * pRandom.NextDouble()));
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovRQArdTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovRQArd Symbol { get { return (CovRQArd)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double[] Lambda { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [Storable]
+    public double Shape { get; set; }
+
+    [StorableConstructor]
+    private CovRQArdTreeNode(bool deserializing) : base(deserializing) { }
+    private CovRQArdTreeNode(CovRQArdTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Lambda = new double[original.Lambda.Length];
+      Array.Copy(original.Lambda, Lambda, Lambda.Length);
+      Sigma = original.Sigma;
+      Shape = original.Shape;
+    }
+
+    public CovRQArdTreeNode(CovRQArd symbol)
+      : base(symbol) {
+      Lambda = new double[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovRQArdTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaMu, Symbol.LambdaSigma);
+      for (int i = 0; i < Lambda.Length; i++)
+        Lambda[i] = normRandom.NextDouble();
+
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+      Shape = Symbol.MinShape + random.NextDouble() * (Symbol.MaxShape - Symbol.MinShape);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      int index = random.Next(Lambda.Length);
+      var normRandom = new NormalDistributedRandom(random, Symbol.LambdaShakingMu, Symbol.LambdaShakingSigma);
+      Lambda[index] += shakingFactor * normRandom.NextDouble();
+
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+
+      var shapeRandom = new NormalDistributedRandom(random, Symbol.ShapeShakingMu, Symbol.ShapeShakingSigma);
+      Sigma = Math.Max(Symbol.MinShape, Math.Min(Symbol.MaxShape, Shape + shakingFactor * shapeRandom.NextDouble()));
+    }
+  }
+
+  [StorableClass]
+  public sealed class CovRQisoTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new CovRQIso Symbol { get { return (CovRQIso)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public double L { get; set; }
+
+    [Storable]
+    public double Sigma { get; set; }
+
+    [Storable]
+    public double Shape { get; set; }
+
+    [StorableConstructor]
+    private CovRQisoTreeNode(bool deserializing) : base(deserializing) { }
+    private CovRQisoTreeNode(CovRQisoTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      L = original.L;
+      Sigma = original.Sigma;
+      Shape = original.Shape;
+    }
+
+    public CovRQisoTreeNode(CovRQIso symbol)
+      : base(symbol) {
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovRQisoTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      Sigma = Symbol.MinSigma + random.NextDouble() * (Symbol.MaxSigma - Symbol.MinSigma);
+      L = Symbol.MinL + random.NextDouble() * (Symbol.MaxL - Symbol.MinL);
+      Shape = Symbol.MinShape + random.NextDouble() * (Symbol.MaxShape - Symbol.MinShape);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var sigmaRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      Sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, Sigma + shakingFactor * sigmaRandom.NextDouble()));
+
+      var lRandom = new NormalDistributedRandom(random, Symbol.LShakingMu, Symbol.LShakingSigma);
+      L = Math.Max(Symbol.MinL, Math.Min(Symbol.MaxL, L + shakingFactor * lRandom.NextDouble()));
+
+      var shapeRandom = new NormalDistributedRandom(random, Symbol.ShapeShakingMu, Symbol.ShapeShakingSigma);
+      Shape = Math.Max(Symbol.MinShape, Math.Min(Symbol.MaxShape, Shape + shakingFactor * shapeRandom.NextDouble()));
+    }
+  }
+  [StorableClass]
+  public sealed class CovScaleTreeNode : SymbolicExpressionTreeNode {
+    public new CovScale Symbol { get { return (CovScale)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double alpha;
+    [Storable]
+    public double Alpha { get { return alpha; } private set { this.alpha = value; } }
+
+    [StorableConstructor]
+    private CovScaleTreeNode(bool deserializing) : base(deserializing) { }
+    private CovScaleTreeNode(CovScaleTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.alpha = original.alpha;
+    }
+
+    public CovScaleTreeNode(CovScale symbol) : base(symbol) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovScaleTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaMu, Symbol.AlphaSigma);
+      alpha = normRandom.NextDouble();
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.AlphaShakingMu, Symbol.AlphaShakingSigma);
+      alpha += shakingFactor * normRandom.NextDouble();
+    }
+  }
+  [StorableClass]
+  public sealed class CovMaskTreeNode : SymbolicExpressionTreeNode {
+    public new CovMask Symbol { get { return (CovMask)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public bool[] Mask { get; set; }
+
+    [StorableConstructor]
+    private CovMaskTreeNode(bool deserializing) : base(deserializing) { }
+    private CovMaskTreeNode(CovMaskTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Mask = new bool[original.Mask.Length];
+      Array.Copy(original.Mask, Mask, Mask.Length);
+    }
+
+    public CovMaskTreeNode(CovMask symbol)
+      : base(symbol) {
+      Mask = new bool[symbol.Dimension];
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CovMaskTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      for (int i = 0; i < Mask.Length; i++)
+        Mask[i] = random.NextDouble() < Symbol.MaskingProbability;
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      // one point bit flip
+      int i = random.Next(Mask.Length);
+      Mask[i] = !Mask[i];
+    }
+  }
+
+  [StorableClass]
+  public sealed class LikGaussTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new LikGauss Symbol { get { return (LikGauss)base.Symbol; } }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    private double sigma;
+    [Storable]
+    public double Sigma { get { return sigma; } private set { this.sigma = value; } }
+
+    [StorableConstructor]
+    private LikGaussTreeNode(bool deserializing) : base(deserializing) { }
+    private LikGaussTreeNode(LikGaussTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.sigma = original.sigma;
+    }
+
+    public LikGaussTreeNode(LikGauss symbol) : base(symbol) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LikGaussTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      sigma = random.Next((int)Symbol.MinSigma, (int)Symbol.MaxSigma);
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      var normRandom = new NormalDistributedRandom(random, Symbol.SigmaShakingMu, Symbol.SigmaShakingSigma);
+      sigma = Math.Max(Symbol.MinSigma, Math.Min(Symbol.MaxSigma, sigma + normRandom.NextDouble() * shakingFactor));
+    }
+  }
+}
