Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9342


Ignore:
Timestamp:
04/05/13 13:12:54 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added be project Optimization.Operators.LCS
  • added default rule strategies for GAssist
Location:
branches/LearningClassifierSystems
Files:
33 added
4 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3

    • Property svn:ignore set to
      *.user
      Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs

    r9334 r9342  
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Optimization.Operators;
     31using HeuristicLab.Optimization.Operators.LCS;
    3132using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    203204      Parameters.Add(new FixedValueParameter<PercentValue>("MergeProbability", "", new PercentValue(0.05)));
    204205      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)));
    206207      Parameters.Add(new FixedValueParameter<PercentValue>("OneProbability", "", new PercentValue(0.75)));
    207208      Parameters.Add(new FixedValueParameter<IntValue>("MaximumNumberOfIntervals", "", new IntValue(5)));
     
    248249      mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name;
    249250      mainLoop.ResultsParameter.ActualName = "Results";
     251      mainLoop.ReinitializationProbabilityOperatorParameter.ActualName = ReinitializeCurveOperatorParameter.Name;
    250252
    251253      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
     
    259261      UpdateAnalyzers();
    260262
    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)) {
    262264        ReinitializeCurveOperatorParameter.ValidValues.Add(op);
     265      }
     266      ReinitializeCurveOperatorParameter.Value = ReinitializeCurveOperatorParameter.ValidValues.First(x => x.GetType().Equals(typeof(LinearDiscreteDoubleValueModifier)));
    263267      ParameterizeReinitializeCurveOperators();
    264268
     
    295299      var splitOperator = new SplitOperator();
    296300      splitOperator.ProbabilityParameter.ActualName = "SplitProbability";
     301      //change
     302      splitOperator.IndividualParameter.ActualName = "DecisionList";
    297303      SpecialStages.Operators.Add(splitOperator);
    298304      var mergeOperator = new MergeOperator();
    299305      mergeOperator.ProbabilityParameter.ActualName = "MergeProbability";
     306      //change
     307      mergeOperator.IndividualParameter.ActualName = "DecisionList";
    300308      SpecialStages.Operators.Add(mergeOperator);
    301309      var reinitializeOperator = new ReinitializeOperator();
     
    303311      reinitializeOperator.DiscretizersParameter.ActualName = "Discretizers";
    304312      reinitializeOperator.OneProbabilityParameter.ActualName = "OneProbability";
     313      //change
     314      reinitializeOperator.IndividualParameter.ActualName = "DecisionList";
    305315      SpecialStages.Operators.Add(reinitializeOperator);
    306316      foreach (var op in SpecialStages.Operators) {
     
    477487      IManipulator oldMutator = MutatorParameter.Value;
    478488      MutatorParameter.ValidValues.Clear();
     489      IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault();
     490
    479491      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
    480492        MutatorParameter.ValidValues.Add(mutator);
     
    483495        if (mutator != null) MutatorParameter.Value = mutator;
    484496      }
     497      if (oldMutator == null && defaultMutator != null)
     498        MutatorParameter.Value = defaultMutator;
    485499    }
    486500    private void UpdateAnalyzers() {
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssistMainLoop.cs

    r9334 r9342  
    2525using HeuristicLab.Operators;
    2626using HeuristicLab.Optimization.Operators;
     27using HeuristicLab.Optimization.Operators.LCS;
    2728using HeuristicLab.Parameters;
    2829using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    8485    public ValueLookupParameter<IntValue> PopulationSizeParameter {
    8586      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
     87    }
     88    public ValueLookupParameter<IOperator> ReinitializationProbabilityOperatorParameter {
     89      get { return (ValueLookupParameter<IOperator>)Parameters["ReinitializationProbabilityOperator"]; }
    8690    }
    8791    private ScopeParameter CurrentScopeParameter {
     
    125129      Parameters.Add(new ValueLookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
    126130      Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population."));
     131      Parameters.Add(new ValueLookupParameter<IOperator>("ReinitializationProbabilityOperator", ""));
    127132      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the genetic algorithm should be applied."));
    128133      #endregion
     
    132137      ResultsCollector resultsCollector1 = new ResultsCollector();
    133138      Placeholder analyzer1 = new Placeholder();
     139      Placeholder reinitializationProbabilityOperator = new Placeholder();
    134140      Placeholder selector = new Placeholder();
    135141      SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor();
     
    138144      StochasticBranch stochasticBranchCrossover = new StochasticBranch();
    139145      Placeholder crossover = new Placeholder();
     146      RandomSelector randomSelector = new RandomSelector();
     147      PreservingRightReducer preservingRightReducer = new PreservingRightReducer();
    140148      StochasticBranch stochasticBranchMutator = new StochasticBranch();
    141149      Placeholder mutator = new Placeholder();
     
    162170      analyzer1.OperatorParameter.ActualName = "Analyzer";
    163171
     172      reinitializationProbabilityOperator.Name = "Reinitialization Probability operator (placeholder)";
     173      reinitializationProbabilityOperator.OperatorParameter.ActualName = ReinitializationProbabilityOperatorParameter.Name;
     174
    164175      selector.Name = "Selector";
    165176      selector.OperatorParameter.ActualName = "Selector";
     
    172183      crossover.Name = "Crossover";
    173184      crossover.OperatorParameter.ActualName = "Crossover";
     185
     186      randomSelector.CopySelected.Value = true;
     187      randomSelector.NumberOfSelectedSubScopesParameter.Value = new IntValue(1);
    174188
    175189      stochasticBranchMutator.ProbabilityParameter.ActualName = "MutationProbability";
     
    215229      variableCreator.Successor = resultsCollector1;
    216230      resultsCollector1.Successor = analyzer1;
    217       analyzer1.Successor = selector;
     231      analyzer1.Successor = reinitializationProbabilityOperator;
     232      reinitializationProbabilityOperator.Successor = selector;
    218233      selector.Successor = subScopesProcessor1;
    219234      subScopesProcessor1.Operators.Add(new EmptyOperator());
     
    224239      uniformSubScopesProcessor1.Successor = uniformSubScopesProcessor2;
    225240      stochasticBranchCrossover.FirstBranch = crossover;
    226       stochasticBranchCrossover.SecondBranch = null;
     241      stochasticBranchCrossover.SecondBranch = randomSelector;
     242      randomSelector.Successor = preservingRightReducer;
    227243      stochasticBranchCrossover.Successor = stochasticBranchMutator;
    228244      crossover.Successor = null;
     245      preservingRightReducer.Successor = null;
    229246      stochasticBranchMutator.FirstBranch = mutator;
    230247      stochasticBranchMutator.SecondBranch = null;
     
    246263      comparator.Successor = analyzer2;
    247264      analyzer2.Successor = conditionalBranch;
    248       conditionalBranch.FalseBranch = selector;
     265      conditionalBranch.FalseBranch = reinitializationProbabilityOperator;
    249266      conditionalBranch.TrueBranch = null;
    250267      conditionalBranch.Successor = null;
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/HeuristicLab.Algorithms.GAssist-3.3.csproj

    r9334 r9342  
    9696  </ItemGroup>
    9797  <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" />
    10898    <None Include="Properties\AssemblyInfo.cs.frame" />
    10999    <None Include="Plugin.cs.frame" />
     
    121111      <Name>HeuristicLab.Core-3.3</Name>
    122112    </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>
    123117  </ItemGroup>
    124118  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     119  <PropertyGroup>
     120    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     121set ProjectDir=$(ProjectDir)
     122set SolutionDir=$(SolutionDir)
     123set Outdir=$(Outdir)
     124
     125call PreBuildEvent.cmd
     126</PreBuildEvent>
     127  </PropertyGroup>
    125128  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    126129       Other similar extension points exist, see Microsoft.Common.targets.
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/HeuristicLab.Algorithms.LearningClassifierSystems-3.3.csproj

    r9228 r9342  
    124124      <Private>False</Private>
    125125    </ProjectReference>
     126    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators.LCS\3.3\HeuristicLab.Optimization.Operators.LCS-3.3.csproj">
     127      <Project>{f2c6d3b0-bd4f-4747-b13e-b18e53a2a09d}</Project>
     128      <Name>HeuristicLab.Optimization.Operators.LCS-3.3</Name>
     129    </ProjectReference>
    126130    <ProjectReference Include="..\..\HeuristicLab.Problems.ConditionActionClassification\3.3\HeuristicLab.Problems.ConditionActionClassification-3.3.csproj">
    127131      <Project>{EA51D441-F6A3-41E1-9993-A2488E93C222}</Project>
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LCSAdaptedGeneticAlgorithm.cs

    r9226 r9342  
    2727using HeuristicLab.Operators;
    2828using HeuristicLab.Optimization.Operators;
     29using HeuristicLab.Optimization.Operators.LCS;
    2930using HeuristicLab.Parameters;
    3031using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3

    • Property svn:ignore
      •  

        old new  
        22Plugin.cs
        33*.user
         4*.suo
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/HeuristicLab.Encodings.ConditionActionEncoding-3.3.csproj

    r9334 r9342  
    127127    <Compile Include="Reinforcement\IActionExecuter.cs" />
    128128    <Compile Include="Reinforcement\IClassifierFetcher.cs" />
    129     <Compile Include="Selectors\PreservingRightReducer.cs" />
    130129    <Compile Include="Subsumption\ActionSetSubsumptionOperator.cs" />
    131130    <Compile Include="Subsumption\CheckGASubsumptionOperator.cs" />
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3

    • Property svn:ignore
      •  

        old new  
        11*.user
         2Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs

    r9334 r9342  
    2121
    2222using System.Collections.Generic;
    23 using HeuristicLab.Algorithms.GAssist;
    2423using HeuristicLab.Common;
    2524using HeuristicLab.Core;
     25using HeuristicLab.Optimization.Operators.LCS;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
     
    5050        rules.Add(newRule);
    5151      }
    52       return new DecisionList(rules);
     52
     53      return new DecisionList(rules); //, DefaultActionParameter.ActualValue);
    5354    }
    5455  }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Crossover/SinglePointCrossover.cs

    r9334 r9342  
    6262      }
    6363
    64       return new DecisionList(rules);
     64      return new DecisionList(rules, parent1.DefaultAction);
    6565    }
    6666
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs

    r9334 r9342  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Optimization.Operators.LCS;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
     
    3031  [StorableClass]
    3132  [Item("DecisionList", "")]
    32   public class DecisionList : Item {
     33  public class DecisionList : Item, IGAssistIndividual {
    3334    [Storable]
    3435    private IList<Rule> rules;
     
    4344    }
    4445
     46    // default rule (action) is part of the rule set size
     47    public int RuleSetSize {
     48      get { return defaultAction == null ? rules.Count : rules.Count + 1; }
     49    }
     50
    4551    [StorableConstructor]
    4652    protected DecisionList(bool deserializing) : base(deserializing) { }
    4753    protected DecisionList(DecisionList original, Cloner cloner)
    4854      : base(original, cloner) {
     55      defaultAction = original.DefaultAction;
     56      rules = new List<Rule>(original.rules.Count);
     57      foreach (var rule in original.Rules) {
     58        rules.Add(cloner.Clone(rule));
     59      }
    4960    }
    5061    public DecisionList()
     
    5667      : base() {
    5768      this.rules = rules;
    58       defaultAction = null;
     69      this.defaultAction = null;
    5970    }
    6071    public DecisionList(List<Rule> rules, IAction defaultAction)
     
    95106      return estimated;
    96107    }
     108
     109    #region IGAssistIndividual Members
     110
     111    public void ApplySplit(IRandom random, double probability) {
     112      foreach (var rule in rules) {
     113        rule.ApplySplit(random, probability);
     114      }
     115    }
     116
     117    public void ApplyMerge(IRandom random, double probability) {
     118      foreach (var rule in rules) {
     119        rule.ApplyMerge(random, probability);
     120      }
     121    }
     122
     123    public void ApplyReinitialize(IRandom random, double probability, double oneProbability, IEnumerable<IDiscretizer> discretizers) {
     124      foreach (var rule in rules) {
     125        rule.ApplyReinitialize(random, probability, oneProbability, discretizers);
     126      }
     127    }
     128
     129    #endregion
    97130  }
    98131}
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs

    r9334 r9342  
    2020#endregion
    2121
    22 using HeuristicLab.Algorithms.GAssist;
    2322using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Data;
    2625using HeuristicLab.Operators;
     26using HeuristicLab.Optimization.Operators.LCS;
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    5252      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    5353    }
     54    public IValueLookupParameter<IAction> DefaultActionParameter {
     55      get { return (IValueLookupParameter<IAction>)Parameters["DefaultAction"]; }
     56    }
    5457    #endregion
    5558
     
    6770      Parameters.Add(new LookupParameter<DecisionList>("DecisionList", ""));
    6871      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    69 
     72      Parameters.Add(new ValueLookupParameter<IAction>("DefaultAction", ""));
    7073    }
    7174
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj

    r9334 r9342  
    126126  </ItemGroup>
    127127  <ItemGroup>
    128     <ProjectReference Include="..\..\HeuristicLab.Algorithms.GAssist\3.3\HeuristicLab.Algorithms.GAssist-3.3.csproj">
    129       <Project>{f191a6fa-1b3c-4f82-a711-873b4d839bc0}</Project>
    130       <Name>HeuristicLab.Algorithms.GAssist-3.3</Name>
    131     </ProjectReference>
    132128    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    133129      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
    134130      <Name>HeuristicLab.Core-3.3</Name>
     131    </ProjectReference>
     132    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators.LCS\3.3\HeuristicLab.Optimization.Operators.LCS-3.3.csproj">
     133      <Project>{f2c6d3b0-bd4f-4747-b13e-b18e53a2a09d}</Project>
     134      <Name>HeuristicLab.Optimization.Operators.LCS-3.3</Name>
    135135    </ProjectReference>
    136136    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
     
    141141  <ItemGroup />
    142142  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     143  <PropertyGroup>
     144    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     145set ProjectDir=$(ProjectDir)
     146set SolutionDir=$(SolutionDir)
     147set Outdir=$(Outdir)
     148
     149call PreBuildEvent.cmd
     150</PreBuildEvent>
     151  </PropertyGroup>
    143152  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    144153       Other similar extension points exist, see Microsoft.Common.targets.
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs

    r9334 r9342  
    5151
    5252    IEnumerable<IAction> FetchAction(IEnumerable<int> rows);
     53    IAction FetchAction(int rows);
    5354
    5455    event EventHandler Changed;
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs

    r9334 r9342  
    2020#endregion
    2121
    22 using HeuristicLab.Algorithms.GAssist;
    2322using HeuristicLab.Core;
    2423using HeuristicLab.Data;
    2524using HeuristicLab.Optimization;
     25using HeuristicLab.Optimization.Operators.LCS;
    2626
    2727namespace HeuristicLab.Encodings.DecisionList {
     
    3131    IValueLookupParameter<IntValue> InitialNumberOfRulesParameter { get; }
    3232    IValueLookupParameter<PercentValue> OneProbabilityParameter { get; }
     33    IValueLookupParameter<IAction> DefaultActionParameter { get; }
    3334  }
    3435}
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListManipulator.cs

    r9334 r9342  
    2121
    2222using HeuristicLab.Core;
     23using HeuristicLab.Data;
    2324using HeuristicLab.Optimization;
    2425
     
    2627  public interface IDecisionListManipulator : IDecisionListOperator, IManipulator {
    2728    ILookupParameter<DecisionList> ChildParameter { get; }
     29    ILookupParameter<PercentValue> ActionMutationProbabilityParameter { get; }
    2830  }
    2931}
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs

    r9334 r9342  
    2424using System.Linq;
    2525using System.Text;
    26 using HeuristicLab.Algorithms.GAssist;
    2726using HeuristicLab.Common;
    2827using HeuristicLab.Core;
     28using HeuristicLab.Optimization.Operators.LCS;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
     
    110110      return new Rule(crossedVariables, action);
    111111    }
     112
     113    public void ApplySplit(IRandom random, double probability) {
     114      foreach (var variable in variables.Values) {
     115        if (random.NextDouble() < probability)
     116          variable.Split(random);
     117      }
     118    }
     119
     120    public void ApplyMerge(IRandom random, double probability) {
     121      foreach (var variable in variables.Values) {
     122        if (random.NextDouble() < probability)
     123          variable.Merge(random);
     124      }
     125    }
     126
     127    public void ApplyReinitialize(IRandom random, double probability, double oneProbability, IEnumerable<IDiscretizer> discretizers) {
     128      foreach (var variable in variables.Values) {
     129        if (random.NextDouble() < probability)
     130          variable.Reinitialize(random, oneProbability, discretizers);
     131      }
     132    }
    112133  }
    113134}
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs

    r9334 r9342  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Algorithms.GAssist;
    2625using HeuristicLab.Common;
    2726using HeuristicLab.Core;
     27using HeuristicLab.Optimization.Operators.LCS;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IVariable.cs

    r9334 r9342  
    2222using System;
    2323using System.Collections.Generic;
    24 using HeuristicLab.Algorithms.GAssist;
    2524using HeuristicLab.Core;
     25using HeuristicLab.Optimization.Operators.LCS;
    2626
    2727namespace HeuristicLab.Encodings.DecisionList {
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs

    r9334 r9342  
    2323using System.Collections.Generic;
    2424using System.Text;
    25 using HeuristicLab.Algorithms.GAssist;
    2625using HeuristicLab.Common;
    2726using HeuristicLab.Core;
     27using HeuristicLab.Optimization.Operators.LCS;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
  • branches/LearningClassifierSystems/HeuristicLab.Problems.CombinedIntegerVectorClassification/3.3/Properties/AssemblyInfo.cs.frame

    r9226 r9342  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.3.0.0")]
    57 [assembly: AssemblyFileVersion("3.3.7.9194")]
     57[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
  • branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblem.cs

    r9242 r9342  
    211211    }
    212212
    213     protected void ParameterizeOperators() {
     213    protected virtual void ParameterizeOperators() {
    214214      foreach (XCSSolutionAnalyzer xcsAnalyzer in Operators.OfType<XCSSolutionAnalyzer>()) {
    215215        xcsAnalyzer.ClassifierParameter.ActualName = ChildName;
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3

    • Property svn:ignore set to
      Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs

    r9334 r9342  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132using HeuristicLab.Problems.DataAnalysis;
    3233
     
    6465    public IFixedValueParameter<DoubleValue> WeightRelaxFactorParameter {
    6566      get { return (IFixedValueParameter<DoubleValue>)Parameters["WeightRelaxFactor"]; }
     67    }
     68    public IFixedValueParameter<PercentValue> ActionMutationProbabilityParameter {
     69      get { return (IFixedValueParameter<PercentValue>)Parameters["ActionMutationProbability"]; }
    6670    }
    6771
     
    107111      Parameters.Add(new FixedValueParameter<DoubleValue>("InitialTheoryLengthRatio", "", new DoubleValue(0.075)));
    108112      Parameters.Add(new FixedValueParameter<DoubleValue>("WeightRelaxFactor", "", new DoubleValue(0.9)));
     113      Parameters.Add(new FixedValueParameter<PercentValue>("ActionMutationProbability", "", new PercentValue(0.1)));
    109114
    110115      Evaluator.SizePenaltyMinRulesParameter.ActualName = "SizePenaltyMinRules";
    111116      // do differently
    112117      ((MDLEvaluator)Evaluator).MDLCalculatorParameter.Value = new MDLCalculator(ActivationIterationParameter.Value.Value, InitialTheoryLengthRatioParameter.Value.Value, WeightRelaxFactorParameter.Value.Value);
     118      // do differently
     119      decisionListCreator.DefaultActionParameter.Value = problemData.FetchAction(0);
     120
     121      InitializeOperators();
     122    }
     123
     124    private void InitializeOperators() {
     125      foreach (var op in ApplicationManager.Manager.GetInstances<IDecisionListCrossover>())
     126        Operators.Add(op);
     127      foreach (var op in ApplicationManager.Manager.GetInstances<IDecisionListManipulator>())
     128        Operators.Add(op);
     129
     130      ParameterizeOperators();
     131    }
     132
     133    private void ParameterizeOperators() {
     134      foreach (IDecisionListCrossover op in Operators.OfType<IDecisionListCrossover>()) {
     135        op.ParentsParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     136        op.ParentsParameter.Hidden = true;
     137        op.ChildParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     138        op.ChildParameter.Hidden = true;
     139      }
     140      foreach (IDecisionListManipulator op in Operators.OfType<IDecisionListManipulator>()) {
     141        op.ChildParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
     142        op.ChildParameter.Hidden = true;
     143        op.ActionMutationProbabilityParameter.ActualName = ActionMutationProbabilityParameter.Name;
     144        op.ActionMutationProbabilityParameter.Hidden = true;
     145      }
    113146    }
    114147    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj

    r9334 r9342  
    115115  </ItemGroup>
    116116  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     117  <PropertyGroup>
     118    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     119set ProjectDir=$(ProjectDir)
     120set SolutionDir=$(SolutionDir)
     121set Outdir=$(Outdir)
     122
     123call PreBuildEvent.cmd
     124</PreBuildEvent>
     125  </PropertyGroup>
    117126  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    118127       Other similar extension points exist, see Microsoft.Common.targets.
  • branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/HeuristicLab.Problems.VariableVectorClassification-3.3.csproj

    r9334 r9342  
    122122  </ItemGroup>
    123123  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     124  <PropertyGroup>
     125    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     126set ProjectDir=$(ProjectDir)
     127set SolutionDir=$(SolutionDir)
     128set Outdir=$(Outdir)
     129
     130call PreBuildEvent.cmd</PreBuildEvent>
     131  </PropertyGroup>
    124132  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    125133       Other similar extension points exist, see Microsoft.Common.targets.
  • branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/VariableVectorClassificationProblem.cs

    r9242 r9342  
    116116    }
    117117
     118    protected override void ParameterizeOperators() {
     119      base.ParameterizeOperators();
     120      foreach (IVariableVectorCrossover op in Operators.OfType<IVariableVectorCrossover>()) {
     121        op.ParentsParameter.ActualName = SolutionCreator.VariableVectorParameter.ActualName;
     122        op.ParentsParameter.Hidden = true;
     123        op.ChildParameter.ActualName = SolutionCreator.VariableVectorParameter.ActualName;
     124        op.ChildParameter.Hidden = true;
     125      }
     126    }
     127
    118128    private IEnumerable<IManipulator> AddManipulators() {
    119129      var manipulator = new UniformSomePositionManipulator();
  • branches/LearningClassifierSystems/LearningClassifierSystem.sln

    r9334 r9342  
    11
    2 Microsoft Visual Studio Solution File, Format Version 11.00
    3 # Visual Studio 2010
     2Microsoft Visual Studio Solution File, Format Version 12.00
     3# Visual Studio 2012
    44Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{96396439-A764-4022-A8D2-BE021449B8D1}"
    55  ProjectSection(SolutionItems) = preProject
     
    3535EndProject
    3636Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DecisionListClassification-3.3", "HeuristicLab.Problems.DecisionListClassification\3.3\HeuristicLab.Problems.DecisionListClassification-3.3.csproj", "{CA20AC55-B57D-4078-8CB9-C44E5FF7958B}"
     37EndProject
     38Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization.Operators.LCS-3.3", "HeuristicLab.Optimization.Operators.LCS\3.3\HeuristicLab.Optimization.Operators.LCS-3.3.csproj", "{F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}"
    3739EndProject
    3840Global
     
    170172    {CA20AC55-B57D-4078-8CB9-C44E5FF7958B}.Release|x64.ActiveCfg = Release|Any CPU
    171173    {CA20AC55-B57D-4078-8CB9-C44E5FF7958B}.Release|x86.ActiveCfg = Release|Any CPU
     174    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     175    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Debug|Any CPU.Build.0 = Debug|Any CPU
     176    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Debug|x64.ActiveCfg = Debug|Any CPU
     177    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Debug|x86.ActiveCfg = Debug|Any CPU
     178    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Release|Any CPU.ActiveCfg = Release|Any CPU
     179    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Release|Any CPU.Build.0 = Release|Any CPU
     180    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Release|x64.ActiveCfg = Release|Any CPU
     181    {F2C6D3B0-BD4F-4747-B13E-B18E53A2A09D}.Release|x86.ActiveCfg = Release|Any CPU
    172182  EndGlobalSection
    173183  GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset for help on using the changeset viewer.