Index: branches/LearningClassifierSystems/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame	(revision 9605)
@@ -37,8 +37,10 @@
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
   [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
   [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
Index: branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs	(revision 9605)
@@ -201,6 +201,9 @@
       get { return (VariableCreator)RandomCreator.Successor; }
     }
+    private Placeholder InitialDefaultRuleExecution {
+      get { return (Placeholder)VariableCreator.Successor; }
+    }
     private Placeholder MDLIterationPlaceholder {
-      get { return (Placeholder)VariableCreator.Successor; }
+      get { return (Placeholder)InitialDefaultRuleExecution.Successor; }
     }
     private ILASOperator ILASOperator {
@@ -210,6 +213,6 @@
       get { return (InitializeDiscretizersOperator)ILASOperator.Successor; }
     }
-    private SolutionsCreator SolutionsCreator {
-      get { return (SolutionsCreator)InitializeDiscretizers.Successor; }
+    private NicheSolutionCreator SolutionsCreator {
+      get { return (NicheSolutionCreator)InitializeDiscretizers.Successor; }
     }
     private GAssistMainLoop GeneticAlgorithmMainLoop {
@@ -255,8 +258,9 @@
       RandomCreator randomCreator = new RandomCreator();
       VariableCreator variableCreator = new VariableCreator();
+      Placeholder initialDefaultRuleExecution = new Placeholder();
       Placeholder mdlIterationPlaceholder = new Placeholder();
       ILASOperator ilasOperator = new ILASOperator();
       InitializeDiscretizersOperator initializeDiscretizers = new InitializeDiscretizersOperator();
-      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      NicheSolutionCreator solutionsCreator = new NicheSolutionCreator();
       SubScopesCounter subScopesCounter = new SubScopesCounter();
       ResultsCollector resultsCollector = new ResultsCollector();
@@ -272,5 +276,9 @@
 
       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class GAssistMainLoop expects this to be called Generations
-      variableCreator.Successor = mdlIterationPlaceholder;
+      variableCreator.Successor = initialDefaultRuleExecution;
+
+      initialDefaultRuleExecution.Name = "Initial Default Rule Execution";
+      initialDefaultRuleExecution.OperatorParameter.ActualName = DefaultRuleParameter.Name;
+      initialDefaultRuleExecution.Successor = mdlIterationPlaceholder;
 
       mdlIterationPlaceholder.Name = "MDL Iteration Operator";
@@ -315,6 +323,5 @@
       foreach (INichingSingleObjectiveSelector selector in ApplicationManager.Manager.GetInstances<INichingSingleObjectiveSelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
         SelectorParameter.ValidValues.Add(selector);
-      //INichingSingleObjectiveSelector proportionalSelector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("ProportionalSelector"));
-      //if (proportionalSelector != null) SelectorParameter.Value = proportionalSelector;
+
       ParameterizeSelectors();
 
@@ -369,10 +376,10 @@
       SpecialStages.Operators.Clear();
       var splitOperator = new SplitOperator();
-      splitOperator.ProbabilityParameter.ActualName = "SplitProbability";
+      splitOperator.ProbabilityParameter.ActualName = SplitProbabilityParameter.Name;
       //change
       splitOperator.IndividualParameter.ActualName = "DecisionList";
       SpecialStages.Operators.Add(splitOperator);
       var mergeOperator = new MergeOperator();
-      mergeOperator.ProbabilityParameter.ActualName = "MergeProbability";
+      mergeOperator.ProbabilityParameter.ActualName = MergeProbabilityParameter.Name;
       //change
       mergeOperator.IndividualParameter.ActualName = "DecisionList";
@@ -381,5 +388,5 @@
       reinitializeOperator.ProbabilityParameter.ActualName = "ReinitializeProbability";
       reinitializeOperator.DiscretizersParameter.ActualName = "Discretizers";
-      reinitializeOperator.OneProbabilityParameter.ActualName = "OneProbability";
+      reinitializeOperator.OneProbabilityParameter.ActualName = OneProbabilityParameter.Name;
       //change
       reinitializeOperator.IndividualParameter.ActualName = "DecisionList";
@@ -508,6 +515,7 @@
       SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
       SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
+      SolutionsCreator.GAssistNichesProblemDataParameter.ActualName = Problem.ProblemDataParameter.Name;
       // change!
-      ((IGAssistIndividualCreator)Problem.SolutionCreatorParameter.ActualValue).DiscretizersParameter.ActualName = "Discretizers";
+      ((IGAssistSolutionCreator)Problem.SolutionCreatorParameter.ActualValue).DiscretizersParameter.ActualName = "Discretizers";
     }
     private void ParameterizeGeneticAlgorithmMainLoop() {
@@ -536,7 +544,8 @@
         selector.ParentsPerChildParameter.Value = new IntValue(2);
         ParameterizeStochasticOperator(selector);
+        ParameterizeIterationBasedOperators(selector);
       }
       if (Problem != null) {
-        foreach (INichingSingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<INichingSingleObjectiveSelector>()) {
+        foreach (INichingSingleObjectiveSelector selector in SelectorParameter.ValidValues) {
           selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
           selector.MaximizationParameter.Hidden = true;
@@ -547,4 +556,7 @@
           //change
           selector.IndividualParameter.ActualName = "DecisionList";
+        }
+        foreach (IHierarchicalSingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<IHierarchicalSingleObjectiveSelector>()) {
+          selector.LengthParameter.ActualName = Problem.Evaluator.LengthParameter.ActualName;
         }
       }
@@ -595,6 +607,8 @@
         else oldDefaultRule = null;
       }
-      if (oldDefaultRule == null && defaultdefaultRule != null)
+      if (oldDefaultRule == null && defaultdefaultRule != null) {
         DefaultRuleParameter.Value = defaultdefaultRule;
+        SolutionsCreator.NichingParameter.ActualName = defaultdefaultRule.NichingParameter.ActualName;
+      }
     }
     private void UpdateCrossovers() {
Index: branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,8 +25,18 @@
   [Plugin("HeuristicLab.Algorithms.GAssist", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Algorithms.GAssist-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
   public class HeuristicLabAlgorithmsGAssistPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/Plugin.cs.frame	(revision 9605)
@@ -24,15 +24,19 @@
 namespace HeuristicLab.Algorithms.LearningClassifierSystems {
   [Plugin("HeuristicLab.Algorithms.LearningClassifierSystems", "3.3.7.$WCREV$")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
   [PluginFile("HeuristicLab.Algorithms.LearningClassifierSystems-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
-  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
-  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
-  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
-  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
-  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
-  [PluginDependency("HeuristicLab.Problems.Instances.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
   public class HeuristicLabAlgorithmsLearningClassifierSystemsPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,14 +25,15 @@
   [Plugin("HeuristicLab.Encodings.CombinedIntegerVectorEncoding", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Encodings.CombinedIntegerVectorEncoding-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
-  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
-  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
-  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
-  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
-  [PluginDependency("HeuristicLab.Problems.Instances.Views", "3.3")]
   public class HeuristicLabEncodingsCombinedIntegerVectorEncodingPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,16 @@
   [Plugin("HeuristicLab.Encodings.ConditionActionEncoding", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Encodings.ConditionActionEncoding-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
   public class HeuristicLabEncodingsConditionActionEncodingPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs	(revision 9605)
@@ -34,4 +34,5 @@
     bool Match(IAction action);
     void SetTo(string value);
+    void SetTo(IGAssistNiche action);
 
     IEnumerable<int> GetPossibleActionPositions();
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs	(revision 9605)
@@ -117,5 +117,11 @@
 
     public void SetTo(string value) {
-      currentAction = int.Parse(value);
+      SetToPosition(int.Parse(value));
+    }
+
+    public void SetTo(IGAssistNiche action) {
+      var castAction = action as IntAction;
+      if (castAction == null) throw new ArgumentException("action has to be IntAction");
+      SetToPosition(castAction.CurrentAction);
     }
 
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs	(revision 9605)
@@ -122,5 +122,11 @@
 
     public void SetTo(string value) {
-      currentActionIndex = possibleFeatures.IndexOf(value);
+      SetToPosition(possibleFeatures.IndexOf(value));
+    }
+
+    public void SetTo(IGAssistNiche action) {
+      var castAction = action as StringAction;
+      if (castAction == null) throw new ArgumentException("action has to be IntAction");
+      SetToPosition(castAction.CurrentPosition);
     }
 
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/SmartDecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/SmartDecisionListCreator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/SmartDecisionListCreator.cs	(revision 9605)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators.LCS;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.DecisionList {
+  [Item("SmartDecisionListCreator", "Description missing")]
+  [StorableClass]
+  public class SmartDecisionListCreator : DecisionListCreator {
+
+    [StorableConstructor]
+    protected SmartDecisionListCreator(bool deserializing) : base(deserializing) { }
+    protected SmartDecisionListCreator(SmartDecisionListCreator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SmartDecisionListCreator()
+      : base() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SmartDecisionListCreator(this, cloner);
+    }
+
+    protected override DecisionList Create(IRandom random, Rule sampleRule, int initialNumberOfRules, double oneProbability, ItemCollection<IDiscretizer> discretizers, IAction niche) {
+      var problemData = ProblemDataParameter.ActualValue;
+
+      List<Rule> rules = new List<Rule>();
+      for (int i = 0; i < initialNumberOfRules; i++) {
+        rules.Add(SmartRuleInitialization(problemData, random, sampleRule, initialNumberOfRules, oneProbability, discretizers, niche));
+      }
+      if (niche != null) {
+        return new DecisionList(rules, niche);
+      } else {
+        return new DecisionList(rules);
+      }
+    }
+
+    public static Rule SmartRuleInitialization(IDecisionListClassificationProblemData problemData, IRandom random,
+                                               Rule sampleRule, int initialNumberOfRules, double oneProbability,
+                                               ItemCollection<IDiscretizer> discretizers, IAction niche = null) {
+      IList<int> trainingIndicesOfOtherNiches = null;
+      if (niche != null) {
+        trainingIndicesOfOtherNiches =
+          problemData.TrainingIndices.Where(x => !problemData.FetchAction(x).SameNiche(niche)).ToList();
+      } else {
+        trainingIndicesOfOtherNiches = problemData.TrainingIndices.ToList();
+      }
+
+      var newRule = (Rule)sampleRule.Clone();
+      newRule.Randomize(random, oneProbability, discretizers);
+
+      int sample = random.Next(trainingIndicesOfOtherNiches.Count);
+      var input = problemData.FetchInput(trainingIndicesOfOtherNiches[sample]);
+      var action = problemData.FetchAction(trainingIndicesOfOtherNiches[sample]);
+
+      newRule.SetToMatchInput(input);
+      newRule.Action.SetTo(action);
+      return newRule;
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs	(revision 9605)
@@ -43,13 +43,21 @@
     }
 
-    protected override DecisionList Create(IRandom random, Rule sampleRule, int initialNumberOfRules, double oneProbability, ItemCollection<IDiscretizer> discretizers) {
+    protected override DecisionList Create(IRandom random, Rule sampleRule, int initialNumberOfRules, double oneProbability, ItemCollection<IDiscretizer> discretizers, IAction niche) {
       List<Rule> rules = new List<Rule>();
       for (int i = 0; i < initialNumberOfRules; i++) {
         var newRule = (Rule)sampleRule.Clone();
-        newRule.Randomize(random, oneProbability, discretizers);
+        if (niche != null) {
+          newRule.Randomize(random, oneProbability, discretizers, new List<IAction>() { niche });
+        } else {
+          newRule.Randomize(random, oneProbability, discretizers);
+        }
         rules.Add(newRule);
       }
 
-      return new DecisionList(rules);
+      if (niche != null) {
+        return new DecisionList(rules, niche);
+      } else {
+        return new DecisionList(rules);
+      }
     }
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Crossover/SinglePointCrossover.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Crossover/SinglePointCrossover.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Crossover/SinglePointCrossover.cs	(revision 9605)
@@ -48,5 +48,6 @@
 
     public static DecisionList Apply(IRandom random, DecisionList parent1, DecisionList parent2) {
-      if (!parent1.DefaultAction.Match(parent2.DefaultAction)) { throw new ArgumentException("Default action of parents have to match!"); }
+      if (parent1 == null && parent1 != parent2) { throw new ArgumentException("Either both parents have a default action or none does."); }
+      if (parent1.DefaultAction != null && !parent1.DefaultAction.Match(parent2.DefaultAction)) { throw new ArgumentException("Default action of parents have to match!"); }
 
       int rulesP1 = random.Next(0, parent1.Rules.Count());
@@ -64,4 +65,7 @@
       }
 
+      if (parent1.DefaultAction == null) {
+        return new DecisionList(rules);
+      }
       return new DecisionList(rules, parent1.DefaultAction);
     }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9605)
@@ -44,4 +44,8 @@
     }
 
+    public double Length {
+      get { return 1 + rules.Sum(r => r.Length); }
+    }
+
     // default rule (action) is part of the rule set size
     public int RuleSetSize {
@@ -53,5 +57,5 @@
     protected DecisionList(DecisionList original, Cloner cloner)
       : base(original, cloner) {
-      defaultAction = original.DefaultAction;
+      defaultAction = cloner.Clone(original.DefaultAction);
       rules = new List<Rule>(original.rules.Count);
       foreach (var rule in original.Rules) {
@@ -124,19 +128,4 @@
     }
 
-    public void SetNiche(IRandom random, IGAssistNiche niche) {
-      var action = niche as IAction;
-      if (action == null) {
-        throw new ArgumentException("Niche has to be an action");
-      }
-      if (Niche != null) {
-        throw new ArgumentException("Niche has already been set. It cannot be set again.");
-      }
-      defaultAction = action;
-      var except = new List<IAction>() { action };
-      foreach (var rule in rules.Where(x => x.Action.SameNiche(niche))) {
-        rule.Action.Randomize(random, except);
-      }
-    }
-
     public void ApplySplit(IRandom random, double probability) {
       foreach (var rule in rules) {
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs	(revision 9605)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -52,4 +53,7 @@
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     }
+    public ILookupParameter<IGAssistNiche> GAssistNicheParameter {
+      get { return (ILookupParameter<IGAssistNiche>)Parameters["GAssistNiche"]; }
+    }
     #endregion
 
@@ -67,13 +71,19 @@
       Parameters.Add(new LookupParameter<DecisionList>("DecisionList", ""));
       Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
-      Parameters.Add(new ValueLookupParameter<IAction>("DefaultAction", ""));
+      Parameters.Add(new LookupParameter<IGAssistNiche>("GAssistNiche", ""));
     }
 
     public override IOperation Apply() {
-      DecisionListParameter.ActualValue = Create(RandomParameter.ActualValue, ProblemDataParameter.ActualValue.SampleRuleParameter.Value, InitialNumberOfRulesParameter.ActualValue.Value, OneProbabilityParameter.ActualValue.Value, DiscretizersParameter.ActualValue);
+      if (GAssistNicheParameter.ActualValue != null && !(GAssistNicheParameter.ActualValue is IAction)) throw new ArgumentException("GAssistNiche has to be a IAction.");
+      DecisionListParameter.ActualValue = Create(RandomParameter.ActualValue,
+                                              ProblemDataParameter.ActualValue.SampleRuleParameter.Value,
+                                              InitialNumberOfRulesParameter.ActualValue.Value,
+                                              OneProbabilityParameter.ActualValue.Value,
+                                              DiscretizersParameter.ActualValue,
+                                              (IAction)GAssistNicheParameter.ActualValue);
       return base.Apply();
     }
 
-    protected abstract DecisionList Create(IRandom random, Rule sampleRule, int initialNumberOfRules, double oneProbability, ItemCollection<IDiscretizer> discretizers);
+    protected abstract DecisionList Create(IRandom random, Rule sampleRule, int initialNumberOfRules, double oneProbability, ItemCollection<IDiscretizer> discretizers, IAction niche);
   }
 }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs	(revision 9605)
@@ -49,8 +49,14 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     }
+    public ILookupParameter<DoubleValue> LengthParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Length"]; }
+    }
     public IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter {
       get { return (IValueLookupParameter<IDecisionListClassificationProblemData>)Parameters["ProblemData"]; }
     }
 
+    public IValueLookupParameter<BoolValue> UseMDLParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["UseMDL"]; }
+    }
     public ILookupParameter<MDLCalculator> MDLCalculatorParameter {
       get { return (ILookupParameter<MDLCalculator>)Parameters["MDLCalculator"]; }
@@ -73,4 +79,7 @@
       get { return (ILookupParameter<ItemList<ItemList<IntValue>>>)Parameters["Strata"]; }
     }
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
     #endregion
 
@@ -90,5 +99,7 @@
       Parameters.Add(new ValueLookupParameter<IntValue>("SizePenaltyMinRules", ""));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", ""));
+      Parameters.Add(new LookupParameter<DoubleValue>("Length", ""));
       Parameters.Add(new ValueLookupParameter<IDecisionListClassificationProblemData>("ProblemData", ""));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("UseMDL", "", new BoolValue(true)));
       Parameters.Add(new LookupParameter<MDLCalculator>("MDLCalculator", ""));
       Parameters.Add(new LookupParameter<IntValue>("Iterations", ""));
@@ -97,4 +108,11 @@
       Parameters.Add(new ValueLookupParameter<IntValue>("RuleDeletionMinRules", "", new IntValue(12)));
       Parameters.Add(new ValueLookupParameter<ItemList<ItemList<IntValue>>>("Strata", ""));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "", new BoolValue(false)));
+
+      UseMDLParameter.Value.ValueChanged += UseMDLParameter_ValueChanged;
+    }
+
+    private void UseMDLParameter_ValueChanged(object sender, System.EventArgs e) {
+      MaximizationParameter.Value.Value = !UseMDLParameter.Value.Value;
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -103,6 +121,4 @@
 
     public override IOperation Apply() {
-      double penalty = 1;
-
       var strata = StrataParameter.ActualValue;
       int iteration = IterationsParameter.ActualValue.Value;
@@ -125,4 +141,5 @@
       var estimated = dl.Evaluate(input, out aliveRules, out theoryLength);
 
+      double penalty = 1;
       if (aliveRules.Count < SizePenaltyMinRulesParameter.ActualValue.Value) {
         penalty = (1 - 0.025 * (SizePenaltyMinRulesParameter.ActualValue.Value - aliveRules.Count));
@@ -132,5 +149,10 @@
 
       double accuracy = DecisionListSolution.CalculateAccuracy(actions, estimated);
-      QualityParameter.ActualValue = new DoubleValue(MDLCalculatorParameter.ActualValue.CalculateFitness(theoryLength, accuracy) / penalty);
+      if (UseMDLParameter.ActualValue.Value) {
+        QualityParameter.ActualValue =
+          new DoubleValue(MDLCalculatorParameter.ActualValue.CalculateFitness(theoryLength, accuracy) / penalty);
+      } else {
+        QualityParameter.ActualValue = new DoubleValue(accuracy * accuracy * penalty);
+      }
 
       if (iteration >= IterationRuleDeletionParameter.ActualValue.Value) {
@@ -141,4 +163,6 @@
         }
       }
+
+      LengthParameter.ActualValue = new DoubleValue(dl.Length * aliveRules.Count / dl.RuleSetSize);
       return base.Apply();
     }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj	(revision 9605)
@@ -93,4 +93,5 @@
     <Compile Include="Action\IntAction.cs" />
     <Compile Include="Analyzer\BestTrainingDecisionListAnalyzer.cs" />
+    <Compile Include="Creators\SmartDecisionListCreator.cs" />
     <Compile Include="Creators\UniformRandomDecisionListCreator.cs" />
     <Compile Include="Crossover\SinglePointCrossover.cs" />
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs	(revision 9605)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IDecisionListCreator : IDecisionListOperator, ISolutionCreator, IStochasticOperator, IGAssistIndividualCreator {
+  public interface IDecisionListCreator : IDecisionListOperator, ISolutionCreator, IStochasticOperator, IGAssistSolutionCreator {
     IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter { get; }
     ILookupParameter<DecisionList> DecisionListParameter { get; }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs	(revision 9605)
@@ -25,5 +25,5 @@
 
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IDecisionListEvaluator : IStrataSingleObjectiveEvaluator {
+  public interface IDecisionListEvaluator : IGAssistObjectiveEvaluator {
     ILookupParameter<DecisionList> DecisionListParameter { get; }
     IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter { get; }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Plugin.cs.frame	(revision 9605)
@@ -27,6 +27,12 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
   public class HeuristicLabEncodingsDecisionListPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9605)
@@ -43,4 +43,8 @@
     public IAction Action { get { return action; } }
 
+    public double Length {
+      get { return variables.Values.Sum(x => x.Length); }
+    }
+
     [StorableConstructor]
     protected Rule(bool deserializing) : base(deserializing) { }
@@ -77,9 +81,22 @@
     }
 
-    public void Randomize(IRandom random, double onePercentage, IEnumerable<IDiscretizer> discretizer) {
+    public void Randomize(IRandom random, double oneProbability, IEnumerable<IDiscretizer> discretizers, IEnumerable<IAction> exceptActions = null) {
       foreach (var variable in variables.Values) {
-        variable.Randomize(random, onePercentage, discretizer);
+        variable.Randomize(random, oneProbability, discretizers);
       }
-      action.Randomize(random);
+      if (exceptActions == null) {
+        action.Randomize(random);
+      } else {
+        action.Randomize(random, exceptActions);
+      }
+    }
+
+    public void SetToMatchInput(IGAssistInput input) {
+      foreach (var variable in variables) {
+        if (!input.VariableNames.Contains(variable.Key)) {
+          throw new ArgumentException("input does not contain variable name of rule");
+        }
+        variable.Value.SetToMatch(input.GetVariableValue(variable.Key));
+      }
     }
 
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs	(revision 9605)
@@ -191,5 +191,14 @@
     public override void Reinitialize(IRandom random, double onePercentage, IEnumerable<IDiscretizer> descretizers) {
       Randomize(random, onePercentage, descretizers);
-      return;
+    }
+
+    public override void SetToMatch(string variableValue) {
+      var value = double.Parse(variableValue);
+      var realCutpoints = GetValuesToCutPoints(discretizer.GetCutPoints(variableName), curIntervals);
+      int pos = 0;
+      while (value >= realCutpoints[pos]) {
+        pos++;
+      }
+      attributes[pos] = true;
     }
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IVariable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IVariable.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IVariable.cs	(revision 9605)
@@ -27,4 +27,5 @@
 namespace HeuristicLab.Encodings.DecisionList {
   public interface IVariable : IItem {
+    double Length { get; }
     string VariableName { get; }
     Type VariableType { get; }
@@ -43,4 +44,6 @@
 
     void Split(IRandom Random);
+
+    void SetToMatch(string variableValue);
   }
 }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IntVariable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IntVariable.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/IntVariable.cs	(revision 9605)
@@ -68,4 +68,11 @@
       return attributes[possibleFeatures.IndexOf(input)];
     }
+
+    public override void SetToMatch(string variableValue) {
+      var value = int.Parse(variableValue);
+      if (!possibleFeatures.Contains(value)) throw new ArgumentException("variableValue " + variableValue + " is not a possible value of variable " + variableName);
+
+      attributes[possibleFeatures.IndexOf(value)] = true;
+    }
   }
 }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/StringVariable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/StringVariable.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/StringVariable.cs	(revision 9605)
@@ -64,4 +64,11 @@
       return attributes[possibleFeatures.IndexOf(input)];
     }
+
+    public override void SetToMatch(string variableValue) {
+      var valueIndex = possibleFeatures.IndexOf(variableValue);
+      if (valueIndex == -1) throw new ArgumentException("variableValue " + variableValue + " is not a possible value of variable " + variableName);
+
+      attributes[valueIndex] = true;
+    }
   }
 }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs	(revision 9605)
@@ -38,4 +38,8 @@
     }
 
+    public double Length {
+      get { return attributes.Count; }
+    }
+
     [Storable]
     protected string variableName;
@@ -72,4 +76,6 @@
     public abstract bool Match(string input);
 
+    public abstract void SetToMatch(string variableValue);
+
     public virtual string ToFullString() { throw new NotImplementedException(); }
 
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,14 @@
   [Plugin("HeuristicLab.Encodings.VariableVector", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Encodings.VariableVector-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
   public class HeuristicLabEncodingsVariableVectorPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/AutoDefaultRule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/AutoDefaultRule.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/AutoDefaultRule.cs	(revision 9605)
@@ -0,0 +1,125 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS.DefaultRule {
+  [Item("AutoDefaultRule", "Description missing")]
+  [StorableClass]
+  public class AutoDefaultRule : DefaultRuleOperator, IStochasticOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<ItemDictionary<IGAssistNiche, ItemList<DoubleValue>>> AverageAccuraciesParameter {
+      get { return (IValueLookupParameter<ItemDictionary<IGAssistNiche, ItemList<DoubleValue>>>)Parameters["AverageAccuracies"]; }
+    }
+    public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
+      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
+    }
+    public IValueLookupParameter<IntValue> AccuraciesCountParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["AccuraciesCount"]; }
+    }
+    public IValueLookupParameter<IGAssistNicheEqualityComparer> NicheComparerParameter {
+      get { return (IValueLookupParameter<IGAssistNicheEqualityComparer>)Parameters["NicheComparer"]; }
+    }
+    public IValueLookupParameter<DoubleValue> NicheStandardDeviationParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["NicheStandardDeviation"]; }
+    }
+    #endregion
+
+    public ItemDictionary<IGAssistNiche, ItemList<DoubleValue>> AverageAccuracies { get { return AverageAccuraciesParameter.ActualValue; } }
+    public int AccuraciesCount { get { return AccuraciesCountParameter.ActualValue.Value; } }
+
+    [StorableConstructor]
+    protected AutoDefaultRule(bool deserializing) : base(deserializing) { }
+    protected AutoDefaultRule(AutoDefaultRule original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public AutoDefaultRule()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<ItemDictionary<IGAssistNiche, ItemList<DoubleValue>>>("AverageAccuracies"));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality"));
+      Parameters.Add(new LookupParameter<IRandom>("Random"));
+      Parameters.Add(new ValueLookupParameter<IntValue>("AccuraciesCount", new IntValue(15)));
+      Parameters.Add(new ValueLookupParameter<IGAssistNicheEqualityComparer>("NicheComparer"));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("NicheStandardDeviation", new DoubleValue(0.005)));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AutoDefaultRule(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (NichingParameter.ActualValue == null) {
+        IList<IGAssistNiche> niches = GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().ToList();
+        NichingParameter.ActualValue = new BoolValue(true);
+        NichesParameter.ActualValue = new IntValue(niches.Count);
+        AverageAccuraciesParameter.ActualValue = new ItemDictionary<IGAssistNiche, ItemList<DoubleValue>>(NicheComparerParameter.ActualValue as IEqualityComparer<IGAssistNiche>);
+        foreach (var niche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          AverageAccuracies.Add(niche, new ItemList<DoubleValue>(AccuraciesCount));
+        }
+      } else {
+        var nicheFitness = new Dictionary<IGAssistNiche, double>(NicheComparerParameter.ActualValue);
+        foreach (var niche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          nicheFitness[niche] = 0.0;
+          while (AverageAccuracies[niche].Count >= AccuraciesCount) {
+            AverageAccuracies[niche].RemoveAt(AverageAccuracies.Count - 1);
+          }
+        }
+
+        var qualityEnumerator = QualityParameter.ActualValue.GetEnumerator();
+        var individualEnumerator = IndividualParameter.ActualValue.GetEnumerator();
+        while (qualityEnumerator.MoveNext() && individualEnumerator.MoveNext()) {
+          if (nicheFitness[individualEnumerator.Current.Niche] < qualityEnumerator.Current.Value) {
+            nicheFitness[individualEnumerator.Current.Niche] = qualityEnumerator.Current.Value;
+          }
+        }
+
+        foreach (var niche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          AverageAccuracies[niche].Insert(0, new DoubleValue(nicheFitness[niche]));
+        }
+
+        var averages = new List<double>(GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().Count());
+        if (AverageAccuracies.Values.First().Count >= AccuraciesCount) {
+          foreach (var averageAccuracy in AverageAccuracies.Values) {
+            averages.Add(averageAccuracy.Select(x => x.Value).Average());
+          }
+          double avg = averages.Average();
+          double sum = averages.Sum(d => Math.Pow(d - avg, 2));
+          double std = Math.Sqrt(sum / averages.Count);
+
+          if (std < NicheStandardDeviationParameter.ActualValue.Value) {
+            NichingParameter.ActualValue.Value = false;
+          }
+        }
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DefaultRuleOperator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DefaultRuleOperator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DefaultRuleOperator.cs	(revision 9605)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [Item("DefaultRuleOperator", "Description missing")]
+  [StorableClass]
+  public abstract class DefaultRuleOperator : SingleSuccessorOperator, IDefaultRuleOperator {
+
+    #region Parameter Properties
+    public IValueLookupParameter<BoolValue> NichingParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Niching"]; }
+    }
+    public IValueLookupParameter<IntValue> NichesParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["Niches"]; }
+    }
+    public IValueLookupParameter<IGAssistNiche> DefaultClassParameter {
+      get { return (IValueLookupParameter<IGAssistNiche>)Parameters["DefaultClass"]; }
+    }
+    public ILookupParameter<IGAssistProblemData> GAssistNichesProblemDataParameter {
+      get { return (ILookupParameter<IGAssistProblemData>)Parameters["GAssistNichesProblemData"]; }
+    }
+    public ILookupParameter<ItemArray<IGAssistIndividual>> IndividualParameter {
+      get { return (ILookupParameter<ItemArray<IGAssistIndividual>>)Parameters["Individual"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected DefaultRuleOperator(bool deserializing) : base(deserializing) { }
+    protected DefaultRuleOperator(DefaultRuleOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public DefaultRuleOperator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Niching"));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Niches"));
+      Parameters.Add(new ValueLookupParameter<IGAssistNiche>("DefaultClass"));
+      Parameters.Add(new LookupParameter<IGAssistProblemData>("GAssistNichesProblemData"));
+      Parameters.Add(new ScopeTreeLookupParameter<IGAssistIndividual>("Individual"));
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DisabledDefaultRule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DisabledDefaultRule.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/DisabledDefaultRule.cs	(revision 9605)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [Item("DisabledDefaultRule", "Description missing")]
+  [StorableClass]
+  public class DisabledDefaultRule : DefaultRuleOperator {
+
+    [StorableConstructor]
+    protected DisabledDefaultRule(bool deserializing) : base(deserializing) { }
+    protected DisabledDefaultRule(DisabledDefaultRule original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public DisabledDefaultRule()
+      : base() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DisabledDefaultRule(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (NichingParameter.ActualValue == null) {
+        NichingParameter.ActualValue = new BoolValue(false);
+        NichesParameter.ActualValue = new IntValue(1);
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/IDefaultRuleOperator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/IDefaultRuleOperator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/IDefaultRuleOperator.cs	(revision 9605)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IDefaultRuleOperator : IOperator {
+    IValueLookupParameter<BoolValue> NichingParameter { get; }
+    IValueLookupParameter<IntValue> NichesParameter { get; }
+    IValueLookupParameter<IGAssistNiche> DefaultClassParameter { get; }
+    ILookupParameter<IGAssistProblemData> GAssistNichesProblemDataParameter { get; }
+    ILookupParameter<ItemArray<IGAssistIndividual>> IndividualParameter { get; }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MajorDefaultRule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MajorDefaultRule.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MajorDefaultRule.cs	(revision 9605)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS.DefaultRule {
+  [Item("MajorDefaultRule", "Description missing")]
+  [StorableClass]
+  public class MajorDefaultRule : DefaultRuleOperator, IStochasticOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected MajorDefaultRule(bool deserializing) : base(deserializing) { }
+    protected MajorDefaultRule(MajorDefaultRule original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public MajorDefaultRule()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random"));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MajorDefaultRule(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (NichingParameter.ActualValue == null) {
+        NichingParameter.ActualValue = new BoolValue(false);
+        NichesParameter.ActualValue = new IntValue(1);
+        var problemData = GAssistNichesProblemDataParameter.ActualValue;
+        var trainingIndices = problemData.TrainingIndices;
+        var actions = problemData.FetchAction(trainingIndices);
+
+        Dictionary<IGAssistNiche, int> classCount = new Dictionary<IGAssistNiche, int>(actions.First().Comparer);
+        foreach (var niche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          classCount[niche] = 0;
+        }
+        foreach (var action in actions) {
+          classCount[action] += 1;
+        }
+        var maxAction = classCount.MaxItems(x => x.Value).ToList();
+        var index = RandomParameter.ActualValue.Next(0, maxAction.Count);
+        DefaultClassParameter.ActualValue = maxAction[index].Key;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MinorDefaultRule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MinorDefaultRule.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/DefaultRule/MinorDefaultRule.cs	(revision 9605)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS.DefaultRule {
+  [Item("MinorDefaultRule", "Description missing")]
+  [StorableClass]
+  public class MinorDefaultRule : DefaultRuleOperator, IStochasticOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected MinorDefaultRule(bool deserializing) : base(deserializing) { }
+    protected MinorDefaultRule(MinorDefaultRule original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public MinorDefaultRule()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random"));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MinorDefaultRule(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (NichingParameter.ActualValue == null) {
+        NichingParameter.ActualValue = new BoolValue(false);
+        NichesParameter.ActualValue = new IntValue(1);
+        var problemData = GAssistNichesProblemDataParameter.ActualValue;
+        var trainingIndices = problemData.TrainingIndices;
+        var actions = problemData.FetchAction(trainingIndices);
+
+        Dictionary<IGAssistNiche, int> classCount = new Dictionary<IGAssistNiche, int>(actions.First().Comparer);
+        foreach (var niche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          classCount[niche] = 0;
+        }
+        foreach (var action in actions) {
+          classCount[action] += 1;
+        }
+        var minAction = classCount.MinItems(x => x.Value).ToList();
+        var index = RandomParameter.ActualValue.Next(0, minAction.Count);
+        DefaultClassParameter.ActualValue = minAction[index].Key;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividual.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividual.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividual.cs	(revision 9605)
@@ -25,6 +25,6 @@
 namespace HeuristicLab.Optimization.Operators.LCS {
   public interface IGAssistIndividual : IGAssistModel {
+    double Length { get; }
     IGAssistNiche Niche { get; }
-    void SetNiche(IRandom random, IGAssistNiche niche);
     void ApplySplit(IRandom random, double probability);
     void ApplyMerge(IRandom random, double probability);
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividualCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividualCreator.cs	(revision 9494)
+++ 	(revision )
@@ -1,28 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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 HeuristicLab.Core;
-
-namespace HeuristicLab.Optimization.Operators.LCS {
-  public interface IGAssistIndividualCreator : ISolutionCreator {
-    IValueLookupParameter<ItemCollection<IDiscretizer>> DiscretizersParameter { get; }
-  }
-}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistObjectiveEvaluator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistObjectiveEvaluator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistObjectiveEvaluator.cs	(revision 9605)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization.Operators.LCS.Selection;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IGAssistObjectiveEvaluator : IHierarchicalSingleObjectiveEvaluator {
+    ILookupParameter<ItemList<ItemList<IntValue>>> StrataParameter { get; }
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistProblem.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistProblem.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistProblem.cs	(revision 9605)
@@ -24,5 +24,5 @@
 namespace HeuristicLab.Optimization.Operators.LCS {
   public interface IGAssistProblem : ISingleObjectiveHeuristicOptimizationProblem, IDataAnalysisProblem {
-    new IStrataSingleObjectiveEvaluator Evaluator { get; }
+    new IGAssistObjectiveEvaluator Evaluator { get; }
     string NichingParameterName { get; }
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolutionCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolutionCreator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolutionCreator.cs	(revision 9605)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IGAssistSolutionCreator : IOperator {
+    IValueLookupParameter<ItemCollection<IDiscretizer>> DiscretizersParameter { get; }
+    ILookupParameter<IGAssistNiche> GAssistNicheParameter { get; }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/NicheSolutionCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/NicheSolutionCreator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/NicheSolutionCreator.cs	(revision 9605)
@@ -0,0 +1,138 @@
+﻿#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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  /// <summary>
+  /// An operator which creates new solutions. Evaluation of the new solutions is executed in parallel, if an engine is used which supports parallelization.
+  /// </summary>
+  [Item("NicheSolutionCreator", "")]
+  [StorableClass]
+  public sealed class NicheSolutionCreator : SingleSuccessorOperator {
+    private const string INITIALNICHEPARAMETERNAME = "InitialNiche";
+
+    public ValueLookupParameter<IntValue> NumberOfSolutionsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfSolutions"]; }
+    }
+    public ValueLookupParameter<IGAssistSolutionCreator> SolutionCreatorParameter {
+      get { return (ValueLookupParameter<IGAssistSolutionCreator>)Parameters["SolutionCreator"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public ValueLookupParameter<BoolValue> ParallelParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Parallel"]; }
+    }
+    public IValueLookupParameter<BoolValue> NichingParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Niching"]; }
+    }
+    public ILookupParameter<IGAssistProblemData> GAssistNichesProblemDataParameter {
+      get { return (ILookupParameter<IGAssistProblemData>)Parameters["GAssistNichesProblemData"]; }
+    }
+    public ILookupParameter<IGAssistNiche> DefaultClassParameter {
+      get { return (ILookupParameter<IGAssistNiche>)Parameters["DefaultClass"]; }
+    }
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+    public IntValue NumberOfSolutions {
+      get { return NumberOfSolutionsParameter.Value; }
+      set { NumberOfSolutionsParameter.Value = value; }
+    }
+
+    [StorableConstructor]
+    private NicheSolutionCreator(bool deserializing) : base(deserializing) { }
+    private NicheSolutionCreator(NicheSolutionCreator original, Cloner cloner) : base(original, cloner) { }
+    public NicheSolutionCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSolutions", "The number of solutions that should be created."));
+      Parameters.Add(new ValueLookupParameter<IGAssistSolutionCreator>("SolutionCreator", "The operator which is used to create new solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator which is used to evaluate new solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operator should be applied in parallel on all sub-scopes, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Niching", ""));
+      Parameters.Add(new LookupParameter<IGAssistProblemData>("GAssistNichesProblemData", ""));
+      Parameters.Add(new LookupParameter<IGAssistNiche>("DefaultClass"));
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey("Parallel")) Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operator should be applied in parallel on all sub-scopes, otherwise false.", new BoolValue(true))); // backwards compatibility
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NicheSolutionCreator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      int count = NumberOfSolutionsParameter.ActualValue.Value;
+      var creator = SolutionCreatorParameter.ActualValue;
+      var evaluator = EvaluatorParameter.ActualValue;
+      bool parallel = ParallelParameter.ActualValue.Value;
+
+      int current = CurrentScope.SubScopes.Count;
+      for (int i = 0; i < count; i++)
+        CurrentScope.SubScopes.Add(new Scope((current + i).ToString()));
+
+      OperationCollection niche = new OperationCollection();
+      OperationCollection creation = new OperationCollection();
+      OperationCollection evaluation = new OperationCollection() { Parallel = parallel };
+      var vcList = new List<VariableCreator>();
+      if (DefaultClassParameter.ActualValue != null) {
+        //default rule has been set beforehand
+        var vc = new VariableCreator();
+        vc.CollectedValues.Add(new ValueParameter<IGAssistNiche>(INITIALNICHEPARAMETERNAME, DefaultClassParameter.ActualValue));
+        vcList.Add(vc);
+      } else {
+        //default rule is set to auto
+        foreach (var curNiche in GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches()) {
+          var vc = new VariableCreator();
+          vc.CollectedValues.Add(new ValueParameter<IGAssistNiche>(INITIALNICHEPARAMETERNAME, curNiche));
+          vcList.Add(vc);
+        }
+      }
+      creator.GAssistNicheParameter.ActualName = INITIALNICHEPARAMETERNAME;
+      for (int i = 0; i < count; i++) {
+        //only if niching is disabled and no default class has been set, then no niche has to be created in the scope
+        if (NichingParameter.ActualValue.Value || DefaultClassParameter.ActualValue != null) {
+          niche.Add(ExecutionContext.CreateOperation(vcList[i % vcList.Count], CurrentScope.SubScopes[current + i]));
+        }
+        if (creator != null) creation.Add(ExecutionContext.CreateOperation(creator, CurrentScope.SubScopes[current + i]));
+        if (evaluator != null) evaluation.Add(ExecutionContext.CreateOperation(evaluator, CurrentScope.SubScopes[current + i]));
+      }
+      OperationCollection next = new OperationCollection();
+      next.Add(niche);
+      next.Add(creation);
+      next.Add(evaluation);
+      next.Add(base.Apply());
+      return next;
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/HeuristicLab.Optimization.Operators.LCS-3.3.csproj
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/HeuristicLab.Optimization.Operators.LCS-3.3.csproj	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/HeuristicLab.Optimization.Operators.LCS-3.3.csproj	(revision 9605)
@@ -92,5 +92,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="DefaultRule\AutoDefaultRule.cs" />
+    <Compile Include="GAssist\DefaultRule\AutoDefaultRule.cs" />
     <Compile Include="Discretizer\InitializeDiscretizersOperator.cs" />
     <Compile Include="GAssist\GAssistNicheComparer.cs" />
@@ -100,9 +100,9 @@
     <Compile Include="GAssist\Interfaces\IGAssistEnsembleProblemData.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistProblemData.cs" />
-    <Compile Include="DefaultRule\MajorDefaultRule.cs" />
-    <Compile Include="DefaultRule\DefaultRuleOperator.cs" />
-    <Compile Include="DefaultRule\DisabledDefaultRule.cs" />
-    <Compile Include="DefaultRule\IDefaultRuleOperator.cs" />
-    <Compile Include="DefaultRule\MinorDefaultRule.cs" />
+    <Compile Include="GAssist\DefaultRule\MajorDefaultRule.cs" />
+    <Compile Include="GAssist\DefaultRule\DefaultRuleOperator.cs" />
+    <Compile Include="GAssist\DefaultRule\DisabledDefaultRule.cs" />
+    <Compile Include="GAssist\DefaultRule\IDefaultRuleOperator.cs" />
+    <Compile Include="GAssist\DefaultRule\MinorDefaultRule.cs" />
     <Compile Include="Discretizer\UniformWidthDiscretizer.cs" />
     <Compile Include="Discretizer\IDiscretizer.cs" />
@@ -112,5 +112,4 @@
     <Compile Include="GAssist\Interfaces\IGAssistEnsembleSolution.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistIndividual.cs" />
-    <Compile Include="GAssist\Interfaces\IGAssistIndividualCreator.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistInput.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistModel.cs" />
@@ -118,9 +117,11 @@
     <Compile Include="GAssist\Interfaces\IGAssistNicheEqualityComparer.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistSolution.cs" />
+    <Compile Include="GAssist\Interfaces\IGAssistSolutionCreator.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistSpecialStage.cs" />
-    <Compile Include="GAssist\Interfaces\IStrataSingleObjectiveEvaluator.cs" />
+    <Compile Include="GAssist\Interfaces\IGAssistObjectiveEvaluator.cs" />
     <Compile Include="GAssist\MDL\IMDLCalculatorBasedOperator.cs" />
     <Compile Include="GAssist\MDL\MDLCalculator.cs" />
     <Compile Include="GAssist\MDL\MDLIterationOperator.cs" />
+    <Compile Include="GAssist\NicheSolutionCreator.cs" />
     <Compile Include="GAssist\SpecialStage\GAssistSpecialStageMultiOperator.cs" />
     <Compile Include="GAssist\SpecialStage\GAssistSpecialStageOperator.cs" />
@@ -129,4 +130,6 @@
     <Compile Include="GAssist\SpecialStage\SplitOperator.cs" />
     <Compile Include="Plugin.cs" />
+    <Compile Include="Selection\IHierarchicalSingleObjectiveEvaluator.cs" />
+    <Compile Include="Selection\IHierarchicalSingleObjectiveSelector.cs" />
     <Compile Include="Selection\INichingSingleObjectiveSelector.cs" />
     <Compile Include="Selection\NichingTournamentSelector.cs" />
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,15 @@
   [Plugin("HeuristicLab.Optimization.Operators.LCS", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Optimization.Operators.LCS-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
   public class HeuristicLabOptimizationOperatorsLCSPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveEvaluator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveEvaluator.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveEvaluator.cs	(revision 9605)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization.Operators.LCS.Selection {
+  public interface IHierarchicalSingleObjectiveEvaluator : ISingleObjectiveEvaluator {
+    ILookupParameter<DoubleValue> LengthParameter { get; }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveSelector.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveSelector.cs	(revision 9605)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/IHierarchicalSingleObjectiveSelector.cs	(revision 9605)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IHierarchicalSingleObjectiveSelector : ISingleObjectiveSelector, IIterationBasedOperator {
+    ILookupParameter<ItemArray<DoubleValue>> LengthParameter { get; }
+    IValueLookupParameter<DoubleValue> LengthThresholdParameter { get; }
+    IValueLookupParameter<IntValue> IterationHirachicalSelectionParameter { get; }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs	(revision 9605)
@@ -33,5 +33,5 @@
   [Item("NichingTournamentSelector", "Description missing")]
   [StorableClass]
-  public class NichingTournamentSelector : StochasticSingleObjectiveSelector, INichingSingleObjectiveSelector {
+  public class NichingTournamentSelector : StochasticSingleObjectiveSelector, INichingSingleObjectiveSelector, IHierarchicalSingleObjectiveSelector {
 
     #region Parameter Properties
@@ -50,4 +50,20 @@
     public ILookupParameter<ItemArray<IGAssistIndividual>> IndividualParameter {
       get { return (ILookupParameter<ItemArray<IGAssistIndividual>>)Parameters["Individual"]; }
+    }
+    public ILookupParameter<ItemArray<DoubleValue>> LengthParameter {
+      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Length"]; }
+    }
+    public IValueLookupParameter<DoubleValue> LengthThresholdParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters["LengthThreshold"]; }
+    }
+    public IValueLookupParameter<IntValue> IterationHirachicalSelectionParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["IterationHirachicalSelection"]; }
+    }
+
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
     }
     #endregion
@@ -65,4 +81,9 @@
       Parameters.Add(new ValueLookupParameter<IntValue>("ParentsPerChild", ""));
       Parameters.Add(new ScopeTreeLookupParameter<IGAssistIndividual>("Individual", ""));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Length", "The length value contained in each sub-scope which is used for selection."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("LengthThreshold", "", new DoubleValue(0.000001)));
+      Parameters.Add(new ValueLookupParameter<IntValue>("IterationHirachicalSelection", "", new IntValue(24)));
+      Parameters.Add(new LookupParameter<IntValue>("Iterations", ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", ""));
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -76,4 +97,7 @@
       bool maximization = MaximizationParameter.ActualValue.Value;
       List<double> qualities = QualityParameter.ActualValue.Where(x => IsValidQuality(x.Value)).Select(x => x.Value).ToList();
+      List<double> lengths = LengthParameter.ActualValue.Select(x => x.Value).ToList();
+      bool useLength = lengths.Count > 0;
+      double lengtThreshold = LengthThresholdParameter.ActualValue.Value;
       List<IGAssistIndividual> individuals = IndividualParameter.ActualValue.ToList();
       int groupSize = GroupSizeParameter.ActualValue.Value;
@@ -83,65 +107,107 @@
       //check if list with indexes is as long as the original scope list
       //otherwise invalid quality values were filtered
-      if (qualities.Count != scopes.Count || individuals.Count != scopes.Count) {
+      if (qualities.Count != scopes.Count || individuals.Count != scopes.Count || (useLength && lengths.Count != scopes.Count)) {
         throw new ArgumentException("The scopes contain invalid quality values (either infinity or double.NaN) on which the selector cannot operate.");
       }
 
       int parentsPerChild = ParentsPerChildParameter.ActualValue.Value;
-      var nicheComparer = GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().First().Comparer;
-      var selectPerNiche = new Dictionary<IGAssistNiche, int>(nicheComparer);
-      var nicheScope = new Dictionary<IGAssistNiche, List<int>>(nicheComparer);
-
-      for (int i = 0; i < individuals.Count; i++) {
-        if (!nicheScope.ContainsKey(individuals[i].Niche)) {
-          nicheScope.Add(individuals[i].Niche, new List<int>());
-        }
-        nicheScope[individuals[i].Niche].Add(i);
-      }
-
-      var possibleNiches = nicheScope.Keys.ToList();
-      foreach (var niche in possibleNiches) {
-        selectPerNiche.Add(niche, count / possibleNiches.Count);
-      }
-
-      int curCount = 0;
-      while (curCount < count) {
-        IGAssistNiche niche = null;
-        int best = -1;
-        if (doNiching) {
-          niche = GetNiche(random, selectPerNiche, possibleNiches);
-        } else {
-          best = random.Next(scopes.Count);
-        }
-        for (int i = 0; i < parentsPerChild; i++) {
+
+      if (individuals.Any(x => x.Niche == null) && individuals.Any(x => x.Niche != null)) {
+        throw new ArgumentException("Either all individuals have a default action or none.");
+      }
+
+      //null cannot be a key in a dictionary (nicheScope), therefore torunament selection has to be done differently
+      //to keep it a little maintainable, the case that no default rule is used has been separated
+      if (individuals.Any(x => x.Niche == null)) {
+        //normal tournament selection
+        for (int i = 0; i < count; i++) {
+          int best = random.Next(scopes.Count);
           int index;
-          if (doNiching) {
-            best = nicheScope[niche][random.Next(nicheScope[niche].Count)];
-          }
           for (int j = 1; j < groupSize; j++) {
-            if (niche != null) {
-              index = nicheScope[niche][random.Next(nicheScope[niche].Count)];
-            } else {
-              index = random.Next(scopes.Count);
-            }
-            if (((maximization) && (qualities[index] > qualities[best])) ||
-                ((!maximization) && (qualities[index] < qualities[best]))) {
+            index = random.Next(scopes.Count);
+            if (IsBetterHirachical(index, best, qualities, lengths, lengtThreshold, useLength, maximization)) {
               best = index;
             }
           }
 
-          niche = individuals[best].Niche;
-
           if (copy)
-            selected[curCount] = (IScope)scopes[best].Clone();
+            selected[i] = (IScope)scopes[best].Clone();
           else {
-            selected[curCount] = scopes[best];
+            selected[i] = scopes[best];
             scopes.RemoveAt(best);
             qualities.RemoveAt(best);
           }
-          selectPerNiche[niche]--;
-          curCount++;
+        }
+      } else {
+        var nicheComparer = GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().First().Comparer;
+        var selectPerNiche = new Dictionary<IGAssistNiche, int>(nicheComparer);
+        var nicheScope = new Dictionary<IGAssistNiche, List<int>>(nicheComparer);
+        //niching tournament selection
+        for (int i = 0; i < individuals.Count; i++) {
+          if (!nicheScope.ContainsKey(individuals[i].Niche)) {
+            nicheScope.Add(individuals[i].Niche, new List<int>());
+          }
+          nicheScope[individuals[i].Niche].Add(i);
+        }
+
+        var possibleNiches = nicheScope.Keys.ToList();
+        foreach (var niche in possibleNiches) {
+          selectPerNiche.Add(niche, count / possibleNiches.Count);
+        }
+
+        int curCount = 0;
+        while (curCount < count) {
+          IGAssistNiche niche = null;
+          int best = -1;
+          if (doNiching) {
+            niche = GetNiche(random, selectPerNiche, possibleNiches);
+          } else {
+            best = random.Next(scopes.Count);
+          }
+          for (int i = 0; i < parentsPerChild; i++) {
+            int index;
+            if (doNiching) {
+              best = nicheScope[niche][random.Next(nicheScope[niche].Count)];
+            }
+            for (int j = 1; j < groupSize; j++) {
+              if (niche != null) {
+                index = nicheScope[niche][random.Next(nicheScope[niche].Count)];
+              } else {
+                index = random.Next(scopes.Count);
+              }
+              if (IsBetterHirachical(index, best, qualities, lengths, lengtThreshold, useLength, maximization)) {
+                best = index;
+              }
+            }
+
+            niche = individuals[best].Niche;
+
+            if (copy)
+              selected[curCount] = (IScope)scopes[best].Clone();
+            else {
+              selected[curCount] = scopes[best];
+              scopes.RemoveAt(best);
+              qualities.RemoveAt(best);
+            }
+            selectPerNiche[niche]--;
+            curCount++;
+          }
         }
       }
       return selected;
+    }
+
+    private bool IsBetterHirachical(int indexTrue, int indexFalse, IList<double> qualities, IList<double> length, double hierarchicalThreshold, bool useLength, bool maximization) {
+      if (useLength && IterationsParameter.ActualValue.Value >= IterationHirachicalSelectionParameter.ActualValue.Value
+        && Math.Abs(qualities[indexTrue] - qualities[indexFalse]) <= hierarchicalThreshold
+        && length[indexTrue] != length[indexFalse]) {
+        return length[indexTrue] < length[indexFalse];
+      }
+      return IsBetter(indexTrue, indexFalse, qualities, maximization);
+    }
+
+    private bool IsBetter(int indexTrue, int indexFalse, IList<double> qualities, bool maximization) {
+      return ((maximization) && (qualities[indexTrue] > qualities[indexFalse])) ||
+             ((!maximization) && (qualities[indexTrue] < qualities[indexFalse]));
     }
 
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.CombinedIntegerVectorClassification/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.CombinedIntegerVectorClassification/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.CombinedIntegerVectorClassification/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,15 @@
   [Plugin("HeuristicLab.Problems.CombinedIntegerVectorClassification", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.CombinedIntegerVectorClassification-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.CombinedIntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.ConditionActionClassification", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
   public class HeuristicLabProblemsCombinedIntegerVectorClassificationPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,14 @@
   [Plugin("HeuristicLab.Problems.ConditionActionClassification", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.ConditionActionClassification-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
   public class HeuristicLabProblemsConditionActionClassificationPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs	(revision 9605)
@@ -44,6 +44,6 @@
 
     #region parameter properties
-    public IFixedValueParameter<BoolValue> MaximizationParameter {
-      get { return (IFixedValueParameter<BoolValue>)Parameters["Maximization"]; }
+    public FixedValueParameter<BoolValue> MaximizationParameter {
+      get { return (FixedValueParameter<BoolValue>)Parameters["Maximization"]; }
     }
     IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
@@ -85,5 +85,5 @@
     }
 
-    IStrataSingleObjectiveEvaluator IGAssistProblem.Evaluator {
+    IGAssistObjectiveEvaluator IGAssistProblem.Evaluator {
       get { return Evaluator; }
     }
@@ -108,5 +108,5 @@
       : this(new DecisionListClassificationProblemData(new Dataset(DecisionListClassificationProblemData.defaultVariableNames, DecisionListClassificationProblemData.defaultData),
         DecisionListClassificationProblemData.defaultVariableNames.Take(DecisionListClassificationProblemData.defaultVariableNames.Length - 1), DecisionListClassificationProblemData.defaultVariableNames.Last()),
-        new MDLEvaluator(), new UniformRandomDecisionListCreator()) { }
+        new MDLEvaluator(), new SmartDecisionListCreator()) { }
 
     public DecisionListClassificationProblem(IDecisionListClassificationProblemData problemData, IDecisionListEvaluator decisionlistEvaluator, IDecisionListCreator decisionListCreator)
@@ -118,7 +118,13 @@
       Parameters.Add(new FixedValueParameter<PercentValue>("ActionMutationProbability", "", new PercentValue(0.1)));
 
+      MaximizationParameter.Value.Value = Evaluator.MaximizationParameter.Value.Value;
+      Evaluator.MaximizationParameter.Value.ValueChanged += MaximizationParameter_ValueChanged;
       Evaluator.SizePenaltyMinRulesParameter.ActualName = "SizePenaltyMinRules";
 
       InitializeOperators();
+    }
+
+    private void MaximizationParameter_ValueChanged(object sender, System.EventArgs e) {
+      MaximizationParameter.Value.Value = Evaluator.MaximizationParameter.Value.Value;
     }
 
@@ -143,5 +149,5 @@
 
     private void ParameterizeOperators() {
-      var autoDefaultRule = Operators.Where(x => x is AutoDefaultRule).Select(x => x as AutoDefaultRule).First();
+      var autoDefaultRule = Operators.OfType<AutoDefaultRule>().First();
       autoDefaultRule.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
       autoDefaultRule.GAssistNichesProblemDataParameter.ActualName = ProblemDataParameter.Name;
@@ -149,5 +155,4 @@
       foreach (IDefaultRuleOperator op in Operators.OfType<IDefaultRuleOperator>()) {
         op.IndividualParameter.ActualName = SolutionCreator.DecisionListParameter.ActualName;
-        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
         op.GAssistNichesProblemDataParameter.ActualName = ProblemDataParameter.Name;
         op.GAssistNichesProblemDataParameter.Hidden = true;
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs	(revision 9605)
@@ -44,4 +44,8 @@
       {0,1,1,1,0,0,0},
       {0,0,1,0,0,0,1},
+      {1,0,1,0,1,1,0},
+      {0,0,1,1,0,0,0},
+      {0,1,1,1,0,0,0},
+      {0,0,1,0,0,0,1},
       {1,0,1,0,1,1,0}
     };
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/HeuristicLab.Problems.DecisionListClassification-3.3.csproj	(revision 9605)
@@ -95,8 +95,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Algorithms.GAssist\3.3\HeuristicLab.Algorithms.GAssist-3.3.csproj">
-      <Project>{f191a6fa-1b3c-4f82-a711-873b4d839bc0}</Project>
-      <Name>HeuristicLab.Algorithms.GAssist-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,5 +25,15 @@
   [Plugin("HeuristicLab.Problems.DecisionListClassification", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.DecisionListClassification-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.DecisionList", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators.LCS", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
   public class HeuristicLabProblemsDecisionListClassificationPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.Instances.LCS/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.Instances.LCS/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.Instances.LCS/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,5 +25,11 @@
   [Plugin("HeuristicLab.Problems.Instances.LCS", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.Instances.LCS-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.CombinedIntegerVectorClassification", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DecisionListClassification", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.VariableVectorClassification", "3.3")]
   public class HeuristicLabProblemsInstancesLCSPlugin : PluginBase {
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.LCS.Views/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.LCS.Views/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.LCS.Views/3.3/Plugin.cs.frame	(revision 9605)
@@ -27,8 +27,7 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
-  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
   [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.DecisionList", "3.3")]
   [PluginDependency("HeuristicLab.MainForm", "3.3")]
   [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
Index: branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/Plugin.cs.frame
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/Plugin.cs.frame	(revision 9494)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/Plugin.cs.frame	(revision 9605)
@@ -25,6 +25,15 @@
   [Plugin("HeuristicLab.Problems.VariableVectorClassification", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.VariableVectorClassification-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.ConditionActionEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.VariableVector", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.ConditionActionClassification", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
   public class HeuristicLabProblemsVariableVectorClassificationPlugin : PluginBase {
   }
