Index: /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssist.cs	(revision 9392)
@@ -65,4 +65,7 @@
       get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
     }
+    public ValueParameter<MDLIterationOperator> MDLIterationOperatorParameter {
+      get { return (ValueParameter<MDLIterationOperator>)Parameters["MDLIterationOperator"]; }
+    }
     public IConstrainedValueParameter<IDefaultRuleOperator> DefaultRuleParameter {
       get { return (IConstrainedValueParameter<IDefaultRuleOperator>)Parameters["DefaultRule"]; }
@@ -121,4 +124,19 @@
     private ValueParameter<ItemCollection<IDiscretizer>> DiscretizersParameter {
       get { return (ValueParameter<ItemCollection<IDiscretizer>>)Parameters["Discretizers"]; }
+    }
+    public ValueParameter<IntValue> MDLActivationIterationParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MDLActivationIteration"]; }
+    }
+    public ValueParameter<DoubleValue> InitialTheoryLengthRatioParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["InitialTheoryLengthRatio"]; }
+    }
+    public ValueParameter<DoubleValue> WeightRelaxFactorParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["WeightRelaxFactor"]; }
+    }
+    public ValueParameter<IntValue> WeightAdaptionIterationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["WeightAdaptionIterations"]; }
+    }
+    public ValueParameter<IntValue> NumberOfStrataParameter {
+      get { return (ValueParameter<IntValue>)Parameters["NumberOfStrata"]; }
     }
     #endregion
@@ -180,6 +198,18 @@
       get { return (RandomCreator)OperatorGraph.InitialOperator; }
     }
+    private VariableCreator VariableCreator {
+      get { return (VariableCreator)RandomCreator.Successor; }
+    }
+    private Placeholder MDLIterationPlaceholder {
+      get { return (Placeholder)VariableCreator.Successor; }
+    }
+    private ILASOperator ILASOperator {
+      get { return (ILASOperator)MDLIterationPlaceholder.Successor; }
+    }
+    private InitializeDiscretizersOperator InitializeDiscretizers {
+      get { return (InitializeDiscretizersOperator)ILASOperator.Successor; }
+    }
     private SolutionsCreator SolutionsCreator {
-      get { return (SolutionsCreator)RandomCreator.Successor; }
+      get { return (SolutionsCreator)InitializeDiscretizers.Successor; }
     }
     private GAssistMainLoop GeneticAlgorithmMainLoop {
@@ -204,16 +234,28 @@
       Parameters.Add(new ValueParameter<GAssistSpecialStageMultiOperator>("SpecialStages", "", new GAssistSpecialStageMultiOperator()));
       Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.", new IntValue(1000)));
-      Parameters.Add(new FixedValueParameter<PercentValue>("SplitProbability", "", new PercentValue(0.05)));
-      Parameters.Add(new FixedValueParameter<PercentValue>("MergeProbability", "", new PercentValue(0.05)));
-      Parameters.Add(new FixedValueParameter<PercentValue>("StartReinitializeProbability", "", new PercentValue(0.05)));
-      Parameters.Add(new FixedValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue(Double.Epsilon)));
-      Parameters.Add(new FixedValueParameter<PercentValue>("OneProbability", "", new PercentValue(0.75)));
-      Parameters.Add(new FixedValueParameter<IntValue>("MaximumNumberOfIntervals", "", new IntValue(5)));
-      Parameters.Add(new FixedValueParameter<IntValue>("InitialNumberOfRules", "", new IntValue(20)));
+      Parameters.Add(new ValueParameter<PercentValue>("SplitProbability", "", new PercentValue(0.05)));
+      Parameters.Add(new ValueParameter<PercentValue>("MergeProbability", "", new PercentValue(0.05)));
+      Parameters.Add(new ValueParameter<PercentValue>("StartReinitializeProbability", "", new PercentValue(0.05)));
+      Parameters.Add(new ValueParameter<PercentValue>("EndReinitializeProbability", "", new PercentValue(Double.Epsilon)));
+      Parameters.Add(new ValueParameter<PercentValue>("OneProbability", "", new PercentValue(0.75)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumNumberOfIntervals", "", new IntValue(5)));
+      Parameters.Add(new ValueParameter<IntValue>("InitialNumberOfRules", "", new IntValue(20)));
+      Parameters.Add(new ValueParameter<MDLIterationOperator>("MDLIterationOperator", "", new MDLIterationOperator()));
       Parameters.Add(new ConstrainedValueParameter<IDefaultRuleOperator>("DefaultRule", ""));
       Parameters.Add(new ConstrainedValueParameter<IDiscreteDoubleValueModifier>("ReinitializeCurveOperator", ""));
       Parameters.Add(new ValueParameter<ItemCollection<IDiscretizer>>("Discretizers", "", new ItemCollection<IDiscretizer>()));
 
+      Parameters.Add(new ValueParameter<IntValue>("MDLActivationIteration", "", new IntValue(25)));
+      Parameters.Add(new ValueParameter<DoubleValue>("InitialTheoryLengthRatio", "", new DoubleValue(0.075)));
+      Parameters.Add(new ValueParameter<DoubleValue>("WeightRelaxFactor", "", new DoubleValue(0.9)));
+      Parameters.Add(new ValueParameter<IntValue>("WeightAdaptionIterations", "", new IntValue(10)));
+
+      Parameters.Add(new ValueParameter<IntValue>("NumberOfStrata", "", new IntValue(2)));
+
       RandomCreator randomCreator = new RandomCreator();
+      VariableCreator variableCreator = new VariableCreator();
+      Placeholder mdlIterationPlaceholder = new Placeholder();
+      ILASOperator ilasOperator = new ILASOperator();
+      InitializeDiscretizersOperator initializeDiscretizers = new InitializeDiscretizersOperator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
       SubScopesCounter subScopesCounter = new SubScopesCounter();
@@ -227,5 +269,19 @@
       randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
       randomCreator.SetSeedRandomlyParameter.Value = null;
-      randomCreator.Successor = solutionsCreator;
+      randomCreator.Successor = variableCreator;
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class GAssistMainLoop expects this to be called Generations
+      variableCreator.Successor = mdlIterationPlaceholder;
+
+      mdlIterationPlaceholder.Name = "MDL Iteration Operator";
+      mdlIterationPlaceholder.OperatorParameter.ActualName = MDLIterationOperatorParameter.Name;
+      mdlIterationPlaceholder.Successor = ilasOperator;
+
+      ilasOperator.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName;
+      ilasOperator.NumberOfStrataParameter.ActualName = NumberOfStrataParameter.Name;
+      ilasOperator.Successor = initializeDiscretizers;
+
+      initializeDiscretizers.DiscretizersParameter.ActualName = DiscretizersParameter.Name;
+      initializeDiscretizers.Successor = solutionsCreator;
 
       solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
@@ -240,4 +296,5 @@
       resultsCollector.Successor = mainLoop;
 
+      mainLoop.MDLIterationParameter.ActualName = MDLIterationOperatorParameter.Name;
       mainLoop.DefaultRuleParameter.ActualName = DefaultRuleParameter.Name;
       mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
@@ -348,7 +405,12 @@
       ParameterizeStochasticOperator(Problem.SolutionCreator);
       ParameterizeStochasticOperator(Problem.Evaluator);
-      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeMDLOperator(Problem.Evaluator);
+      ParameterizeIterationBasedOperators(Problem.Evaluator);
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) {
+        ParameterizeStochasticOperator(op);
+      }
       ParameterizeSolutionsCreator();
       ParameterizeGeneticAlgorithmMainLoop();
+      ParameterizeMDL();
       ParameterizeSelectors();
       ParameterizeAnalyzers();
@@ -359,5 +421,21 @@
       UpdateAnalyzers();
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      ILASOperator.ProblemDataParameter.ActualName = Problem.ProblemDataParameter.Name;
+      InitializeDiscretizers.ProblemDataParameter.ActualName = Problem.ProblemDataParameter.Name;
       base.OnProblemChanged();
+    }
+
+    private void ParameterizeMDL() {
+      MDLIterationOperatorParameter.Value.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      //change
+      MDLIterationOperatorParameter.Value.IndividualParameter.ActualName = "DecisionList";
+      MDLIterationOperatorParameter.Value.ProblemDataParameter.ActualName = Problem.ProblemDataParameter.Name;
+      MDLIterationOperatorParameter.Value.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+
+      MDLIterationOperatorParameter.Value.InitialTheoryLengthRatioParameter.ActualName = InitialTheoryLengthRatioParameter.Name;
+      MDLIterationOperatorParameter.Value.MDLActivationIterationParameter.ActualName = MDLActivationIterationParameter.Name;
+      MDLIterationOperatorParameter.Value.WeightAdaptionIterationsParameter.ActualName = WeightAdaptionIterationsParameter.Name;
+      MDLIterationOperatorParameter.Value.WeightRelaxFactorParameter.ActualName = WeightRelaxFactorParameter.Name;
+      MDLIterationOperatorParameter.Value.IterationsParameter.ActualName = "Generations";
     }
 
@@ -374,4 +452,5 @@
       ParameterizeAnalyzers();
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      Problem.Evaluator.StrataParameter.ActualName = ILASOperator.StrataParameter.ActualName;
       base.Problem_EvaluatorChanged(sender, e);
     }
@@ -433,4 +512,10 @@
         stochasticOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
         stochasticOp.RandomParameter.Hidden = true;
+      }
+    }
+    private void ParameterizeMDLOperator(IOperator op) {
+      IMDLCalculatorBasedOperator stochasticOp = op as IMDLCalculatorBasedOperator;
+      if (stochasticOp != null) {
+        stochasticOp.MDLCalculatorParameter.ActualName = MDLIterationOperatorParameter.Value.MDLCalculatorParameter.ActualName;
       }
     }
@@ -469,11 +554,20 @@
       }
     }
+    private void ParameterizeIterationBasedOperators(IOperator op) {
+      IIterationBasedOperator iterationOp = op as IIterationBasedOperator;
+      if (iterationOp != null) {
+        ParameterizeIterationBasedOperators(iterationOp);
+      }
+    }
+    private void ParameterizeIterationBasedOperators(IIterationBasedOperator op) {
+      op.IterationsParameter.ActualName = "Generations";
+      op.IterationsParameter.Hidden = true;
+      op.MaximumIterationsParameter.ActualName = "MaximumGenerations";
+      op.MaximumIterationsParameter.Hidden = true;
+    }
     private void ParameterizeIterationBasedOperators() {
       if (Problem != null) {
         foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
-          op.IterationsParameter.ActualName = "Generations";
-          op.IterationsParameter.Hidden = true;
-          op.MaximumIterationsParameter.ActualName = "MaximumGenerations";
-          op.MaximumIterationsParameter.Hidden = true;
+          ParameterizeIterationBasedOperators(op);
         }
       }
Index: /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssistMainLoop.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssistMainLoop.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Algorithms.GAssist/3.3/GAssistMainLoop.cs	(revision 9392)
@@ -61,4 +61,7 @@
     public ValueLookupParameter<IOperator> MutatorParameter {
       get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; }
+    }
+    public ValueLookupParameter<IOperator> MDLIterationParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["MDLIteration"]; }
     }
     public ValueLookupParameter<IOperator> DefaultRuleParameter {
@@ -134,13 +137,14 @@
       Parameters.Add(new ValueLookupParameter<IOperator>("ReinitializationProbabilityOperator", ""));
       Parameters.Add(new ValueLookupParameter<IOperator>("DefaultRule", ""));
+      Parameters.Add(new ValueLookupParameter<IOperator>("MDLIteration", ""));
       Parameters.Add(new ScopeParameter("CurrentScope", "The current scope which represents a population of solutions on which the genetic algorithm should be applied."));
       #endregion
 
       #region Create operators
-      VariableCreator variableCreator = new VariableCreator();
       ResultsCollector resultsCollector1 = new ResultsCollector();
       Placeholder analyzer1 = new Placeholder();
+      Placeholder mdlIterationOperator = new Placeholder();
+      Placeholder defaultRuleOperator = new Placeholder();
       Placeholder reinitializationProbabilityOperator = new Placeholder();
-      Placeholder defaultRuleOperator = new Placeholder();
       Placeholder selector = new Placeholder();
       SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor();
@@ -167,6 +171,4 @@
       ConditionalBranch conditionalBranch = new ConditionalBranch();
 
-      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class GeneticAlgorithm expects this to be called Generations
-
       resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
       resultsCollector1.ResultsParameter.ActualName = "Results";
@@ -174,4 +176,7 @@
       analyzer1.Name = "Analyzer";
       analyzer1.OperatorParameter.ActualName = "Analyzer";
+
+      mdlIterationOperator.Name = "MDL Iteration Operator";
+      mdlIterationOperator.OperatorParameter.ActualName = MDLIterationParameter.Name;
 
       defaultRuleOperator.Name = "Default Rule Operator";
@@ -234,8 +239,8 @@
 
       #region Create operator graph
-      OperatorGraph.InitialOperator = variableCreator;
-      variableCreator.Successor = resultsCollector1;
+      OperatorGraph.InitialOperator = resultsCollector1;
       resultsCollector1.Successor = analyzer1;
-      analyzer1.Successor = defaultRuleOperator;
+      analyzer1.Successor = mdlIterationOperator;
+      mdlIterationOperator.Successor = defaultRuleOperator;
       defaultRuleOperator.Successor = reinitializationProbabilityOperator;
       reinitializationProbabilityOperator.Successor = selector;
@@ -272,5 +277,5 @@
       comparator.Successor = analyzer2;
       analyzer2.Successor = conditionalBranch;
-      conditionalBranch.FalseBranch = defaultRuleOperator;
+      conditionalBranch.FalseBranch = mdlIterationOperator;
       conditionalBranch.TrueBranch = null;
       conditionalBranch.Successor = null;
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionList.cs	(revision 9392)
@@ -80,17 +80,19 @@
 
     // for convenience
-    public IEnumerable<IAction> Evaluate(IEnumerable<DecisionListInput> input) {
-      int numberOfAliveRules;
-      return Evaluate(input, out numberOfAliveRules);
+    public IEnumerable<IAction> Evaluate(IEnumerable<IGAssistInput> input) {
+      ItemSet<Rule> aliveRules;
+      return Evaluate(input, out aliveRules);
     }
     // for convenience
-    public IEnumerable<IAction> Evaluate(IEnumerable<DecisionListInput> input, out int numberOfAliveRules) {
+    public IEnumerable<IAction> Evaluate(IEnumerable<IGAssistInput> input, out ItemSet<Rule> aliveRules) {
       double theoryLengtgh;
-      return Evaluate(input, out numberOfAliveRules, out theoryLengtgh);
+      return Evaluate(input, out aliveRules, out theoryLengtgh);
     }
-    public IEnumerable<IAction> Evaluate(IEnumerable<DecisionListInput> input, out int numberOfAliveRules, out double theoryLengtgh) {
+    public IEnumerable<IAction> Evaluate(IEnumerable<IGAssistInput> input, out ItemSet<Rule> aliveRules, out double theoryLength) {
       var estimated = new List<IAction>();
-      var activatedRules = new HashSet<Rule>();
+      var activatedRules = new ItemSet<Rule>();
+      int count = 0;
       foreach (var dli in input) {
+        count++;
         foreach (var rule in rules) {
           if (rule.MatchInput(dli)) {
@@ -100,9 +102,18 @@
           }
         }
+        if (count > estimated.Count) {
+          estimated.Add(defaultAction);
+        }
       }
-      numberOfAliveRules = activatedRules.Count;
-      theoryLengtgh = activatedRules.Sum(x => x.ComputeTheoryLength());
+      aliveRules = activatedRules;
+      theoryLength = activatedRules.Sum(x => x.ComputeTheoryLength());
 
       return estimated;
+    }
+
+    public void RemoveRules(IEnumerable<Rule> deadRules) {
+      foreach (var deadRule in deadRules) {
+        Rules.Remove(deadRule);
+      }
     }
 
@@ -145,4 +156,8 @@
       }
     }
+
+    public IGAssistSolution CreateGAssistSolution(IGAssistNichesProblemData problemData) {
+      return new DecisionListSolution(this, problemData);
+    }
     #endregion
   }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListInput.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListInput.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListInput.cs	(revision 9392)
@@ -26,4 +26,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators.LCS;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -31,5 +32,5 @@
   [StorableClass]
   [Item("DecisionListInput", "")]
-  public class DecisionListInput : Item {
+  public class DecisionListInput : Item, IGAssistInput {
 
     [Storable]
@@ -81,4 +82,13 @@
       return sb.ToString();
     }
+
+    #region IGAssistInput Members
+    public IEnumerable<string> VariableNames {
+      get { return inputDictionary.Keys; }
+    }
+    public string GetVariableValue(string variableName) {
+      return inputDictionary[variableName];
+    }
+    #endregion
   }
 }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListSolution.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListSolution.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/DecisionListSolution.cs	(revision 9392)
@@ -27,4 +27,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators.LCS;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -38,4 +39,5 @@
     private const string TestAccuracyResultName = "Accuracy (test)";
     private const string TrainingNumberOfAliveRulesName = "Number of alive rules (training)";
+    private const string TrainingAliveRulesName = "Alive Rules (training)";
     //private const string TestNumberOfAliveRules = "Number of alive rules (test)";
     private const string TrainingTheoryLengthName = "Theory Length (training)";
@@ -54,4 +56,8 @@
       private set { ((IntValue)this[TrainingNumberOfAliveRulesName].Value).Value = value; }
     }
+    public ItemSet<Rule> TrainingAliveRules {
+      get { return (ItemSet<Rule>)this[TrainingAliveRulesName].Value; }
+      private set { this[TrainingAliveRulesName].Value = value; }
+    }
     public double TrainingTheoryLength {
       get { return ((DoubleValue)this[TrainingTheoryLengthName].Value).Value; }
@@ -61,4 +67,8 @@
       get { return ((DoubleValue)this[TrainingExceptionsLengthName].Value).Value; }
       private set { ((DoubleValue)this[TrainingExceptionsLengthName].Value).Value = value; }
+    }
+
+    public int Classes {
+      get { return ProblemData.Classes; }
     }
 
@@ -79,6 +89,6 @@
     }
 
-    public IDecisionListClassificationProblemData ProblemData {
-      get { return (IDecisionListClassificationProblemData)this[ProblemDataResultName].Value; }
+    public IGAssistNichesProblemData ProblemData {
+      get { return (IGAssistNichesProblemData)this[ProblemDataResultName].Value; }
       set {
         if (this[ProblemDataResultName].Value != value) {
@@ -100,5 +110,5 @@
       description = original.Description;
     }
-    public DecisionListSolution(DecisionList model, IDecisionListClassificationProblemData problemData)
+    public DecisionListSolution(DecisionList model, IGAssistNichesProblemData problemData)
       : base() {
       name = ItemName;
@@ -109,4 +119,5 @@
       Add(new Result(TestAccuracyResultName, "Accuracy of the model on the test partition (percentage of correctly classified instances).", new PercentValue()));
       Add(new Result(TrainingNumberOfAliveRulesName, "", new IntValue()));
+      Add(new Result(TrainingAliveRulesName, "", new ItemSet<Rule>()));
       Add(new Result(TrainingTheoryLengthName, "", new DoubleValue()));
       Add(new Result(TrainingExceptionsLengthName, "", new DoubleValue()));
@@ -123,8 +134,9 @@
       var originalTrainingCondition = ProblemData.FetchInput(ProblemData.TrainingIndices);
       var originalTestCondition = ProblemData.FetchInput(ProblemData.TestIndices);
-      int numberOfAliveRules;
+      ItemSet<Rule> aliveRules;
       double theoryLength;
-      var estimatedTraining = Model.Evaluate(originalTrainingCondition, out numberOfAliveRules, out theoryLength);
-      TrainingNumberOfAliveRules = numberOfAliveRules;
+      var estimatedTraining = Model.Evaluate(originalTrainingCondition, out aliveRules, out theoryLength);
+      TrainingNumberOfAliveRules = aliveRules.Count;
+      TrainingAliveRules = aliveRules;
       TrainingTheoryLength = theoryLength;
       var estimatedTest = Model.Evaluate(originalTestCondition);
@@ -139,5 +151,5 @@
     }
 
-    private double CalculateAccuracy(IEnumerable<IAction> original, IEnumerable<IAction> estimated) {
+    public static double CalculateAccuracy(IEnumerable<IGAssistNiche> original, IEnumerable<IGAssistNiche> estimated) {
       double correctClassified = 0;
 
@@ -147,5 +159,6 @@
 
       while (originalEnumerator.MoveNext() && estimatedActionEnumerator.MoveNext()) {
-        if (originalEnumerator.Current.Match(estimatedActionEnumerator.Current)) {
+        if (originalEnumerator.Current != null && estimatedActionEnumerator.Current != null
+          && originalEnumerator.Current.SameNiche(estimatedActionEnumerator.Current)) {
           correctClassified++;
         }
Index: anches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/DecisionListEvaluator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/DecisionListEvaluator.cs	(revision 9391)
+++ 	(revision )
@@ -1,104 +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 System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Encodings.DecisionList {
-  [Item("DecisionListEvaluator", "Description missing")]
-  [StorableClass]
-  public abstract class DecisionListEvaluator : SingleSuccessorOperator, IDecisionListEvaluator, IDecisionListOperator, IStochasticOperator {
-
-    #region Parameter Properties
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-    public ILookupParameter<DecisionList> DecisionListParameter {
-      get { return (ILookupParameter<DecisionList>)Parameters["DecisionList"]; }
-    }
-    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
-      get { return (IValueLookupParameter<IntRange>)Parameters["EvaluationPartition"]; }
-    }
-    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
-      get { return (IValueLookupParameter<PercentValue>)Parameters["RelativeNumberOfEvaluatedSamples"]; }
-    }
-    public IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter {
-      get { return (IValueLookupParameter<IDecisionListClassificationProblemData>)Parameters["ProblemData"]; }
-    }
-    public IValueLookupParameter<IntValue> SizePenaltyMinRulesParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["SizePenaltyMinRules"]; }
-    }
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    protected DecisionListEvaluator(bool deserializing) : base(deserializing) { }
-    protected DecisionListEvaluator(DecisionListEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public DecisionListEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random generator to use."));
-      Parameters.Add(new LookupParameter<DecisionList>("DecisionList", ""));
-      Parameters.Add(new ValueLookupParameter<IntRange>("EvaluationPartition", ""));
-      Parameters.Add(new ValueLookupParameter<PercentValue>("RelativeNumberOfEvaluatedSamples", ""));
-      Parameters.Add(new ValueLookupParameter<IDecisionListClassificationProblemData>("ProblemData", ""));
-      Parameters.Add(new ValueLookupParameter<IntValue>("SizePenaltyMinRules", ""));
-      Parameters.Add(new LookupParameter<DoubleValue>("Quality", ""));
-    }
-
-    protected IEnumerable<int> GenerateRowsToEvaluate() {
-      return GenerateRowsToEvaluate(RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
-    }
-
-    protected IEnumerable<int> GenerateRowsToEvaluate(double percentageOfRows) {
-      IEnumerable<int> rows;
-      int samplesStart = EvaluationPartitionParameter.ActualValue.Start;
-      int samplesEnd = EvaluationPartitionParameter.ActualValue.End;
-      int testPartitionStart = ProblemDataParameter.ActualValue.TestPartition.Start;
-      int testPartitionEnd = ProblemDataParameter.ActualValue.TestPartition.End;
-      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
-
-      if (percentageOfRows.IsAlmost(1.0))
-        rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
-      else {
-        int seed = RandomParameter.ActualValue.Next();
-        int count = (int)((samplesEnd - samplesStart) * percentageOfRows);
-        if (count == 0) count = 1;
-        rows = RandomEnumerable.SampleRandomNumbers(seed, samplesStart, samplesEnd, count);
-      }
-
-      rows = rows.Where(i => i < testPartitionStart || testPartitionEnd <= i);
-      return rows;
-    }
-  }
-}
Index: anches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLCalculator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLCalculator.cs	(revision 9391)
+++ 	(revision )
@@ -1,130 +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 System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.DecisionList {
-  [StorableClass]
-  [Item("MDLCalculator", "")]
-  public class MDLCalculator : Item {
-
-    [Storable]
-    private int activationIteration;
-
-    [Storable]
-    private bool activated;
-    [Storable]
-    private bool fixedWeight;
-
-    [Storable]
-    private double theoryWeight;
-
-    [Storable]
-    private double initialTheoryLengthRatio;
-    [Storable]
-    private double weightRelaxFactor;
-
-    [Storable]
-    private IList<double> accuracyStatistic;
-    [Storable]
-    private int iterationsSinceBest;
-    [Storable]
-    private double bestFitness;
-
-    [StorableConstructor]
-    protected MDLCalculator(bool deserializing) : base(deserializing) { }
-    protected MDLCalculator(MDLCalculator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public MDLCalculator(int activationIteration, double initialTheoryLengthRatio, double weightRelaxFactor)
-      : base() {
-      this.activationIteration = activationIteration;
-      this.initialTheoryLengthRatio = initialTheoryLengthRatio;
-      this.weightRelaxFactor = weightRelaxFactor;
-      activated = false;
-      fixedWeight = false;
-      accuracyStatistic = new List<double>();
-      iterationsSinceBest = 0;
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new MDLCalculator(this, cloner);
-    }
-
-    public void StartNewIteration(DecisionListSolution bestSolution, int currentIteration) {
-      if (currentIteration == activationIteration) {
-        activated = true;
-        double error = bestSolution.TrainingExceptionsLength;
-        double tl = (bestSolution.TrainingTheoryLength * bestSolution.ProblemData.Classes) / bestSolution.TrainingNumberOfAliveRules;
-        theoryWeight = (initialTheoryLengthRatio / (1.0 - initialTheoryLengthRatio)) * (error / tl);
-        iterationsSinceBest = 0;
-      }
-
-      if (activated && !fixedWeight &&
-        GetLastIterationsAccuracyAverage(10) == 1.0) {
-        fixedWeight = true;
-      }
-
-      if (activated && !fixedWeight) {
-        if (bestSolution.TrainingAccuracy != 1.0) {
-          if (iterationsSinceBest == 10) {
-            theoryWeight *= weightRelaxFactor;
-            iterationsSinceBest = 0;
-          }
-        }
-      }
-
-      if (currentIteration != 0) {
-        UpdateStatistic(bestSolution.TrainingAccuracy);
-      }
-    }
-
-    private void UpdateStatistic(double accuracy) {
-      if (iterationsSinceBest == 0) {
-        bestFitness = accuracy;
-        iterationsSinceBest++;
-      } else if (accuracy > bestFitness) {
-        bestFitness = accuracy;
-        iterationsSinceBest = 1;
-      } else {
-        iterationsSinceBest++;
-      }
-    }
-
-    private double GetLastIterationsAccuracyAverage(int iterations) {
-      int startAt = accuracyStatistic.Count - iterations;
-      startAt = startAt > 0 ? startAt : 0;
-      return accuracyStatistic.Skip(startAt).Sum() / (accuracyStatistic.Count - startAt);
-    }
-
-    public double CalculateFitness(DecisionListSolution dls) {
-      double fitness = 0;
-      if (activated) {
-        fitness = dls.TrainingTheoryLength * theoryWeight;
-      }
-      fitness += 105.0 - dls.TrainingAccuracy * 100.0;
-      return fitness;
-    }
-  }
-}
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLEvaluator.cs	(revision 9392)
@@ -20,7 +20,12 @@
 #endregion
 
+using System.Collections.Generic;
+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;
@@ -29,8 +34,47 @@
   [Item("MDLEvaluator", "Description missing")]
   [StorableClass]
-  public class MDLEvaluator : DecisionListEvaluator {
+  public class MDLEvaluator : SingleSuccessorOperator, IDecisionListEvaluator, IDecisionListOperator, IMDLCalculatorBasedOperator, IIterationBasedOperator, IStochasticOperator {
 
-    public IValueLookupParameter<MDLCalculator> MDLCalculatorParameter {
-      get { return (IValueLookupParameter<MDLCalculator>)Parameters["MDLCalculator"]; }
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<DecisionList> DecisionListParameter {
+      get { return (ILookupParameter<DecisionList>)Parameters["DecisionList"]; }
+    }
+    public IValueLookupParameter<IntValue> SizePenaltyMinRulesParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SizePenaltyMinRules"]; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDecisionListClassificationProblemData>)Parameters["ProblemData"]; }
+    }
+
+    public ILookupParameter<MDLCalculator> MDLCalculatorParameter {
+      get { return (ILookupParameter<MDLCalculator>)Parameters["MDLCalculator"]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
+    }
+
+    public IValueLookupParameter<IntValue> IterationRuleDeletionParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["IterationRuleDeletion"]; }
+    }
+    public IValueLookupParameter<IntValue> RuleDeletionMinRulesParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["RuleDeletionMinRules"]; }
+    }
+
+    public ILookupParameter<ItemList<ItemList<IntValue>>> StrataParameter {
+      get { return (ILookupParameter<ItemList<ItemList<IntValue>>>)Parameters["Strata"]; }
+    }
+    #endregion
+
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
     }
 
@@ -42,5 +86,15 @@
     public MDLEvaluator()
       : base() {
-      Parameters.Add(new ValueLookupParameter<MDLCalculator>("MDLCalculator", ""));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random generator to use."));
+      Parameters.Add(new LookupParameter<DecisionList>("DecisionList", ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SizePenaltyMinRules", ""));
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", ""));
+      Parameters.Add(new ValueLookupParameter<IDecisionListClassificationProblemData>("ProblemData", ""));
+      Parameters.Add(new LookupParameter<MDLCalculator>("MDLCalculator", ""));
+      Parameters.Add(new LookupParameter<IntValue>("Iterations", ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>("IterationRuleDeletion", "", new IntValue(5)));
+      Parameters.Add(new ValueLookupParameter<IntValue>("RuleDeletionMinRules", "", new IntValue(12)));
+      Parameters.Add(new ValueLookupParameter<ItemList<ItemList<IntValue>>>("Strata", ""));
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -51,14 +105,61 @@
       double penalty = 1;
 
-      var dls = new DecisionListSolution(DecisionListParameter.ActualValue, ProblemDataParameter.ActualValue);
+      var strata = StrataParameter.ActualValue;
+      int iteration = IterationsParameter.ActualValue.Value;
+      int numberOfStrata = strata.Count;
+      var dl = DecisionListParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
+      bool lastIteration = iteration == MaximumIterationsParameter.ActualValue.Value - 1;
+      IEnumerable<int> rows;
+      if (lastIteration) {
+        rows = from s in strata
+               from row in s
+               select row.Value;
+      } else {
+        rows = strata[iteration % numberOfStrata].Select(x => x.Value);
+      }
+      var input = problemData.FetchInput(rows);
+      var actions = problemData.FetchAction(rows);
+      ItemSet<Rule> aliveRules;
+      double theoryLength;
+      var estimated = dl.Evaluate(input, out aliveRules, out theoryLength);
 
-      if (dls.TrainingNumberOfAliveRules < SizePenaltyMinRulesParameter.ActualValue.Value) {
-        penalty = (1 - 0.025 * (SizePenaltyMinRulesParameter.ActualValue.Value - dls.TrainingNumberOfAliveRules));
+      if (aliveRules.Count < SizePenaltyMinRulesParameter.ActualValue.Value) {
+        penalty = (1 - 0.025 * (SizePenaltyMinRulesParameter.ActualValue.Value - aliveRules.Count));
         if (penalty <= 0) penalty = 0.01;
         penalty *= penalty;
       }
 
-      QualityParameter.ActualValue = new DoubleValue(MDLCalculatorParameter.ActualValue.CalculateFitness(dls) / penalty);
+      double accuracy = DecisionListSolution.CalculateAccuracy(actions, estimated);
+      QualityParameter.ActualValue = new DoubleValue(MDLCalculatorParameter.ActualValue.CalculateFitness(theoryLength, accuracy) / penalty);
+
+      if (iteration >= IterationRuleDeletionParameter.ActualValue.Value) {
+        if (lastIteration) {
+          DoRuleDeletion(dl, aliveRules, 1);
+        } else {
+          DoRuleDeletion(dl, aliveRules, RuleDeletionMinRulesParameter.ActualValue.Value);
+        }
+      }
       return base.Apply();
+    }
+
+    // default rule cannot be deleted, but it has to be considered in the rule set size
+    private void DoRuleDeletion(DecisionList dl, ItemSet<Rule> aliveRules, int minRules) {
+      int ruleSetSize = dl.RuleSetSize;
+      if (ruleSetSize <= minRules) { return; }
+
+      var deadRules = dl.Rules.Except(aliveRules).ToList();
+      int numberOfDeadRules = deadRules.Count();
+
+      int keepRules = minRules - (ruleSetSize - numberOfDeadRules);
+
+      if (keepRules > 0) {
+        for (int i = 0; i < keepRules; i++) {
+          int pos = Random.Next(deadRules.Count);
+          deadRules.RemoveAt(pos);
+        }
+      }
+
+      dl.RemoveRules(deadRules);
     }
   }
Index: anches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLIterationOperator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Evaluator/MDLIterationOperator.cs	(revision 9391)
+++ 	(revision )
@@ -1,85 +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.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Encodings.DecisionList.Evaluator {
-  [Item("MDLIterationOperator", "Description missing")]
-  [StorableClass]
-  public class MDLIterationOperator : SingleSuccessorOperator {
-
-    #region Parameter Properties
-    public ILookupParameter<DecisionList> DecisionListParameter {
-      get { return (ILookupParameter<DecisionList>)Parameters["DecisionList"]; }
-    }
-    public IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter {
-      get { return (IValueLookupParameter<IDecisionListClassificationProblemData>)Parameters["ProblemData"]; }
-    }
-    public IValueLookupParameter<MDLCalculator> MDLCalculatorParameter {
-      get { return (IValueLookupParameter<MDLCalculator>)Parameters["MDLCalculator"]; }
-    }
-    public IValueLookupParameter<IntValue> IterationParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["Iteration"]; }
-    }
-    public IValueLookupParameter<IntValue> MDLIterationParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["MDLIteration"]; }
-    }
-    public IValueLookupParameter<DoubleValue> InitialTheoryLengthRationParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters["InitialTheoryLengthRation"]; }
-    }
-    public IValueLookupParameter<DoubleValue> WeightRelaxFactorParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters["WeightRelaxFactor"]; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    protected MDLIterationOperator(bool deserializing) : base(deserializing) { }
-    protected MDLIterationOperator(MDLIterationOperator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public MDLIterationOperator()
-      : base() {
-      Parameters.Add(new LookupParameter<DecisionList>("DecisionList", ""));
-      Parameters.Add(new ValueLookupParameter<IDecisionListClassificationProblemData>("ProblemData", ""));
-      Parameters.Add(new ValueLookupParameter<IntValue>("Iteration", ""));
-      Parameters.Add(new ValueLookupParameter<IntValue>("MDLIteration", ""));
-      Parameters.Add(new ValueLookupParameter<MDLCalculator>("MDLCalculator", ""));
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new MDLIterationOperator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      if (MDLCalculatorParameter.ActualValue == null) {
-        MDLCalculatorParameter.ActualValue = new MDLCalculator(MDLIterationParameter.ActualValue.Value,
-                                                               InitialTheoryLengthRationParameter.ActualValue.Value,
-                                                               WeightRelaxFactorParameter.ActualValue.Value);
-      }
-      MDLCalculatorParameter.ActualValue.StartNewIteration(new DecisionListSolution(DecisionListParameter.ActualValue, ProblemDataParameter.ActualValue), IterationParameter.ActualValue.Value);
-      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 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/HeuristicLab.Encodings.DecisionList-3.3.csproj	(revision 9392)
@@ -100,8 +100,5 @@
     <Compile Include="DecisionListNicheComparer.cs" />
     <Compile Include="DecisionListSolution.cs" />
-    <Compile Include="Evaluator\DecisionListEvaluator.cs" />
-    <Compile Include="Evaluator\MDLCalculator.cs" />
     <Compile Include="Evaluator\MDLEvaluator.cs" />
-    <Compile Include="Evaluator\MDLIterationOperator.cs" />
     <Compile Include="Interfaces\IDecisionListClassificationProblem.cs" />
     <Compile Include="Interfaces\IDecisionListClassificationProblemData.cs" />
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListClassificationProblemData.cs	(revision 9392)
@@ -20,39 +20,10 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization.Operators.LCS;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Encodings.DecisionList {
   public interface IDecisionListClassificationProblemData : IGAssistNichesProblemData {
-    Dataset Dataset { get; }
-    ICheckedItemList<StringValue> ConditionVariables { get; }
-    StringValue TargetVariable { get; }
-    IEnumerable<string> AllowedConditionVariables { get; }
-    //IEnumerable<string> AllowedTargetVariables { get; }
-
-    IntRange TrainingPartition { get; }
-    IntRange TestPartition { get; }
-
-    IEnumerable<int> TrainingIndices { get; }
-    IEnumerable<int> TestIndices { get; }
-
-    bool IsTrainingSample(int index);
-    bool IsTestSample(int index);
-
-    int Classes { get; }
-
     IValueParameter<Rule> SampleRuleParameter { get; }
-
-    DecisionListInput FetchInput(int row);
-    IEnumerable<DecisionListInput> FetchInput(IEnumerable<int> row);
-
-    IEnumerable<IAction> FetchAction(IEnumerable<int> rows);
-    IAction FetchAction(int rows);
-
-    event EventHandler Changed;
   }
 }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListEvaluator.cs	(revision 9392)
@@ -22,11 +22,9 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators.LCS;
 
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IDecisionListEvaluator : ISingleObjectiveEvaluator {
+  public interface IDecisionListEvaluator : IStrataSingleObjectiveEvaluator {
     ILookupParameter<DecisionList> DecisionListParameter { get; }
-    IValueLookupParameter<IntRange> EvaluationPartitionParameter { get; }
-    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
     IValueLookupParameter<IDecisionListClassificationProblemData> ProblemDataParameter { get; }
     IValueLookupParameter<IntValue> SizePenaltyMinRulesParameter { get; }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListSolution.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListSolution.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Interfaces/IDecisionListSolution.cs	(revision 9392)
@@ -20,19 +20,14 @@
 #endregion
 
+using System;
+using HeuristicLab.Optimization.Operators.LCS;
 
-using System;
 namespace HeuristicLab.Encodings.DecisionList {
-  public interface IDecisionListSolution {
+  public interface IDecisionListSolution : IGAssistSolution {
     DecisionList Model { get; }
-    IDecisionListClassificationProblemData ProblemData { get; set; }
+    //IDecisionListClassificationProblemData ProblemData { get; set; }
 
     event EventHandler ModelChanged;
     event EventHandler ProblemDataChanged;
-
-    double TrainingAccuracy { get; }
-    double TestAccuracy { get; }
-    int TrainingNumberOfAliveRules { get; }
-    double TrainingTheoryLength { get; }
-    double TrainingExceptionsLength { get; }
   }
 }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Properties/AssemblyInfo.cs	(revision 9392)
@@ -55,3 +55,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.7.9342")]
+[assembly: AssemblyFileVersion("3.3.7.9352")]
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Rule.cs	(revision 9392)
@@ -88,8 +88,8 @@
     }
 
-    public bool MatchInput(DecisionListInput target) {
+    public bool MatchInput(IGAssistInput target) {
       foreach (var variable in variables) {
-        if (!target.InputDictionary.ContainsKey(variable.Key)) { throw new ArgumentException("Input doesn't contain variable"); }
-        if (!variable.Value.Match(target.InputDictionary[variable.Key])) { return false; }
+        if (!target.VariableNames.Contains(variable.Key)) { throw new ArgumentException("Input doesn't contain variable"); }
+        if (!variable.Value.Match(target.GetVariableValue(variable.Key))) { return false; }
       }
       return true;
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.DecisionList/3.3/Variable/DoubleVariable.cs	(revision 9392)
@@ -46,6 +46,8 @@
     protected DoubleVariable(DoubleVariable original, Cloner cloner)
       : base(original, cloner) {
-      discretizer = (IDiscretizer)original.discretizer.Clone();
-      curIntervals = new List<int>(original.curIntervals);
+      if (original.discretizer != null) {
+        discretizer = (IDiscretizer)original.discretizer.Clone();
+        curIntervals = new List<int>(original.curIntervals);
+      }
       maxIntervals = original.maxIntervals;
     }
@@ -68,5 +70,5 @@
 
       attributes = new List<bool>(numberOfIntervals);
-      var curIntervals = new List<int>(numberOfIntervals);
+      curIntervals = new List<int>(numberOfIntervals);
 
       for (int i = 0; i < numberOfIntervals - 1; i++) {
@@ -74,9 +76,9 @@
         microIntervals -= microInt;
         curIntervals.Add(microInt);
-        attributes[i] = random.NextDouble() < onePercentage;
+        attributes.Add(random.NextDouble() < onePercentage);
       }
       // add last interval
       curIntervals.Add(microIntervals);
-      attributes[numberOfIntervals - 1] = random.NextDouble() < onePercentage;
+      attributes.Add(random.NextDouble() < onePercentage);
     }
 
@@ -114,12 +116,13 @@
     }
 
-    private IList<double> GetValuesToCutPoints(IEnumerable<double> cutpoints, IEnumerable<int> microIntervals) {
+    private IList<double> GetValuesToCutPoints(IEnumerable<double> cutpoints, IList<int> microIntervals) {
       var intervalValues = new List<double>();
       var cutpointList = cutpoints.ToList();
-      int cur = 0;
-      foreach (var microInterval in microIntervals) {
-        cur += microInterval;
+      int cur = -1;
+      for (int i = 0; i < microIntervals.Count - 1; i++) {
+        cur += microIntervals[i];
         intervalValues.Add(cutpointList[cur]);
       }
+      intervalValues.Add(Double.PositiveInfinity);
       return intervalValues;
     }
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Crossover/SinglePointCrossover.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Crossover/SinglePointCrossover.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Crossover/SinglePointCrossover.cs	(revision 9392)
@@ -62,5 +62,5 @@
       IList<IVariable> newCondition = new List<IVariable>(parent1Condition.VariableDictionary.Count);
 
-      var keyEnumerator = parent1Condition.Order.GetEnumerator();
+      var keyEnumerator = parent1Condition.VariableDictionary.Keys.GetEnumerator();
 
       int index = 0;
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Manipulator/UniformOnePositionInConditionManipulator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Manipulator/UniformOnePositionInConditionManipulator.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Manipulator/UniformOnePositionInConditionManipulator.cs	(revision 9392)
@@ -54,5 +54,5 @@
         throw new ArgumentOutOfRangeException();
       }
-      var keyEnumerator = condition.Order.GetEnumerator();
+      var keyEnumerator = condition.VariableDictionary.Keys.GetEnumerator();
       int count = 0;
       keyEnumerator.MoveNext();
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/DoubleVariable.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/DoubleVariable.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/DoubleVariable.cs	(revision 9392)
@@ -130,7 +130,7 @@
       var targetCast = target as DoubleVariable;
       if (targetCast == null) { return false; }
-      if (variableName != targetCast.variableName || currentCenter.IsAlmost(targetCast.currentCenter)
-        || currentSpread.IsAlmost(targetCast.currentSpread) || max.IsAlmost(targetCast.max)
-        || min.IsAlmost(targetCast.min)) { return false; }
+      if (variableName != targetCast.variableName || !currentCenter.IsAlmost(targetCast.currentCenter)
+        || !currentSpread.IsAlmost(targetCast.currentSpread) || !max.IsAlmost(targetCast.max)
+        || !min.IsAlmost(targetCast.min)) { return false; }
 
       return true;
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IntVariable.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IntVariable.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IntVariable.cs	(revision 9392)
@@ -133,8 +133,12 @@
         || currentValue != targetCast.currentValue) { return false; }
 
-      if (possibleFeatures.Except(targetCast.possibleFeatures).Count() != 0
-        || targetCast.possibleFeatures.Except(possibleFeatures).Count() != 0) { return false; }
+      var thisEnumerator = possibleFeatures.GetEnumerator();
+      var castEnumerator = targetCast.possibleFeatures.GetEnumerator();
+      while (thisEnumerator.MoveNext() && castEnumerator.MoveNext()) {
+        if (thisEnumerator.Current != castEnumerator.Current)
+          return false;
+      }
 
-      return true;
+      return !thisEnumerator.MoveNext() && !castEnumerator.MoveNext();
     }
 
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/StringVariable.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/StringVariable.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/StringVariable.cs	(revision 9392)
@@ -87,5 +87,5 @@
       featureMapping = new Dictionary<int, string>();
       var distinctValuesEnumerator = variableValues.Distinct().GetEnumerator();
-      possibleFeatures = Enumerable.Range(0, featureMapping.Count());
+      possibleFeatures = Enumerable.Range(0, variableValues.Count());
       var possibleFeaturesEnumerator = possibleFeatures.GetEnumerator();
       while (possibleFeaturesEnumerator.MoveNext() && distinctValuesEnumerator.MoveNext()) {
@@ -178,12 +178,13 @@
         || currentValue != targetCast.currentValue) { return false; }
 
-      if (featureMapping.Keys.Except(targetCast.featureMapping.Keys).Count() != 0
-        || targetCast.featureMapping.Keys.Except(featureMapping.Keys).Count() != 0) { return false; }
-
-      foreach (var keyValuePair in targetCast.featureMapping) {
-        if (!featureMapping[keyValuePair.Key].Equals(keyValuePair.Value)) { return false; }
-      }
-
-      return true;
+      var thisEnumerator = featureMapping.GetEnumerator();
+      var castEnumerator = targetCast.featureMapping.GetEnumerator();
+      while (thisEnumerator.MoveNext() && castEnumerator.MoveNext()) {
+        if (thisEnumerator.Current.Key != castEnumerator.Current.Key ||
+          thisEnumerator.Current.Value != castEnumerator.Current.Value)
+          return false;
+      }
+
+      return !thisEnumerator.MoveNext() && !castEnumerator.MoveNext();
     }
 
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorActionComparer.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorActionComparer.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorActionComparer.cs	(revision 9392)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -43,11 +42,15 @@
 
     public bool Equals(VariableVectorAction x, VariableVectorAction y) {
-      if (!x.Order.SequenceEqual(y.Order)) return false;
-      foreach (var key in x.VariableDictionary.Keys) {
-        if (!x.VariableDictionary[key].Identical(y.VariableDictionary[key])) {
-          return false;
+      //if (!x.Order.SequenceEqual(y.Order)) return false;
+      var xEnumerator = x.VariableDictionary.Keys.GetEnumerator();
+      var yEnumerator = y.VariableDictionary.Keys.GetEnumerator();
+      while (xEnumerator.MoveNext() && yEnumerator.MoveNext())
+        foreach (var key in x.VariableDictionary.Keys) {
+          if (xEnumerator.Current != yEnumerator.Current ||
+            !x.VariableDictionary[xEnumerator.Current].Identical(y.VariableDictionary[yEnumerator.Current])) {
+            return false;
+          }
         }
-      }
-      return true;
+      return !xEnumerator.MoveNext() && !yEnumerator.MoveNext();
     }
 
Index: /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCondition.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCondition.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCondition.cs	(revision 9392)
@@ -39,6 +39,4 @@
       protected set { variableDictionary = value; }
     }
-
-    public IOrderedEnumerable<string> Order { get { return VariableDictionary.Keys.OrderBy(x => x); } }
 
     public int VirtualLength { get { return VariableDictionary.Values.Sum(x => x.VirtualLength); } }
@@ -110,11 +108,15 @@
 
     public bool Identical(VariableVectorCondition target) {
-      if (!this.Order.SequenceEqual(target.Order)) { return false; }
-      foreach (var keyValuePair in target.VariableDictionary) {
-        if (!VariableDictionary[keyValuePair.Key].Identical(keyValuePair.Value)) {
+      var thisEnumerator = VariableDictionary.GetEnumerator();
+      var targetEnumerator = target.VariableDictionary.GetEnumerator();
+
+      while (thisEnumerator.MoveNext() && targetEnumerator.MoveNext()) {
+        if (thisEnumerator.Current.Key != targetEnumerator.Current.Key ||
+          !thisEnumerator.Current.Value.Identical(targetEnumerator.Current.Value)) {
           return false;
         }
       }
-      return true;
+
+      return !thisEnumerator.MoveNext() && !targetEnumerator.MoveNext();
     }
   }
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/IDiscretizer.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/IDiscretizer.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/IDiscretizer.cs	(revision 9392)
@@ -25,4 +25,5 @@
 namespace HeuristicLab.Optimization.Operators.LCS {
   public interface IDiscretizer : IItem {
+    IEnumerable<double> DiscretizeValues(string attribute, IEnumerable<double> values);
     int NumberOfMicroIntervals(string attribute);
     IEnumerable<double> GetCutPoints(string attribute);
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/InitializeDiscretizersOperator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/InitializeDiscretizersOperator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/InitializeDiscretizersOperator.cs	(revision 9392)
@@ -0,0 +1,72 @@
+﻿#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.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [Item("InitializeDiscretizersOperator", "Description missing")]
+  [StorableClass]
+  public class InitializeDiscretizersOperator : SingleSuccessorOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<IGAssistNichesProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<IGAssistNichesProblemData>)Parameters["ProblemData"]; }
+    }
+    public ILookupParameter<ItemCollection<IDiscretizer>> DiscretizersParameter {
+      get { return (ILookupParameter<ItemCollection<IDiscretizer>>)Parameters["Discretizers"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected InitializeDiscretizersOperator(bool deserializing) : base(deserializing) { }
+    protected InitializeDiscretizersOperator(InitializeDiscretizersOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public InitializeDiscretizersOperator()
+      : base() {
+      Parameters.Add(new LookupParameter<IGAssistNichesProblemData>("ProblemData", ""));
+      Parameters.Add(new LookupParameter<ItemCollection<IDiscretizer>>("Discretizers", ""));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new InitializeDiscretizersOperator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      var dataset = ProblemDataParameter.ActualValue.Dataset;
+      var trainingIndizes = ProblemDataParameter.ActualValue.TrainingIndices;
+      var conditionVariables = ProblemDataParameter.ActualValue.ConditionVariables.CheckedItems.Select(x => x.Value.Value);
+
+      foreach (var variable in dataset.DoubleVariables.Where(x => conditionVariables.Contains(x))) {
+        var values = dataset.GetDoubleValues(variable, trainingIndizes);
+        foreach (var discretizer in DiscretizersParameter.ActualValue) {
+          discretizer.DiscretizeValues(variable, values);
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/UniformWidthDiscretizer.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/UniformWidthDiscretizer.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Discretizer/UniformWidthDiscretizer.cs	(revision 9392)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -42,8 +41,9 @@
     protected UniformWidthDiscretizer(UniformWidthDiscretizer original, Cloner cloner)
       : base(original, cloner) {
+      this.bins = original.bins;
+      this.variableMicroItervals = new Dictionary<string, IList<double>>(original.variableMicroItervals);
     }
     public UniformWidthDiscretizer()
-      : base() {
-      bins = 5;
+      : this(5) {
     }
     public UniformWidthDiscretizer(int bins)
@@ -60,9 +60,5 @@
     }
 
-    public IEnumerable<double> discretizeValues(string attribute, IEnumerable<double> values) {
-      if (variableMicroItervals.ContainsKey(attribute)) {
-        throw new ArgumentException("Values of attribute " + attribute + " are already set.");
-      }
-
+    public IEnumerable<double> DiscretizeValues(string attribute, IEnumerable<double> values) {
       double min = values.Min();
       double max = values.Max();
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistNichesProblemData.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistNichesProblemData.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistNichesProblemData.cs	(revision 9392)
@@ -20,9 +20,37 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Optimization.Operators.LCS {
   public interface IGAssistNichesProblemData : INamedItem {
+    Dataset Dataset { get; }
+    ICheckedItemList<StringValue> ConditionVariables { get; }
+    StringValue TargetVariable { get; }
+    IEnumerable<string> AllowedConditionVariables { get; }
+    //IEnumerable<string> AllowedTargetVariables { get; }
+
+    IntRange TrainingPartition { get; }
+    IntRange TestPartition { get; }
+
+    IEnumerable<int> TrainingIndices { get; }
+    IEnumerable<int> TestIndices { get; }
+
+    bool IsTrainingSample(int index);
+    bool IsTestSample(int index);
+
+    int Classes { get; }
+
+    IGAssistInput FetchInput(int row);
+    IEnumerable<IGAssistInput> FetchInput(IEnumerable<int> row);
+
+    IEnumerable<IGAssistNiche> FetchAction(IEnumerable<int> rows);
+    IGAssistNiche FetchAction(int rows);
+
+    event EventHandler Changed;
+
     IEnumerable<IGAssistNiche> GetPossibleNiches();
   }
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistProblem.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistProblem.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/IGAssistProblem.cs	(revision 9392)
@@ -21,6 +21,9 @@
 
 using HeuristicLab.Core;
+
 namespace HeuristicLab.Optimization.Operators.LCS {
   public interface IGAssistProblem : ISingleObjectiveHeuristicOptimizationProblem {
+    new IStrataSingleObjectiveEvaluator Evaluator { get; }
+
     IParameter ProblemDataParameter { get; }
     string NichingParameterName { get; }
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/ILAS/ILASOperator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/ILAS/ILASOperator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/ILAS/ILASOperator.cs	(revision 9392)
@@ -0,0 +1,110 @@
+﻿#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 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("ILASOperator", "Description missing")]
+  [StorableClass]
+  public class ILASOperator : SingleSuccessorOperator, IStochasticOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<IGAssistNichesProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<IGAssistNichesProblemData>)Parameters["ProblemData"]; }
+    }
+    public IValueLookupParameter<IntValue> NumberOfStrataParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["NumberOfStrata"]; }
+    }
+    public IValueLookupParameter<ItemList<ItemList<IntValue>>> StrataParameter {
+      get { return (IValueLookupParameter<ItemList<ItemList<IntValue>>>)Parameters["Strata"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected ILASOperator(bool deserializing) : base(deserializing) { }
+    protected ILASOperator(ILASOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public ILASOperator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random generator to use."));
+      Parameters.Add(new LookupParameter<IGAssistNichesProblemData>("ProblemData", ""));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfStrata", ""));
+      Parameters.Add(new ValueLookupParameter<ItemList<ItemList<IntValue>>>("Strata", ""));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ILASOperator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (StrataParameter.ActualValue == null) {
+        //initialize strata
+        int numberOfStrata = NumberOfStrataParameter.ActualValue.Value;
+        var strata = new ItemList<ItemList<IntValue>>(numberOfStrata);
+        for (int i = 0; i < numberOfStrata; i++) {
+          strata.Add(new ItemList<IntValue>());
+        }
+
+        //get all rows for every niche
+        var problemData = ProblemDataParameter.ActualValue;
+        IntRange evaluate = ProblemDataParameter.ActualValue.TrainingPartition;
+        Dictionary<IGAssistNiche, List<int>> nicheRows = null;
+        for (int row = evaluate.Start; row < evaluate.End; row++) {
+          if (problemData.IsTrainingSample(row)) {
+            var niche = problemData.FetchAction(row);
+            if (nicheRows == null) {
+              nicheRows = new Dictionary<IGAssistNiche, List<int>>(niche.Comparer);
+            }
+            if (!nicheRows.ContainsKey(niche)) {
+              nicheRows.Add(niche, new List<int>());
+            }
+            nicheRows[niche].Add(row);
+          }
+        }
+
+        //distribute niches to strata
+        var random = RandomParameter.ActualValue;
+        foreach (var niche in nicheRows.Keys) {
+          var rows = nicheRows[niche];
+          int count = 0;
+          while (rows.Count > 0) {
+            int pos = random.Next(rows.Count);
+            strata[count % numberOfStrata].Add(new IntValue(rows[pos]));
+            rows.RemoveAt(pos);
+            count++;
+          }
+        }
+
+        StrataParameter.ActualValue = strata;
+      }
+      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 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistIndividual.cs	(revision 9392)
@@ -30,4 +30,6 @@
     void ApplyMerge(IRandom random, double probability);
     void ApplyReinitialize(IRandom random, double probability, double oneProbability, IEnumerable<IDiscretizer> discretizers);
+
+    IGAssistSolution CreateGAssistSolution(IGAssistNichesProblemData problemData);
   }
 }
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistInput.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistInput.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistInput.cs	(revision 9392)
@@ -0,0 +1,30 @@
+﻿#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 System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IGAssistInput : IItem {
+    IEnumerable<string> VariableNames { get; }
+    string GetVariableValue(string variableName);
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolution.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolution.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IGAssistSolution.cs	(revision 9392)
@@ -0,0 +1,33 @@
+﻿#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.Core;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IGAssistSolution : IItem {
+    double TrainingAccuracy { get; }
+    double TestAccuracy { get; }
+    int TrainingNumberOfAliveRules { get; }
+    double TrainingTheoryLength { get; }
+    double TrainingExceptionsLength { get; }
+    int Classes { get; }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IStrataSingleObjectiveEvaluator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IStrataSingleObjectiveEvaluator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/Interfaces/IStrataSingleObjectiveEvaluator.cs	(revision 9392)
@@ -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 {
+  public interface IStrataSingleObjectiveEvaluator : ISingleObjectiveEvaluator {
+    ILookupParameter<ItemList<ItemList<IntValue>>> StrataParameter { get; }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/BestSolutionCreator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/BestSolutionCreator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/BestSolutionCreator.cs	(revision 9392)
@@ -0,0 +1,71 @@
+﻿#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 System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [Item("BestSolutionCreator", "Description missing")]
+  [StorableClass]
+  public class BestSolutionCreator : SingleSuccessorOperator {
+
+    #region Parameter Properties
+    public IValueLookupParameter<IGAssistSolution> SolutionParameter {
+      get { return (IValueLookupParameter<IGAssistSolution>)Parameters["Solution"]; }
+    }
+    public ScopeTreeLookupParameter<IGAssistIndividual> IndividualParameter {
+      get { return (ScopeTreeLookupParameter<IGAssistIndividual>)Parameters["Individual"]; }
+    }
+    public LookupParameter<IGAssistNichesProblemData> ProblemDataParameter {
+      get { return (LookupParameter<IGAssistNichesProblemData>)Parameters["ProblemData"]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected BestSolutionCreator(bool deserializing) : base(deserializing) { }
+    public BestSolutionCreator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IGAssistIndividual>("Solution", ""));
+      Parameters.Add(new ScopeTreeLookupParameter<IGAssistIndividual>("Individual", ""));
+      Parameters.Add(new LookupParameter<IGAssistNichesProblemData>("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 IOperation Apply() {
+      var qualities = QualityParameter.ActualValue;
+      var bestQuality = MaximizationParameter.ActualValue.Value ? qualities.Max() : qualities.Min();
+      int index = qualities.IndexOf(bestQuality);
+      SolutionParameter.ActualValue = IndividualParameter.ActualValue[index].CreateGAssistSolution(ProblemDataParameter.ActualValue);
+      return base.Apply();
+    }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/IMDLCalculatorBasedOperator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/IMDLCalculatorBasedOperator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/IMDLCalculatorBasedOperator.cs	(revision 9392)
@@ -0,0 +1,28 @@
+﻿#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.Core;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  public interface IMDLCalculatorBasedOperator : IItem {
+    ILookupParameter<MDLCalculator> MDLCalculatorParameter { get; }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLCalculator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLCalculator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLCalculator.cs	(revision 9392)
@@ -0,0 +1,143 @@
+﻿#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.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [StorableClass]
+  [Item("MDLCalculator", "")]
+  public class MDLCalculator : Item {
+
+    [Storable]
+    private int activationIteration;
+
+    [Storable]
+    private bool activated;
+    [Storable]
+    private bool fixedWeight;
+
+    [Storable]
+    private double theoryWeight;
+
+    [Storable]
+    private double initialTheoryLengthRatio;
+    [Storable]
+    private double weightRelaxFactor;
+
+    [Storable]
+    private IList<double> accuracyStatistic;
+    [Storable]
+    private int iterationsSinceBest;
+    [Storable]
+    private double bestFitness;
+
+    [Storable]
+    private int weightAdaptionIterations;
+
+    [StorableConstructor]
+    protected MDLCalculator(bool deserializing) : base(deserializing) { }
+    protected MDLCalculator(MDLCalculator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public MDLCalculator(int activationIteration, double initialTheoryLengthRatio, double weightRelaxFactor, int weightAdaptionIterations)
+      : base() {
+      this.activationIteration = activationIteration;
+      this.initialTheoryLengthRatio = initialTheoryLengthRatio;
+      this.weightRelaxFactor = weightRelaxFactor;
+      this.weightAdaptionIterations = weightAdaptionIterations;
+      activated = false;
+      fixedWeight = false;
+      accuracyStatistic = new List<double>();
+      iterationsSinceBest = 0;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MDLCalculator(this, cloner);
+    }
+
+    public void StartNewIteration(IGAssistSolution bestSolution, int currentIteration) {
+      if (currentIteration == activationIteration) {
+        activated = true;
+        double error = bestSolution.TrainingExceptionsLength;
+        double tl = (bestSolution.TrainingTheoryLength * bestSolution.Classes) / bestSolution.TrainingNumberOfAliveRules;
+        theoryWeight = (initialTheoryLengthRatio / (1.0 - initialTheoryLengthRatio)) * (error / tl);
+        iterationsSinceBest = 0;
+      }
+
+      if (activated && !fixedWeight &&
+        GetLastIterationsAccuracyAverage(weightAdaptionIterations) == 1.0) {
+        fixedWeight = true;
+      }
+
+      if (activated && !fixedWeight) {
+        if (bestSolution.TrainingAccuracy != 1.0) {
+          if (iterationsSinceBest == weightAdaptionIterations) {
+            theoryWeight *= weightRelaxFactor;
+            iterationsSinceBest = 0;
+          }
+        }
+      }
+
+      //if (currentIteration != 0) {
+      UpdateStatistic(bestSolution.TrainingAccuracy);
+      //}
+    }
+
+    private void UpdateStatistic(double accuracy) {
+      if (iterationsSinceBest == 0) {
+        bestFitness = accuracy;
+        iterationsSinceBest++;
+      } else if (accuracy > bestFitness) {
+        bestFitness = accuracy;
+        iterationsSinceBest = 1;
+      } else {
+        iterationsSinceBest++;
+      }
+    }
+
+    private double GetLastIterationsAccuracyAverage(int iterations) {
+      int startAt = accuracyStatistic.Count - iterations;
+      startAt = startAt > 0 ? startAt : 0;
+      return accuracyStatistic.Skip(startAt).Sum() / (accuracyStatistic.Count - startAt);
+    }
+
+    public double CalculateFitness(IGAssistSolution dls) {
+      double fitness = 0;
+      if (activated) {
+        fitness = dls.TrainingTheoryLength * theoryWeight;
+      }
+      fitness += 105.0 - dls.TrainingAccuracy * 100.0;
+      return fitness;
+    }
+
+    public double CalculateFitness(double theoryLength, double accuracy) {
+      double fitness = 0;
+      if (activated) {
+        fitness = theoryLength * theoryWeight;
+      }
+      fitness += 105.0 - accuracy * 100.0;
+      return fitness;
+    }
+  }
+}
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLIterationOperator.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLIterationOperator.cs	(revision 9392)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/MDL/MDLIterationOperator.cs	(revision 9392)
@@ -0,0 +1,109 @@
+﻿#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.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Operators.LCS {
+  [Item("MDLIterationOperator", "Description missing")]
+  [StorableClass]
+  public class MDLIterationOperator : SingleSuccessorOperator {
+
+    #region Parameter Properties
+    public IValueLookupParameter<MDLCalculator> MDLCalculatorParameter {
+      get { return (IValueLookupParameter<MDLCalculator>)Parameters["MDLCalculator"]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    public ILookupParameter<IntValue> MDLActivationIterationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MDLActivationIteration"]; }
+    }
+    public ILookupParameter<DoubleValue> InitialTheoryLengthRatioParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["InitialTheoryLengthRatio"]; }
+    }
+    public ILookupParameter<DoubleValue> WeightRelaxFactorParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["WeightRelaxFactor"]; }
+    }
+    public ILookupParameter<IntValue> WeightAdaptionIterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["WeightAdaptionIterations"]; }
+    }
+
+    public ScopeTreeLookupParameter<IGAssistIndividual> IndividualParameter {
+      get { return (ScopeTreeLookupParameter<IGAssistIndividual>)Parameters["Individual"]; }
+    }
+    public LookupParameter<IGAssistNichesProblemData> ProblemDataParameter {
+      get { return (LookupParameter<IGAssistNichesProblemData>)Parameters["ProblemData"]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected MDLIterationOperator(bool deserializing) : base(deserializing) { }
+    protected MDLIterationOperator(MDLIterationOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public MDLIterationOperator()
+      : base() {
+      Parameters.Add(new LookupParameter<IntValue>("Iterations", ""));
+      Parameters.Add(new ValueLookupParameter<MDLCalculator>("MDLCalculator", ""));
+      Parameters.Add(new LookupParameter<IntValue>("MDLActivationIteration", ""));
+      Parameters.Add(new LookupParameter<DoubleValue>("InitialTheoryLengthRatio", ""));
+      Parameters.Add(new LookupParameter<DoubleValue>("WeightRelaxFactor", ""));
+      Parameters.Add(new LookupParameter<IntValue>("WeightAdaptionIterations", ""));
+
+      Parameters.Add(new ScopeTreeLookupParameter<IGAssistIndividual>("Individual", ""));
+      Parameters.Add(new LookupParameter<IGAssistNichesProblemData>("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 MDLIterationOperator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      if (MDLCalculatorParameter.ActualValue == null) {
+        MDLCalculatorParameter.ActualValue = new MDLCalculator(MDLActivationIterationParameter.ActualValue.Value,
+                                                               InitialTheoryLengthRatioParameter.ActualValue.Value,
+                                                               WeightRelaxFactorParameter.ActualValue.Value,
+                                                               WeightAdaptionIterationsParameter.ActualValue.Value);
+      } else {
+        var qualities = QualityParameter.ActualValue;
+        var bestQuality = MaximizationParameter.ActualValue.Value ? qualities.Max() : qualities.Min();
+        int index = qualities.IndexOf(bestQuality);
+        var dls = IndividualParameter.ActualValue[index].CreateGAssistSolution(ProblemDataParameter.ActualValue);
+
+        MDLCalculatorParameter.ActualValue.StartNewIteration(dls, IterationsParameter.ActualValue.Value);
+      }
+      return base.Apply();
+    }
+  }
+}
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 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/HeuristicLab.Optimization.Operators.LCS-3.3.csproj	(revision 9392)
@@ -89,4 +89,5 @@
   <ItemGroup>
     <Compile Include="DefaultRule\AutoDefaultRule.cs" />
+    <Compile Include="Discretizer\InitializeDiscretizersOperator.cs" />
     <Compile Include="GAssist\IGAssistNichesProblemData.cs" />
     <Compile Include="DefaultRule\MajorDefaultRule.cs" />
@@ -98,9 +99,16 @@
     <Compile Include="Discretizer\IDiscretizer.cs" />
     <Compile Include="GAssist\IGAssistProblem.cs" />
+    <Compile Include="GAssist\ILAS\ILASOperator.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistIndividual.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistIndividualCreator.cs" />
+    <Compile Include="GAssist\Interfaces\IGAssistInput.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistNiche.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistNicheEqualityComparer.cs" />
+    <Compile Include="GAssist\Interfaces\IGAssistSolution.cs" />
     <Compile Include="GAssist\Interfaces\IGAssistSpecialStage.cs" />
+    <Compile Include="GAssist\Interfaces\IStrataSingleObjectiveEvaluator.cs" />
+    <Compile Include="GAssist\MDL\IMDLCalculatorBasedOperator.cs" />
+    <Compile Include="GAssist\MDL\MDLCalculator.cs" />
+    <Compile Include="GAssist\MDL\MDLIterationOperator.cs" />
     <Compile Include="GAssist\SpecialStage\GAssistSpecialStageMultiOperator.cs" />
     <Compile Include="GAssist\SpecialStage\GAssistSpecialStageOperator.cs" />
@@ -124,4 +132,8 @@
       <Name>HeuristicLab.Core-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
+      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/Selection/NichingTournamentSelector.cs	(revision 9392)
@@ -88,15 +88,18 @@
 
       int parentsPerChild = ParentsPerChildParameter.ActualValue.Value;
-      var possibleNiches = GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().ToList();
-      var selectPerNiche = new Dictionary<IGAssistNiche, int>(possibleNiches.First().Comparer);
+      var nicheComparer = GAssistNichesProblemDataParameter.ActualValue.GetPossibleNiches().First().Comparer;
+      var selectPerNiche = new Dictionary<IGAssistNiche, int>(nicheComparer);
+      var nicheScope = new Dictionary<IGAssistNiche, List<int>>(nicheComparer);
 
-      var nicheScope = new Dictionary<IGAssistNiche, List<int>>(possibleNiches.First().Comparer);
-      foreach (var niche in possibleNiches) {
-        nicheScope.Add(niche, new List<int>());
-        selectPerNiche.Add(niche, count / possibleNiches.Count);
+      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);
       }
 
-      for (int i = 0; i < individuals.Count; i++) {
-        nicheScope[individuals[i].Niche].Add(i);
+      var possibleNiches = nicheScope.Keys.ToList();
+      foreach (var niche in possibleNiches) {
+        selectPerNiche.Add(niche, count / possibleNiches.Count);
       }
 
@@ -144,11 +147,11 @@
     }
 
-    private IGAssistNiche GetNiche(IRandom random, Dictionary<IGAssistNiche, int> nicheScope, List<IGAssistNiche> possibleNiches) {
-      int sum = nicheScope.Values.Sum();
+    private IGAssistNiche GetNiche(IRandom random, Dictionary<IGAssistNiche, int> selectPerNiche, List<IGAssistNiche> possibleNiches) {
+      int sum = selectPerNiche.Values.Sum();
       if (sum <= 0) { return possibleNiches[random.Next(possibleNiches.Count)]; }
       int pos = random.Next(sum);
       int total = 0;
-      IGAssistNiche niche = nicheScope.Keys.First();
-      foreach (var item in nicheScope) {
+      IGAssistNiche niche = selectPerNiche.Keys.First();
+      foreach (var item in selectPerNiche) {
         total += item.Value;
         niche = item.Key;
Index: /branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblemData.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblemData.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblemData.cs	(revision 9392)
@@ -126,10 +126,5 @@
       if (allowedConditionVariables == null) throw new ArgumentNullException("The allowedActionVariables must not be null.");
 
-      if (allowedActionVariables.Except(dataset.DoubleVariables).Any())
-        throw new ArgumentException("All allowed action variables must be present in the dataset and of type double.");
-      if (allowedConditionVariables.Except(dataset.DoubleVariables).Any())
-        throw new ArgumentException("All allowed condition variables must be present in the dataset and of type double.");
-
-      var actionVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Select(x => new StringValue(x)));
+      var actionVariables = new CheckedItemList<StringValue>(dataset.VariableNames.Select(x => new StringValue(x)));
       var conditionVariables = new CheckedItemList<StringValue>(actionVariables);
       foreach (StringValue x in actionVariables) {
Index: /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblem.cs	(revision 9392)
@@ -62,7 +62,4 @@
       get { return (IFixedValueParameter<IntValue>)Parameters["SizePenaltyMinRules"]; }
     }
-    public IFixedValueParameter<IntValue> ActivationIterationParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters["ActivationIteration"]; }
-    }
     public IFixedValueParameter<DoubleValue> InitialTheoryLengthRatioParameter {
       get { return (IFixedValueParameter<DoubleValue>)Parameters["InitialTheoryLengthRatio"]; }
@@ -88,4 +85,7 @@
     }
 
+    IStrataSingleObjectiveEvaluator IGAssistProblem.Evaluator {
+      get { return Evaluator; }
+    }
     IDecisionListEvaluator IDecisionListClassificationProblem.Evaluator {
       get { return Evaluator; }
@@ -101,4 +101,7 @@
       : base(original, cloner) {
     }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DecisionListClassificationProblem(this, cloner);
+    }
 
     public DecisionListClassificationProblem()
@@ -113,12 +116,7 @@
       Parameters.Add(new FixedValueParameter<DoubleValue>("BestKnownQuality", "", new DoubleValue(0.5)));
       Parameters.Add(new FixedValueParameter<IntValue>("SizePenaltyMinRules", "", new IntValue(4)));
-      Parameters.Add(new FixedValueParameter<IntValue>("ActivationIteration", "", new IntValue(25)));
-      Parameters.Add(new FixedValueParameter<DoubleValue>("InitialTheoryLengthRatio", "", new DoubleValue(0.075)));
-      Parameters.Add(new FixedValueParameter<DoubleValue>("WeightRelaxFactor", "", new DoubleValue(0.9)));
       Parameters.Add(new FixedValueParameter<PercentValue>("ActionMutationProbability", "", new PercentValue(0.1)));
 
       Evaluator.SizePenaltyMinRulesParameter.ActualName = "SizePenaltyMinRules";
-      // do differently
-      ((MDLEvaluator)Evaluator).MDLCalculatorParameter.Value = new MDLCalculator(ActivationIterationParameter.Value.Value, InitialTheoryLengthRatioParameter.Value.Value, WeightRelaxFactorParameter.Value.Value);
 
       InitializeOperators();
@@ -169,7 +167,4 @@
       }
     }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new DecisionListClassificationProblem(this, cloner);
-    }
 
     IParameter IGAssistProblem.ProblemDataParameter {
Index: /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Problems.DecisionListClassification/3.3/DecisionListClassificationProblemData.cs	(revision 9392)
@@ -214,5 +214,5 @@
     }
 
-    public IEnumerable<DecisionListInput> FetchInput(IEnumerable<int> rows) {
+    public IEnumerable<IGAssistInput> FetchInput(IEnumerable<int> rows) {
       foreach (var row in rows) {
         yield return FetchInput(row);
@@ -221,5 +221,5 @@
 
     protected IDictionary<int, DecisionListInput> fetchInputCache = new Dictionary<int, DecisionListInput>();
-    public DecisionListInput FetchInput(int row) {
+    public IGAssistInput FetchInput(int row) {
       if (!fetchInputCache.ContainsKey(row)) {
         DecisionListInput input = new DecisionListInput();
@@ -234,5 +234,5 @@
     }
 
-    public IEnumerable<IAction> FetchAction(IEnumerable<int> rows) {
+    public IEnumerable<IGAssistNiche> FetchAction(IEnumerable<int> rows) {
       foreach (var row in rows) {
         yield return FetchAction(row);
@@ -240,5 +240,5 @@
     }
     protected IDictionary<int, IAction> fetchActionCache = new Dictionary<int, IAction>();
-    public IAction FetchAction(int row) {
+    public IGAssistNiche FetchAction(int row) {
       if (!fetchActionCache.ContainsKey(row)) {
         var action = (IAction)SampleRuleParameter.Value.Action.Clone();
Index: /branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/VariableVectorClassificationProblemData.cs
===================================================================
--- /branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/VariableVectorClassificationProblemData.cs	(revision 9391)
+++ /branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/VariableVectorClassificationProblemData.cs	(revision 9392)
@@ -89,5 +89,5 @@
         } else if (variableValues is List<double>) {
           var doubleValues = (variableValues as List<double>).Distinct();
-          if (doubleValues.All(x => x % 1 == 0)) {
+          if (doubleValues.All(x => x % 1 == 0 || Double.IsNaN(x))) {
             // ToList call is necessary, because otherwise it wouldn't be possible to serialize it
             variable = new IntVariable(variableName, doubleValues.Select(x => Convert.ToInt32(x)).ToList());
Index: /branches/LearningClassifierSystems/LearningClassifierSystem.sln
===================================================================
--- /branches/LearningClassifierSystems/LearningClassifierSystem.sln	(revision 9391)
+++ /branches/LearningClassifierSystems/LearningClassifierSystem.sln	(revision 9392)
@@ -184,3 +184,6 @@
 		HideSolutionNode = FALSE
 	EndGlobalSection
+	GlobalSection(Performance) = preSolution
+		HasPerformanceSessions = true
+	EndGlobalSection
 EndGlobal
