- Timestamp:
- 04/05/13 13:12:54 (12 years ago)
- Location:
- branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3
- Files:
-
- 3 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3
-
Property
svn:ignore
set to
*.user
Plugin.cs
-
Property
svn:ignore
set to
-
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs
r9334 r9342 29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Optimization.Operators; 31 using HeuristicLab.Optimization.Operators.LCS; 31 32 using HeuristicLab.Parameters; 32 33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 203 204 Parameters.Add(new FixedValueParameter<PercentValue>("MergeProbability", "", new PercentValue(0.05))); 204 205 Parameters.Add(new FixedValueParameter<PercentValue>("StartReinitializeProbability", "", new PercentValue(0.05))); 205 Parameters.Add(new FixedValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue( 0.0)));206 Parameters.Add(new FixedValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue(Double.Epsilon))); 206 207 Parameters.Add(new FixedValueParameter<PercentValue>("OneProbability", "", new PercentValue(0.75))); 207 208 Parameters.Add(new FixedValueParameter<IntValue>("MaximumNumberOfIntervals", "", new IntValue(5))); … … 248 249 mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name; 249 250 mainLoop.ResultsParameter.ActualName = "Results"; 251 mainLoop.ReinitializationProbabilityOperatorParameter.ActualName = ReinitializeCurveOperatorParameter.Name; 250 252 251 253 foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name)) … … 259 261 UpdateAnalyzers(); 260 262 261 foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name)) 263 foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name)) { 262 264 ReinitializeCurveOperatorParameter.ValidValues.Add(op); 265 } 266 ReinitializeCurveOperatorParameter.Value = ReinitializeCurveOperatorParameter.ValidValues.First(x => x.GetType().Equals(typeof(LinearDiscreteDoubleValueModifier))); 263 267 ParameterizeReinitializeCurveOperators(); 264 268 … … 295 299 var splitOperator = new SplitOperator(); 296 300 splitOperator.ProbabilityParameter.ActualName = "SplitProbability"; 301 //change 302 splitOperator.IndividualParameter.ActualName = "DecisionList"; 297 303 SpecialStages.Operators.Add(splitOperator); 298 304 var mergeOperator = new MergeOperator(); 299 305 mergeOperator.ProbabilityParameter.ActualName = "MergeProbability"; 306 //change 307 mergeOperator.IndividualParameter.ActualName = "DecisionList"; 300 308 SpecialStages.Operators.Add(mergeOperator); 301 309 var reinitializeOperator = new ReinitializeOperator(); … … 303 311 reinitializeOperator.DiscretizersParameter.ActualName = "Discretizers"; 304 312 reinitializeOperator.OneProbabilityParameter.ActualName = "OneProbability"; 313 //change 314 reinitializeOperator.IndividualParameter.ActualName = "DecisionList"; 305 315 SpecialStages.Operators.Add(reinitializeOperator); 306 316 foreach (var op in SpecialStages.Operators) { … … 477 487 IManipulator oldMutator = MutatorParameter.Value; 478 488 MutatorParameter.ValidValues.Clear(); 489 IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault(); 490 479 491 foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name)) 480 492 MutatorParameter.ValidValues.Add(mutator); … … 483 495 if (mutator != null) MutatorParameter.Value = mutator; 484 496 } 497 if (oldMutator == null && defaultMutator != null) 498 MutatorParameter.Value = defaultMutator; 485 499 } 486 500 private void UpdateAnalyzers() { -
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssistMainLoop.cs
r9334 r9342 25 25 using HeuristicLab.Operators; 26 26 using HeuristicLab.Optimization.Operators; 27 using HeuristicLab.Optimization.Operators.LCS; 27 28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 84 85 public ValueLookupParameter<IntValue> PopulationSizeParameter { 85 86 get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; } 87 } 88 public ValueLookupParameter<IOperator> ReinitializationProbabilityOperatorParameter { 89 get { return (ValueLookupParameter<IOperator>)Parameters["ReinitializationProbabilityOperator"]; } 86 90 } 87 91 private ScopeParameter CurrentScopeParameter { … … 125 129 Parameters.Add(new ValueLookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated.")); 126 130 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population.")); 131 Parameters.Add(new ValueLookupParameter<IOperator>("ReinitializationProbabilityOperator", "")); 127 132 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the genetic algorithm should be applied.")); 128 133 #endregion … … 132 137 ResultsCollector resultsCollector1 = new ResultsCollector(); 133 138 Placeholder analyzer1 = new Placeholder(); 139 Placeholder reinitializationProbabilityOperator = new Placeholder(); 134 140 Placeholder selector = new Placeholder(); 135 141 SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor(); … … 138 144 StochasticBranch stochasticBranchCrossover = new StochasticBranch(); 139 145 Placeholder crossover = new Placeholder(); 146 RandomSelector randomSelector = new RandomSelector(); 147 PreservingRightReducer preservingRightReducer = new PreservingRightReducer(); 140 148 StochasticBranch stochasticBranchMutator = new StochasticBranch(); 141 149 Placeholder mutator = new Placeholder(); … … 162 170 analyzer1.OperatorParameter.ActualName = "Analyzer"; 163 171 172 reinitializationProbabilityOperator.Name = "Reinitialization Probability operator (placeholder)"; 173 reinitializationProbabilityOperator.OperatorParameter.ActualName = ReinitializationProbabilityOperatorParameter.Name; 174 164 175 selector.Name = "Selector"; 165 176 selector.OperatorParameter.ActualName = "Selector"; … … 172 183 crossover.Name = "Crossover"; 173 184 crossover.OperatorParameter.ActualName = "Crossover"; 185 186 randomSelector.CopySelected.Value = true; 187 randomSelector.NumberOfSelectedSubScopesParameter.Value = new IntValue(1); 174 188 175 189 stochasticBranchMutator.ProbabilityParameter.ActualName = "MutationProbability"; … … 215 229 variableCreator.Successor = resultsCollector1; 216 230 resultsCollector1.Successor = analyzer1; 217 analyzer1.Successor = selector; 231 analyzer1.Successor = reinitializationProbabilityOperator; 232 reinitializationProbabilityOperator.Successor = selector; 218 233 selector.Successor = subScopesProcessor1; 219 234 subScopesProcessor1.Operators.Add(new EmptyOperator()); … … 224 239 uniformSubScopesProcessor1.Successor = uniformSubScopesProcessor2; 225 240 stochasticBranchCrossover.FirstBranch = crossover; 226 stochasticBranchCrossover.SecondBranch = null; 241 stochasticBranchCrossover.SecondBranch = randomSelector; 242 randomSelector.Successor = preservingRightReducer; 227 243 stochasticBranchCrossover.Successor = stochasticBranchMutator; 228 244 crossover.Successor = null; 245 preservingRightReducer.Successor = null; 229 246 stochasticBranchMutator.FirstBranch = mutator; 230 247 stochasticBranchMutator.SecondBranch = null; … … 246 263 comparator.Successor = analyzer2; 247 264 analyzer2.Successor = conditionalBranch; 248 conditionalBranch.FalseBranch = selector;265 conditionalBranch.FalseBranch = reinitializationProbabilityOperator; 249 266 conditionalBranch.TrueBranch = null; 250 267 conditionalBranch.Successor = null; -
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/HeuristicLab.Algorithms.GAssist-3.3.csproj
r9334 r9342 96 96 </ItemGroup> 97 97 <ItemGroup> 98 <Compile Include="Discretizer\UniformWidthDiscretizer.cs" />99 <Compile Include="Interfaces\IDiscretizer.cs" />100 <Compile Include="Interfaces\IGAssistIndividualCreator.cs" />101 <Compile Include="Interfaces\IGAssistSpecialStage.cs" />102 <Compile Include="Interfaces\IGAssistIndividual.cs" />103 <Compile Include="SpecialStage\GAssistSpecialStageMultiOperator.cs" />104 <Compile Include="SpecialStage\GAssistSpecialStageOperator.cs" />105 <Compile Include="SpecialStage\MergeOperator.cs" />106 <Compile Include="SpecialStage\ReinitializeOperator.cs" />107 <Compile Include="SpecialStage\SplitOperator.cs" />108 98 <None Include="Properties\AssemblyInfo.cs.frame" /> 109 99 <None Include="Plugin.cs.frame" /> … … 121 111 <Name>HeuristicLab.Core-3.3</Name> 122 112 </ProjectReference> 113 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators.LCS\3.3\HeuristicLab.Optimization.Operators.LCS-3.3.csproj"> 114 <Project>{f2c6d3b0-bd4f-4747-b13e-b18e53a2a09d}</Project> 115 <Name>HeuristicLab.Optimization.Operators.LCS-3.3</Name> 116 </ProjectReference> 123 117 </ItemGroup> 124 118 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 119 <PropertyGroup> 120 <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 121 set ProjectDir=$(ProjectDir) 122 set SolutionDir=$(SolutionDir) 123 set Outdir=$(Outdir) 124 125 call PreBuildEvent.cmd 126 </PreBuildEvent> 127 </PropertyGroup> 125 128 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 126 129 Other similar extension points exist, see Microsoft.Common.targets. -
branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.