Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs	(revision 11672)
@@ -36,4 +36,5 @@
   [StorableClass]
   [Creatable("Parameterless Population Pyramid")]
+  // In the GECCO paper, Section 2.1
   public class HillClimber : AlgorithmBase {
     [Storable]
@@ -82,4 +83,5 @@
       }
     }
+
     public static double ImproveToLocalOptimum(IBinaryVectorProblem problem, bool[] solution, double fitness, IRandom rand) {
       var tried = new HashSet<int>();
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs	(revision 11672)
@@ -29,5 +29,5 @@
 namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid {
   public static class LinkageCrossover {
-
+    // In the GECCO paper, Figure 3
     public static double ImproveUsingTree(LinkageTree tree, IList<bool[]> donors, bool[] solution, double fitness, IBinaryVectorProblem problem, IRandom rand) {
       var options = Enumerable.Range(0, donors.Count).ToArray();
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs	(revision 11672)
@@ -75,4 +75,5 @@
     // While "total" always has an integer value, it is a double to reduce
     // how often type casts are needed to prevent integer divison
+    // In the GECCO paper, calculates Equation 2
     private static double NegativeEntropy(int[] counts, double total) {
       double sum = 0;
@@ -85,4 +86,6 @@
     }
 
+    // Uses the frequency table to calcuate the entropy distance between two indices.
+    // In the GECCO paper, calculates Equation 1
     private double EntropyDistance(int i, int j) {
       // This ensures you are using the lower triangular part of "occurances"
@@ -111,4 +114,8 @@
     }
 
+    // Performs O(N^2) clustering based on the method described in:
+    // "Optimal implementations of UPGMA and other common clustering algorithms"
+    // by I. Gronau and S. Moran
+    // In the GECCO paper, Figure 2 is a simplified version of this algorithm.
     private void Rebuild() {
       // Keep track of which clusters have not been merged
@@ -160,5 +167,4 @@
           topLevel.Swap(end_of_path, best_index);
           end_of_path++;
-
         }
         // Last two elements in the path are the clusters to join
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs	(revision 11672)
@@ -158,4 +158,5 @@
     }
 
+    // In the GECCO paper, Figure 1
     private double iterate() {
       // Create a random solution
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveStepTrapProblem.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveStepTrapProblem.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveStepTrapProblem.cs	(revision 11672)
@@ -31,4 +31,5 @@
   [StorableClass]
   [Creatable("Parameterless Population Pyramid")]
+  // In the GECCO paper, Section 4.1
   public class DeceptiveStepTrapProblem : DeceptiveTrapProblem {
     [StorableConstructor]
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveTrapProblem.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveTrapProblem.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveTrapProblem.cs	(revision 11672)
@@ -32,4 +32,5 @@
   [StorableClass]
   [Creatable("Parameterless Population Pyramid")]
+  // In the GECCO paper, Section 4.1
   public class DeceptiveTrapProblem : BinaryVectorProblem {
     [StorableConstructor]
@@ -67,6 +68,8 @@
     }
 
+    // In the GECCO paper, calculates Equation 3
     protected virtual int Score(bool[] individual, int trapIndex) {
       int result = 0;
+      // count number of bits in trap set to 1
       for (int index = trapIndex; index < trapIndex + TrapSize; index++) {
         if (individual[index]) result++;
Index: branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/HIFFProblem.cs
===================================================================
--- branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/HIFFProblem.cs	(revision 11669)
+++ branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/HIFFProblem.cs	(revision 11672)
@@ -26,8 +26,9 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid.Problems {
+namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid {
   [Item("Hierararchical If and only If problem", "Genome evaluated in nested subsets to see if each subset contains either all 0s or all 1s.")]
   [StorableClass]
   [Creatable("Parameterless Population Pyramid")]
+  // In the GECCO paper, Section 4.1
   public class HIFFProblem : BinaryVectorProblem {
     [StorableConstructor]
Index: branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramid.Test.csproj
===================================================================
--- branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramid.Test.csproj	(revision 11669)
+++ branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramid.Test.csproj	(revision 11672)
@@ -39,4 +39,7 @@
       <HintPath>..\HeuristicLab.Algorithms.ParameterlessPopulationPyramid\3.3\obj\Release\HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.dll</HintPath>
     </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Common-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
@@ -44,4 +47,10 @@
     <Reference Include="HeuristicLab.Core-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.BinaryVectorEncoding-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.Random-3.3">
@@ -65,4 +74,5 @@
     <Compile Include="EnumerableBoolEqualityComparerTest.cs" />
     <Compile Include="LinkageTreeTest.cs" />
+    <Compile Include="ParameterlessPopulationPyramidTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
Index: branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramidTest.cs
===================================================================
--- branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramidTest.cs	(revision 11672)
+++ branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramidTest.cs	(revision 11672)
@@ -0,0 +1,92 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
+using HeuristicLab.Common;
+
+namespace ParameterlessPopulationPyramid.Test {
+  [TestClass]
+  public class ParameterlessPopulationPyramidTest {
+
+    // Utility function that sets up and executes the run, then asserts the results
+    private PrivateObject DoRun(BinaryVectorProblem problem, int maximumEvaluations, int seed, double bestQuality, int foundOn) {
+      var solver = new HeuristicLab.Algorithms.ParameterlessPopulationPyramid.ParameterlessPopulationPyramid();
+      solver.Problem = problem;
+      solver.MaximumEvaluations = maximumEvaluations;
+      solver.Seed = seed;
+      solver.SetSeedRandomly = false;
+      PrivateObject hidden = new PrivateObject(solver);
+      try {
+        hidden.Invoke("Run");
+      }
+      catch (OperationCanceledException) {
+        // Ignore
+      }
+
+      Assert.AreEqual(maximumEvaluations, hidden.GetProperty("ResultsEvaluations"), "Total Evaluations");
+      double foundQuality =  (double)hidden.GetProperty("ResultsBestQuality");
+      Assert.IsTrue(foundQuality.IsAlmost(bestQuality), string.Format("Expected <{0}> Actual <{1}>", bestQuality, foundQuality));
+      Assert.AreEqual(foundOn, hidden.GetProperty("ResultsBestFoundOnEvaluation"), "Found On");
+
+      return hidden;
+    }
+    
+    [TestMethod]
+    public void P3DeceptiveTrap() {
+      var problem = new DeceptiveTrapProblem();
+      problem.Length = 49;
+      problem.TrapSize = 7;
+      DoRun(problem, 100, 123, 0.857142857142857, 50);
+      DoRun(problem, 9876, 123, 0.918367346938776, 981);
+      DoRun(problem, 20000, 987, 1, 19977);
+      problem.Length = 700;
+      DoRun(problem, 100000, 987, 0.941428571428571, 96901);
+    }
+
+    // Unlike DeceptiveTrap, DeceptiveStepTrap likely contains neutral (fitness equal) modifications.
+    [TestMethod]
+    public void P3DeceptiveStepTrap() {
+      var problem = new DeceptiveStepTrapProblem();
+      problem.Length = 49;
+      problem.TrapSize = 7;
+      problem.StepSize = 2;
+      DoRun(problem, 100, 123, 0.5, 6);
+      DoRun(problem, 9876, 123, 0.785714285714286, 3489);
+      DoRun(problem, 70000, 987, 1, 68292);
+      problem.Length = 700;
+      DoRun(problem, 100000, 987, 0.76, 58711);
+    }
+
+    // Unlike the Trap tests, HIFF uses higher order linkage learning.
+    [TestMethod]
+    public void P3HIFF() {
+      var problem = new HIFFProblem();
+      problem.Length = 32;
+      DoRun(problem, 50, 12345, 0.375, 26);
+      DoRun(problem, 1000, 12345, 1, 976);
+      problem.Length = 512;
+      DoRun(problem, 1000, 54321, 0.17361111111111, 440);
+      DoRun(problem, 130000, 54321, 1, 126082);
+    }
+  }
+}
