Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests.csproj
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests.csproj	(revision 3294)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests.csproj	(revision 3294)
@@ -0,0 +1,82 @@
+﻿<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{8824925E-3E00-4543-8293-7DDACE4737F8}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests</AssemblyName>
+    <TargetFrameworkVersion>v3.5</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="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ProbabilisticTreeCreaterTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
+      <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</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: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 3294)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 3294)
@@ -0,0 +1,161 @@
+﻿using System;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
+  [TestClass]
+  public class ProbabilisticTreeCreaterTest {
+    public ProbabilisticTreeCreaterTest() {
+      int populationSize = 1000;
+      randomTrees = new List<SymbolicExpressionTree>();
+      var grammar = new TestGrammar();
+      var random = new MersenneTwister();
+      for (int i = 0; i < populationSize; i++) {
+        randomTrees.Add(ProbabilisticTreeCreator.Create(random, grammar, 100, 10));
+      }
+    }
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    private List<SymbolicExpressionTree> randomTrees;
+
+
+    private class Addition : Symbol { }
+    private class Subtraction : Symbol { }
+    private class Multiplication : Symbol { }
+    private class Division : Symbol { }
+    private class Terminal : Symbol { }
+
+    private class TestGrammar : DefaultSymbolicExpressionGrammar {
+      public TestGrammar()
+        : base(0, 0, 0, 0) {
+        Initialize();
+      }
+
+      private void Initialize() {
+        var add = new Addition();
+        var sub = new Subtraction();
+        var mul = new Multiplication();
+        var div = new Division();
+        var terminal = new Terminal();
+
+        var allSymbols = new List<Symbol>() { add, sub, mul, div, terminal };
+        var functionSymbols = new List<Symbol>() { add, sub, mul, div };
+        allSymbols.ForEach(s => AddAllowedSymbols(StartSymbol, 0, s));
+
+        SetMinSubTreeCount(terminal, 0);
+        SetMaxSubTreeCount(terminal, 0);
+        int maxSubTrees = 3;
+        foreach (var functionSymbol in functionSymbols) {
+          SetMinSubTreeCount(functionSymbol, 1);
+          SetMaxSubTreeCount(functionSymbol, maxSubTrees);
+          foreach (var childSymbol in allSymbols) {
+            for (int argumentIndex = 0; argumentIndex < maxSubTrees; argumentIndex++) {
+              AddAllowedSymbols(functionSymbol, argumentIndex, childSymbol);
+            }
+          }
+        }
+      }
+    }
+
+    [TestMethod()]
+    public void SizeDistributionTest() {
+      int[] histogram = new int[105 / 5];
+      for (int i = 0; i < randomTrees.Count; i++) {
+        histogram[randomTrees[i].Size / 5]++;
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      for (int i = 0; i < histogram.Length; i++) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append("< "); strBuilder.Append((i + 1) * 5);
+        strBuilder.Append(": "); strBuilder.AppendFormat("{0:#0.00%}", histogram[i] / (double)randomTrees.Count);
+      }
+      Assert.Inconclusive("Size distribution of ProbabilisticTreeCreator: " + strBuilder);
+    }
+
+    [TestMethod()]
+    public void FunctionDistributionTest() {
+      Dictionary<Symbol, int> occurances = new Dictionary<Symbol, int>();
+      double n = 0.0;
+      for (int i = 0; i < randomTrees.Count; i++) {
+        foreach (var node in randomTrees[i].IterateNodesPrefix()) {
+          if (node.SubTrees.Count > 0) {
+            if (!occurances.ContainsKey(node.Symbol))
+              occurances[node.Symbol] = 0;
+            occurances[node.Symbol]++;
+            n++;
+          }
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var function in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(function.Name); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[function] / n);
+      }
+      Assert.Inconclusive("Function distribution of ProbabilisticTreeCreator: " + strBuilder);
+    }
+
+    [TestMethod()]
+    public void NumberOfSubTreesDistributionTest() {
+      Dictionary<int, int> occurances = new Dictionary<int, int>();
+      double n = 0.0;
+      for (int i = 0; i < randomTrees.Count; i++) {
+        foreach (var node in randomTrees[i].IterateNodesPrefix()) {
+          if (!occurances.ContainsKey(node.SubTrees.Count))
+            occurances[node.SubTrees.Count] = 0;
+          occurances[node.SubTrees.Count]++;
+          n++;
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var arity in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(arity); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[arity] / n);
+      }
+      Assert.Inconclusive("Distribution of function arities of ProbabilisticTreeCreator: " + strBuilder);
+    }
+
+
+    [TestMethod()]
+    public void TerminalDistributionTest() {
+      Dictionary<Symbol, int> occurances = new Dictionary<Symbol, int>();
+      double n = 0.0;
+      for (int i = 0; i < randomTrees.Count; i++) {
+        foreach (var node in randomTrees[i].IterateNodesPrefix()) {
+          if (node.SubTrees.Count == 0) {
+            if (!occurances.ContainsKey(node.Symbol))
+              occurances[node.Symbol] = 0;
+            occurances[node.Symbol]++;
+            n++;
+          }
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var function in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(function.Name); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[function] / n);
+      }
+      Assert.Inconclusive("Terminal distribution of ProbabilisticTreeCreator: " + strBuilder);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3294)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3294)
@@ -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.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests")]
+[assembly: AssemblyCopyright("Copyright ©  2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM componenets.  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("e232a6a8-a54f-4629-8962-98c1597f1b8d")]
+
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
