Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IAction.cs	(revision 9352)
@@ -22,11 +22,13 @@
 using System.Collections.Generic;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators.LCS;
 
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IAction : IItem {
+  public interface IAction : IGAssistNiche {
     string VariableName { get; }
 
     int Possibilities { get; }
     void Randomize(IRandom random);
+    void Randomize(IRandom random, IEnumerable<IAction> except);
 
     bool Match(IAction action);
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/IntAction.cs	(revision 9352)
@@ -25,4 +25,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators.LCS;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -31,4 +32,11 @@
   [Item("IntAction", "")]
   public class IntAction : Item, IAction<int> {
+
+    public static IEqualityComparer<IGAssistNiche> Comparer {
+      get { return new DecisionListNicheComparer(); }
+    }
+    IEqualityComparer<IGAssistNiche> IGAssistNiche.Comparer {
+      get { return Comparer; }
+    }
 
     [Storable]
@@ -88,4 +96,19 @@
     }
 
+    public void Randomize(IRandom random, IEnumerable<IAction> except) {
+      if (except.Count() == 0) {
+        Randomize(random);
+        return;
+      }
+      try {
+        var exceptInt = except.Cast<IntAction>().Select(x => x.currentAction);
+        var newPossibleFeatures = possibleFeatures.Except(exceptInt);
+        currentAction = newPossibleFeatures.ElementAt(random.Next(0, newPossibleFeatures.Count()));
+      }
+      catch (InvalidCastException) {
+        throw new InvalidCastException("Actions have to be of type IntAction");
+      }
+    }
+
     public bool Match(IAction action) {
       var targetCast = action as IntAction;
@@ -103,5 +126,19 @@
 
     public override string ToString() {
-      return currentAction.ToString();
+      return variableName + ": " + currentAction.ToString();
+    }
+
+    public bool SameNiche(IGAssistNiche niche) {
+      return Match(niche as IAction);
+    }
+
+    public int GetNicheHashCode() {
+      int result = 1;
+      result = 37 * result + currentAction;
+      result = 37 * result + variableName.GetHashCode();
+      foreach (var feature in possibleFeatures) {
+        result = 37 * result + feature;
+      }
+      return result;
     }
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Action/StringAction.cs	(revision 9352)
@@ -25,4 +25,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators.LCS;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -31,4 +32,12 @@
   [Item("StringAction", "")]
   public class StringAction : Item, IAction<string> {
+
+    public static IEqualityComparer<IGAssistNiche> Comparer {
+      get { return new DecisionListNicheComparer(); }
+    }
+
+    IEqualityComparer<IGAssistNiche> IGAssistNiche.Comparer {
+      get { return Comparer; }
+    }
 
     [Storable]
@@ -92,4 +101,19 @@
     }
 
+    public void Randomize(IRandom random, IEnumerable<IAction> except) {
+      if (except.Count() == 0) {
+        Randomize(random);
+        return;
+      }
+      try {
+        var exceptInt = except.Cast<StringAction>().Select(x => x.CurrentActionIndex);
+        var newPossibleFeatures = Enumerable.Range(0, possibleFeatures.Count()).Except(exceptInt);
+        currentActionIndex = newPossibleFeatures.ElementAt(random.Next(0, newPossibleFeatures.Count()));
+      }
+      catch (InvalidCastException) {
+        throw new InvalidCastException("Actions have to be of type IntAction");
+      }
+    }
+
     public bool Match(IAction action) {
       var targetCast = action as StringAction;
@@ -107,5 +131,19 @@
 
     public override string ToString() {
-      return CurrentAction;
+      return variableName + ": " + CurrentAction;
+    }
+
+    public bool SameNiche(IGAssistNiche niche) {
+      return Match(niche as IAction);
+    }
+
+    public int GetNicheHashCode() {
+      int result = 1;
+      result = 37 * result + currentActionIndex;
+      result = 37 * result + variableName.GetHashCode();
+      foreach (var feature in possibleFeatures) {
+        result = 37 * result + feature.GetHashCode();
+      }
+      return result;
     }
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Analyzer/BestTrainingDecisionListAnalyzer.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Analyzer/BestTrainingDecisionListAnalyzer.cs	(revision 9352)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Analyzer/BestTrainingDecisionListAnalyzer.cs	(revision 9352)
@@ -0,0 +1,104 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators.LCS;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.DecisionList {
+  [Item("BestTrainingDecisionListAnalyzer", "Description missing")]
+  [StorableClass]
+  public class BestTrainingDecisionListAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string BestTrainingSolutionName = "Best Training Solution";
+    private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
+
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+
+    #region Parameter Properties
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    public ScopeTreeLookupParameter<IGAssistIndividual> IndividualParameter {
+      get { return (ScopeTreeLookupParameter<IGAssistIndividual>)Parameters["Individual"]; }
+    }
+    public LookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter {
+      get { return (LookupParameter<IDecisionListClassificationProblemData>)Parameters["ProblemData"]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    public ResultCollection Results { get { return ResultsParameter.ActualValue; } }
+
+    [StorableConstructor]
+    protected BestTrainingDecisionListAnalyzer(bool deserializing) : base(deserializing) { }
+    protected BestTrainingDecisionListAnalyzer(BestTrainingDecisionListAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public BestTrainingDecisionListAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<IGAssistIndividual>("Individual", ""));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the solution should be stored."));
+      Parameters.Add(new LookupParameter<IDecisionListClassificationProblemData>("ProblemData", ""));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the trees that should be analyzed."));
+      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "The direction of optimization."));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestTrainingDecisionListAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemArray<IGAssistIndividual> individuals = IndividualParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      bool maximization = MaximizationParameter.ActualValue.Value;
+      IDecisionListClassificationProblemData problemData = ProblemDataParameter.ActualValue;
+
+      DoubleValue value = maximization ? qualities.MaxItems(x => x.Value).First() : qualities.MinItems(x => x.Value).First();
+
+      int index = qualities.IndexOf(value);
+
+      if (!Results.ContainsKey(BestTrainingSolutionName)) {
+        Results.Add(new Result(TrainingBestSolutionQualityParameterName, new DoubleValue(value.Value)));
+        Results.Add(new Result(BestTrainingSolutionName, new DecisionListSolution((DecisionList)individuals[index], problemData)));
+      } else {
+        double oldBestQuality = ((DoubleValue)Results[TrainingBestSolutionQualityParameterName].Value).Value;
+        if (maximization && oldBestQuality < value.Value || !maximization && oldBestQuality > value.Value) {
+          Results[BestTrainingSolutionName].Value = new DecisionListSolution((DecisionList)individuals[index], problemData);
+          Results[TrainingBestSolutionQualityParameterName].Value = value;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Creators/UniformRandomDecisionListCreator.cs	(revision 9352)
@@ -51,5 +51,5 @@
       }
 
-      return new DecisionList(rules); //, DefaultActionParameter.ActualValue);
+      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 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Crossover/SinglePointCrossover.cs	(revision 9352)
@@ -48,4 +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!"); }
+
       int rulesP1 = random.Next(0, parent1.Rules.Count());
       int rulesP2 = random.Next(0, parent2.Rules.Count());
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9352)
@@ -109,4 +109,23 @@
     #region IGAssistIndividual Members
 
+    public IGAssistNiche Niche {
+      get { return defaultAction; }
+    }
+
+    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) {
@@ -126,5 +145,4 @@
       }
     }
-
     #endregion
   }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListCreator.cs	(revision 9352)
@@ -52,7 +52,4 @@
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     }
-    public IValueLookupParameter<IAction> DefaultActionParameter {
-      get { return (IValueLookupParameter<IAction>)Parameters["DefaultAction"]; }
-    }
     #endregion
 
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListNicheComparer.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListNicheComparer.cs	(revision 9352)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListNicheComparer.cs	(revision 9352)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Optimization.Operators.LCS;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.DecisionList {
+  [StorableClass]
+  [Item("DecisionListNicheComparer", "")]
+  public class DecisionListNicheComparer : Item, IGAssistNicheEqualityComparer {
+
+    [StorableConstructor]
+    protected DecisionListNicheComparer(bool deserializing) : base(deserializing) { }
+    protected DecisionListNicheComparer(DecisionListNicheComparer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DecisionListNicheComparer(this, cloner);
+    }
+    public DecisionListNicheComparer() : base() { }
+
+    public bool Equals(IGAssistNiche x, IGAssistNiche y) {
+      return x.SameNiche(y);
+    }
+
+    public int GetHashCode(IGAssistNiche obj) {
+      return obj.GetNicheHashCode();
+    }
+  }
+}
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 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj	(revision 9352)
@@ -92,4 +92,5 @@
     <Compile Include="Action\IAction.cs" />
     <Compile Include="Action\IntAction.cs" />
+    <Compile Include="Analyzer\BestTrainingDecisionListAnalyzer.cs" />
     <Compile Include="Creators\UniformRandomDecisionListCreator.cs" />
     <Compile Include="Crossover\SinglePointCrossover.cs" />
@@ -97,4 +98,5 @@
     <Compile Include="DecisionListCrossover.cs" />
     <Compile Include="DecisionListManipulator.cs" />
+    <Compile Include="DecisionListNicheComparer.cs" />
     <Compile Include="DecisionListSolution.cs" />
     <Compile Include="Evaluator\DecisionListEvaluator.cs" />
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs	(revision 9352)
@@ -24,8 +24,9 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization.Operators.LCS;
 using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IDecisionListClassificationProblemData : INamedItem {
+  public interface IDecisionListClassificationProblemData : IGAssistNichesProblemData {
     Dataset Dataset { get; }
     ICheckedItemList<StringValue> ConditionVariables { get; }
@@ -45,5 +46,5 @@
     int Classes { get; }
 
-    IFixedValueParameter<Rule> SampleRuleParameter { get; }
+    IValueParameter<Rule> SampleRuleParameter { get; }
 
     DecisionListInput FetchInput(int row);
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListCreator.cs	(revision 9352)
@@ -31,5 +31,4 @@
     IValueLookupParameter<IntValue> InitialNumberOfRulesParameter { get; }
     IValueLookupParameter<PercentValue> OneProbabilityParameter { get; }
-    IValueLookupParameter<IAction> DefaultActionParameter { get; }
   }
 }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs	(revision 9352)
@@ -21,4 +21,5 @@
 
 using System.Reflection;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -54,3 +55,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.7.9204")]
+[assembly: AssemblyFileVersion("3.3.7.9342")]
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9352)
@@ -73,5 +73,5 @@
         sb.Append(variable.Value + "|");
       }
-      sb.Append(Action);
+      sb.Append("|" + Action);
       return sb.ToString();
     }
Index: branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs	(revision 9342)
+++ branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/Variable.cs	(revision 9352)
@@ -76,4 +76,5 @@
     public override string ToString() {
       StringBuilder sb = new StringBuilder();
+      sb.Append(variableName + ": ");
       foreach (var attr in attributes) {
         if (attr) {
