Changeset 11672 for branches/Parameter-less Population Pyramid
- Timestamp:
- 12/09/14 14:25:57 (10 years ago)
- Location:
- branches/Parameter-less Population Pyramid
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs
r11668 r11672 36 36 [StorableClass] 37 37 [Creatable("Parameterless Population Pyramid")] 38 // In the GECCO paper, Section 2.1 38 39 public class HillClimber : AlgorithmBase { 39 40 [Storable] … … 82 83 } 83 84 } 85 84 86 public static double ImproveToLocalOptimum(IBinaryVectorProblem problem, bool[] solution, double fitness, IRandom rand) { 85 87 var tried = new HashSet<int>(); -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs
r11667 r11672 29 29 namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid { 30 30 public static class LinkageCrossover { 31 31 // In the GECCO paper, Figure 3 32 32 public static double ImproveUsingTree(LinkageTree tree, IList<bool[]> donors, bool[] solution, double fitness, IBinaryVectorProblem problem, IRandom rand) { 33 33 var options = Enumerable.Range(0, donors.Count).ToArray(); -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs
r11669 r11672 75 75 // While "total" always has an integer value, it is a double to reduce 76 76 // how often type casts are needed to prevent integer divison 77 // In the GECCO paper, calculates Equation 2 77 78 private static double NegativeEntropy(int[] counts, double total) { 78 79 double sum = 0; … … 85 86 } 86 87 88 // Uses the frequency table to calcuate the entropy distance between two indices. 89 // In the GECCO paper, calculates Equation 1 87 90 private double EntropyDistance(int i, int j) { 88 91 // This ensures you are using the lower triangular part of "occurances" … … 111 114 } 112 115 116 // Performs O(N^2) clustering based on the method described in: 117 // "Optimal implementations of UPGMA and other common clustering algorithms" 118 // by I. Gronau and S. Moran 119 // In the GECCO paper, Figure 2 is a simplified version of this algorithm. 113 120 private void Rebuild() { 114 121 // Keep track of which clusters have not been merged … … 160 167 topLevel.Swap(end_of_path, best_index); 161 168 end_of_path++; 162 163 169 } 164 170 // Last two elements in the path are the clusters to join -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs
r11669 r11672 158 158 } 159 159 160 // In the GECCO paper, Figure 1 160 161 private double iterate() { 161 162 // Create a random solution -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveStepTrapProblem.cs
r11669 r11672 31 31 [StorableClass] 32 32 [Creatable("Parameterless Population Pyramid")] 33 // In the GECCO paper, Section 4.1 33 34 public class DeceptiveStepTrapProblem : DeceptiveTrapProblem { 34 35 [StorableConstructor] -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/DeceptiveTrapProblem.cs
r11669 r11672 32 32 [StorableClass] 33 33 [Creatable("Parameterless Population Pyramid")] 34 // In the GECCO paper, Section 4.1 34 35 public class DeceptiveTrapProblem : BinaryVectorProblem { 35 36 [StorableConstructor] … … 67 68 } 68 69 70 // In the GECCO paper, calculates Equation 3 69 71 protected virtual int Score(bool[] individual, int trapIndex) { 70 72 int result = 0; 73 // count number of bits in trap set to 1 71 74 for (int index = trapIndex; index < trapIndex + TrapSize; index++) { 72 75 if (individual[index]) result++; -
branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/HIFFProblem.cs
r11669 r11672 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 27 28 namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid .Problems{28 namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid { 29 29 [Item("Hierararchical If and only If problem", "Genome evaluated in nested subsets to see if each subset contains either all 0s or all 1s.")] 30 30 [StorableClass] 31 31 [Creatable("Parameterless Population Pyramid")] 32 // In the GECCO paper, Section 4.1 32 33 public class HIFFProblem : BinaryVectorProblem { 33 34 [StorableConstructor] -
branches/Parameter-less Population Pyramid/ParameterlessPopulationPyramid.Test/ParameterlessPopulationPyramid.Test.csproj
r11667 r11672 39 39 <HintPath>..\HeuristicLab.Algorithms.ParameterlessPopulationPyramid\3.3\obj\Release\HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.dll</HintPath> 40 40 </Reference> 41 <Reference Include="HeuristicLab.Analysis-3.3"> 42 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 43 </Reference> 41 44 <Reference Include="HeuristicLab.Common-3.3"> 42 45 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> … … 44 47 <Reference Include="HeuristicLab.Core-3.3"> 45 48 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 49 </Reference> 50 <Reference Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3"> 51 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll</HintPath> 52 </Reference> 53 <Reference Include="HeuristicLab.Optimization-3.3"> 54 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 46 55 </Reference> 47 56 <Reference Include="HeuristicLab.Random-3.3"> … … 65 74 <Compile Include="EnumerableBoolEqualityComparerTest.cs" /> 66 75 <Compile Include="LinkageTreeTest.cs" /> 76 <Compile Include="ParameterlessPopulationPyramidTest.cs" /> 67 77 <Compile Include="Properties\AssemblyInfo.cs" /> 68 78 </ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.