Changeset 9467


Ignore:
Timestamp:
05/08/13 14:12:00 (5 years ago)
Author:
sforsten
Message:

#1980:

  • added ProportionalTournamentSelector for XCS
  • fixed bug: if an initial population is created in XCS, the initial population also creates general classifier, not only specific ones
  • merged r9204:9466 HeuristicLab.Core from trunk to branch
Location:
branches/LearningClassifierSystems
Files:
3 added
101 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems

  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystem.cs

    r9242 r9467  
    118118      get { return (ValueParameter<IntValue>)Parameters["MaxIterations"]; }
    119119    }
     120    public IConstrainedValueParameter<ISelector> SelectorParameter {
     121      get { return (IConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
     122    }
    120123    public IConstrainedValueParameter<ICrossover> CrossoverParameter {
    121124      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
     
    213216      get { return FinalAnalyzerParameter.Value; }
    214217      set { FinalAnalyzerParameter.Value = value; }
     218    }
     219    public ISelector Selector {
     220      get { return SelectorParameter.Value; }
     221      set { SelectorParameter.Value = value; }
    215222    }
    216223    public ICrossover Crossover {
     
    254261      Parameters.Add(new ValueParameter<MultiAnalyzer>("FinalAnalyzer", "The operator used to analyze the last generation.", new MultiAnalyzer()));
    255262      Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "The maximum number of iterations.", new IntValue(1000)));
     263      Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions."));
    256264      Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions."));
    257265      Parameters.Add(new ConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
     
    276284      mainLoop.FinalAnalyzerParameter.ActualName = FinalAnalyzerParameter.Name;
    277285      mainLoop.MaxIterationsParameter.ActualName = MaxIterationsParameter.Name;
     286      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
    278287      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
    279288      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
     
    303312        ParameterizeEvaluator(Problem.Evaluator);
    304313        MainLoop.SetCurrentProblem(Problem);
     314        UpdateSelectors();
    305315        UpdateCrossovers();
    306316        UpdateMutators();
    307317        UpdateAnalyzers();
     318        ParameterizeSelectors();
    308319        ParameterizeManipulator();
    309320      }
     
    311322    }
    312323
    313     private void ParameterizeManipulator() {
    314       foreach (var op in Problem.Operators.OfType<IProbabilityMutatorOperator>()) {
    315         op.ProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
    316       }
    317     }
    318324    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
    319325      ParameterizeEvaluator(Problem.Evaluator);
     
    326332    }
    327333    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
     334      UpdateSelectors();
    328335      UpdateCrossovers();
    329336      UpdateMutators();
    330337      UpdateAnalyzers();
     338      ParameterizeSelectors();
    331339      ParameterizeManipulator();
    332340      base.Problem_OperatorsChanged(sender, e);
    333341    }
    334342
     343    private void ParameterizeSelectors() {
     344      foreach (ISelector selector in SelectorParameter.ValidValues) {
     345        selector.CopySelected = new BoolValue(true);
     346        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(4);
     347        selector.NumberOfSelectedSubScopesParameter.Hidden = true;
     348        ParameterizeStochasticOperator(selector);
     349      }
     350      if (Problem != null) {
     351        foreach (IXCSSelector selector in SelectorParameter.ValidValues.OfType<IXCSSelector>()) {
     352          selector.NumerosityParameter.ActualName = Problem.Evaluator.NumerosityParameter.ActualName;
     353          selector.NumerosityParameter.Hidden = true;
     354        }
     355        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
     356          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     357          selector.MaximizationParameter.Hidden = true;
     358          selector.QualityParameter.ActualName = Problem.Evaluator.FitnessParameter.ActualName;
     359          selector.QualityParameter.Hidden = true;
     360        }
     361      }
     362    }
     363    private void ParameterizeManipulator() {
     364      foreach (var op in Problem.Operators.OfType<IProbabilityMutatorOperator>()) {
     365        op.ProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
     366      }
     367    }
    335368    private void ParameterizeEvaluator(IXCSEvaluator evaluator) {
    336369      evaluator.ActualTimeParameter.ActualName = "Iteration";
     
    339372      evaluator.PowerParameter.ActualName = PowerParameter.Name;
    340373      evaluator.ErrorZeroParameter.ActualName = ErrorZeroParameter.Name;
     374    }
     375    private void ParameterizeStochasticOperator(IOperator op) {
     376      IStochasticOperator stochasticOp = op as IStochasticOperator;
     377      if (stochasticOp != null) {
     378        stochasticOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
     379        stochasticOp.RandomParameter.Hidden = true;
     380      }
     381    }
     382
     383    private void UpdateSelectors() {
     384      ISelector oldSelector = SelectorParameter.Value;
     385      SelectorParameter.ValidValues.Clear();
     386      ISelector defaultSelector = Problem.Operators.OfType<IXCSSelector>().FirstOrDefault();
     387      if (defaultSelector == null) {
     388        defaultSelector = Problem.Operators.OfType<ISelector>().FirstOrDefault();
     389      }
     390
     391      foreach (ISelector selector in Problem.Operators.OfType<ISelector>().OrderBy(x => x.Name))
     392        SelectorParameter.ValidValues.Add(selector);
     393
     394      if (oldSelector != null) {
     395        ISelector selector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
     396        if (selector != null) SelectorParameter.Value = selector;
     397        else oldSelector = null;
     398      }
     399      if (oldSelector == null && defaultSelector != null)
     400        SelectorParameter.Value = defaultSelector;
    341401    }
    342402
  • branches/LearningClassifierSystems/HeuristicLab.Algorithms.LearningClassifierSystems/3.3/LearningClassifierSystemMainLoop.cs

    r9242 r9467  
    2525using HeuristicLab.Encodings.ConditionActionEncoding;
    2626using HeuristicLab.Operators;
    27 using HeuristicLab.Optimization;
    2827using HeuristicLab.Optimization.Operators;
    2928using HeuristicLab.Parameters;
     
    4241
    4342    #region Parameter Properties
    44     public IConstrainedValueParameter<ISelector> SelectorParameter {
    45       get { return (IConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
     43    public ValueLookupParameter<IOperator> SelectorParameter {
     44      get { return adaptedGeneticAlgorithmMainLoop.SelectorParameter; }
    4645    }
    4746    public ValueLookupParameter<PercentValue> CrossoverProbabilityParameter {
     
    108107    private void Initialize() {
    109108      #region Create parameters
    110       Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions for reproduction.", new ItemSet<ISelector>() { new ProportionalSelector() }, new ProportionalSelector()));
    111109      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
    112110      XCSAfterCopyingParentOperator afterCopyingParents = new XCSAfterCopyingParentOperator();
     
    273271      subsumptionSelector.CopySelected = new BoolValue(false);
    274272
    275       SelectorParameter.Value.CopySelected = new BoolValue(true);
    276       SelectorParameter.Value.NumberOfSelectedSubScopesParameter.Value = new IntValue(4);
    277 
    278273      evaluator.Name = "Evaluator";
    279274
     
    320315      afterCrossover.ParentAverageActionSetSizeParameter.ActualName = "AverageActionSetSize";
    321316
    322       adaptedGeneticAlgorithmMainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
    323317      adaptedGeneticAlgorithmMainLoop.RandomParameter.ActualName = "Random";
    324318      adaptedGeneticAlgorithmMainLoop.MaximumGenerationsParameter.ActualName = "ZeroIntValue";
     
    428422    }
    429423
    430     private void ParameterizeStochasticOperator(IOperator op) {
    431       IStochasticOperator stochasticOp = op as IStochasticOperator;
    432       if (stochasticOp != null) {
    433         stochasticOp.RandomParameter.ActualName = "Random";
    434         stochasticOp.RandomParameter.Hidden = true;
    435       }
    436     }
    437 
    438424    internal void SetCurrentProblem(IConditionActionProblem problem) {
    439425      initialSolutionsCreator.SolutionCreatorParameter.ActualName = problem.SolutionCreatorParameter.Name;
     
    485471      adaptedGeneticAlgorithmMainLoop.SetChildName(problem.ChildName);
    486472    }
    487     //private void ParameterizeSelectors() {
    488     //  foreach (ISelector selector in SelectorParameter.ValidValues) {
    489     //    selector.CopySelected = new BoolValue(true);
    490     //    //set value by parameter!
    491     //    selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(5);
    492     //    selector.NumberOfSelectedSubScopesParameter.Hidden = true;
    493     //    ParameterizeStochasticOperator(selector);
    494     //  }
    495     //  if (Problem != null) {
    496     //    foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
    497     //      selector.MaximizationParameter.Value = new BoolValue(true);
    498     //      selector.MaximizationParameter.Hidden = true;
    499     //      selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    500     //      selector.QualityParameter.Hidden = true;
    501     //    }
    502     //  }
    503     //}
    504473  }
    505474}
  • branches/LearningClassifierSystems/HeuristicLab.Core

  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Attributes/CreatableAttribute.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ConstraintCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ItemArray.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs

    r9194 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ItemList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ItemSet.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/OperationCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/OperatorCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/OperatorList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/OperatorSet.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ParameterCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs

    r8610 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ScopeList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/ValueParameterCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Collections/VariableCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/ComparisonConstraint.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/Constraint.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/EqualityConstraint.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/IConstraint.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Constraints/TypeCompatibilityConstraint.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Engine.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    145145
    146146      OnStarted();
    147       lastUpdateTime = DateTime.Now;
     147      lastUpdateTime = DateTime.UtcNow;
    148148      System.Timers.Timer timer = new System.Timers.Timer(250);
    149149      timer.AutoReset = true;
     
    156156        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
    157157        timer.Stop();
    158         ExecutionTime += DateTime.Now - lastUpdateTime;
     158        ExecutionTime += DateTime.UtcNow - lastUpdateTime;
    159159      }
    160160
     
    166166      System.Timers.Timer timer = (System.Timers.Timer)sender;
    167167      timer.Enabled = false;
    168       DateTime now = DateTime.Now;
     168      DateTime now = DateTime.UtcNow;
    169169      ExecutionTime += now - lastUpdateTime;
    170170      lastUpdateTime = now;
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Executable.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/ExecutionContext.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/ExecutionState.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IAtomicOperation.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/ICheckedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/ICheckedItemList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/ICheckedMultiOperator.cs

    r9151 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IConstrainedValueParameter.cs

    r8121 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IEngine.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IExecutable.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IFixedValueParameter.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItemArray.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItemDictionary.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItemList.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IItemSet.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IKeyedItemCollection.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/ILog.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs

    r9204 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IMultiOperator.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/INamedItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IOperation.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IOperator.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IParameter.cs

    r9204 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IParameterizedNamedItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IRandom.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IScope.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IScopeTreeLookupParameter.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IStatefulItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IValueLookupParameter.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IValueParameter.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Interfaces/IVariable.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Item.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Log.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/NamedItem.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/OperatorExecutionException.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
     23using System.Diagnostics;
    2324
    2425namespace HeuristicLab.Core {
    2526  public class OperatorExecutionException : Exception {
    26     private IOperator op;
     27    private readonly IOperator op;
    2728    public IOperator Operator {
    2829      get { return op; }
    2930    }
     31
     32    private readonly string message;
    3033    public override string Message {
    3134      get {
    3235        string name = "\"" + op.Name + "\"";
    3336        if (!op.Name.Equals(op.ItemName)) name += " (" + op.ItemName + ")";
    34 
     37        if (!string.IsNullOrEmpty(op.GetType().Assembly.Location)) {
     38          var fvi = FileVersionInfo.GetVersionInfo(op.GetType().Assembly.Location);
     39          name += " [" + fvi.FileName + ": " + fvi.FileVersion + "]";
     40        }
    3541        if (InnerException == null)
    36           return base.Message + name + ".";
     42          return base.Message + name + message + ".";
    3743        else
    3844          return base.Message + name + ": " + InnerException.Message;
     
    4046    }
    4147
    42     public OperatorExecutionException(IOperator op)
     48    public OperatorExecutionException(IOperator op) : this(op, string.Empty) { }
     49    public OperatorExecutionException(IOperator op, string message)
    4350      : base("An exception was thrown by the operator ") {
    4451      if (op == null) throw new ArgumentNullException();
    4552      this.op = op;
     53      this.message = message;
    4654    }
    4755    public OperatorExecutionException(IOperator op, Exception innerException)
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/OperatorGraph.cs

    r9178 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs

    r7706 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/PersistenceContentManager.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Plugin.cs.frame

    r8246 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2929  /// Plugin class for HeuristicLab.Core plugin.
    3030  /// </summary>
    31   [Plugin("HeuristicLab.Core", "3.3.7.$WCREV$")]
     31  [Plugin("HeuristicLab.Core", "3.3.8.$WCREV$")]
    3232  [PluginFile("HeuristicLab.Core-3.3.dll", PluginFileType.Assembly)]
    3333  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Properties/AssemblyInfo.cs.frame

    r8246 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
     
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
     56[assembly: AssemblyFileVersion("3.3.8.$WCREV$")]
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Scope.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/ThreadSafeLog.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Core/3.3/Variable.cs

    r7259 r9467  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/HeuristicLab.Encodings.ConditionActionEncoding-3.3.csproj

    r9411 r9467  
    120120    <Compile Include="Interfaces\IConditionActionSolution.cs" />
    121121    <Compile Include="Interfaces\IXCSModel.cs" />
     122    <Compile Include="Interfaces\IXCSSelector.cs" />
    122123    <Compile Include="Interfaces\IXCSSolution.cs" />
    123124    <Compile Include="Manipulator\IProbabilityMutatorOperator.cs" />
     
    137138    <Compile Include="Reinforcement\IActionExecuter.cs" />
    138139    <Compile Include="Reinforcement\IClassifierFetcher.cs" />
     140    <Compile Include="Selection\ProportionalTournamentSelector.cs" />
    139141    <Compile Include="Subsumption\ActionSetSubsumptionOperator.cs" />
    140142    <Compile Include="Subsumption\CheckGASubsumptionOperator.cs" />
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Interfaces/IConditionActionProblem.cs

    r9411 r9467  
    2828    string ChildName { get; }
    2929
     30    IParameter MaximizationParameter { get; }
     31
    3032    new IConditionActionProblemData ProblemData { get; }
    3133    IParameter ActionExecuterParameter { get; }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Creators/UniformRandomVariableVectorCreator.cs

    r9226 r9467  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
     25using HeuristicLab.Parameters;
    2426using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2527
     
    3032
    3133    #region Parameter Properties
     34    public ILookupParameter<PercentValue> ChangeSymbolProbabilityParameter {
     35      get { return (ILookupParameter<PercentValue>)Parameters["ChangeSymbolProbability"]; }
     36    }
    3237    #endregion
    3338
     
    3944    public UniformRandomVariableVectorCreator()
    4045      : base() {
     46        Parameters.Add(new LookupParameter<PercentValue>("ChangeSymbolProbability"));
    4147    }
    4248    public override IDeepCloneable Clone(Cloner cloner) {
     
    4652    protected override VariableVector Create(IRandom random, VariableVector sampleVariableVector, double spreadPercentage) {
    4753      var result = sampleVariableVector.GetEmptyCopy();
    48       result.Randomize(random, spreadPercentage);
     54      result.Randomize(random, ChangeSymbolProbabilityParameter.ActualValue.Value, spreadPercentage);
    4955      return result;
    5056    }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/DoubleVariable.cs

    r9392 r9467  
    112112    }
    113113
    114     // Important! If this mehtod is called instead of the more concrete "Randomize(IRandom random, double spreadPercentage)"
    115     // spread percentage is 50%
    116     public override void Randomize(IRandom random) {
    117       Randomize(random, 50);
     114    // this method is not implemented on purpose, because it may lead to confusion or errors if the wrong parameter would be used (changeSymbolProbability instead of spreadPercentage)
     115    public override void Randomize(IRandom random, double changeSymbolProbability) {
     116      throw new NotImplementedException("The method DoubleVariable.Randomize(IRandom, double) should not be used. Use DoubleVariable.Randomize(IRandom, double, double) instead.");
    118117    }
    119118
    120     public void Randomize(IRandom random, double spreadPercentage) {
     119    // changeSymbolProbability is not used on purpose
     120    public void Randomize(IRandom random, double changeSymbolProbability, double spreadPercentage) {
    121121      if (spreadPercentage < 0 || spreadPercentage > 100) {
    122122        throw new ArgumentException("Spread percentage has to be between 0 and 100.");
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IActionVariable.cs

    r9226 r9467  
    2121
    2222using System.Collections.Generic;
     23using HeuristicLab.Core;
    2324
    2425namespace HeuristicLab.Encodings.VariableVector {
     
    3031    void SetTo(string value);
    3132    IEnumerable<string> GetAllPossibleActions();
     33
     34    void RandomizeAction(IRandom random);
    3235  }
    3336}
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IVariable.cs

    r9242 r9467  
    3333    IVariable GetSetCopy();
    3434
    35     void Randomize(IRandom random);
     35    void Randomize(IRandom random, double changeSymbolProbability);
    3636    bool MatchInput(string target);
    3737    bool MatchVariable(IVariable target);
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/IntVariable.cs

    r9392 r9467  
    122122    }
    123123
    124     public override void Randomize(IRandom random) {
     124    public void RandomizeAction(IRandom random) {
     125      int index = random.Next(possibleFeatures.Count());
     126      currentValue = possibleFeatures.ElementAt(index);
     127    }
     128
     129    public override void Randomize(IRandom random, double changeSymbolProbability) {
     130      Wildcard = random.NextDouble() < changeSymbolProbability;
    125131      int index = random.Next(possibleFeatures.Count());
    126132      currentValue = possibleFeatures.ElementAt(index);
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/StringVariable.cs

    r9392 r9467  
    167167    }
    168168
    169     public override void Randomize(IRandom random) {
     169    public void RandomizeAction(IRandom random) {
     170      int index = random.Next(possibleFeatures.Count());
     171      currentValue = possibleFeatures.ElementAt(index);
     172    }
     173
     174    public override void Randomize(IRandom random, double changeSymbolProbability) {
     175      Wildcard = random.NextDouble() < changeSymbolProbability;
    170176      int index = random.Next(possibleFeatures.Count());
    171177      currentValue = possibleFeatures.ElementAt(index);
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/Variable/Variable.cs

    r9242 r9467  
    5555    public abstract IVariable GetSetCopy();
    5656
    57     public abstract void Randomize(IRandom random);
     57    public abstract void Randomize(IRandom random, double changeSymbolProbability);
    5858
    5959    public virtual bool MatchVariable(IVariable target) { throw new NotSupportedException("This method is not supported by this kind of Variable."); }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVector.cs

    r9242 r9467  
    8686    }
    8787
    88     public void Randomize(IRandom random, double spreadPercentage) {
    89       condition.Randomize(random, spreadPercentage);
     88    public void Randomize(IRandom random, double changeSymbolProbability, double spreadPercentage) {
     89      condition.Randomize(random, changeSymbolProbability, spreadPercentage);
    9090      action.Randomize(random);
    9191    }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorAction.cs

    r9411 r9467  
    113113    public void Randomize(IRandom random) {
    114114      foreach (var variable in VariableDictionary.Values) {
    115         variable.Randomize(random);
     115        variable.RandomizeAction(random);
    116116      }
    117117    }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCondition.cs

    r9392 r9467  
    9797    }
    9898
    99     public void Randomize(IRandom random, double spreadPercentage) {
     99    public void Randomize(IRandom random, double changeSymbolProbability, double spreadPercentage) {
    100100      foreach (var variable in VariableDictionary.Values) {
    101101        if (variable is DoubleVariable) {
    102           ((DoubleVariable)variable).Randomize(random, spreadPercentage);
     102          ((DoubleVariable)variable).Randomize(random, changeSymbolProbability, spreadPercentage);
    103103        } else {
    104           variable.Randomize(random);
     104          variable.Randomize(random, changeSymbolProbability);
    105105        }
    106106      }
  • branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3

    • Property svn:ignore
      •  

        old new  
        11obj
        22Plugin.cs
         3*.user
  • branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblem.cs

    r9411 r9467  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132using HeuristicLab.Problems.DataAnalysis;
    3233using HeuristicLab.Problems.Instances;
     
    4243    private const string ActionExecuterParameterName = "ActionExecuter";
    4344    private const string ActionSetSubsumptionOperatorParameterName = "ActionSetSubsumption";
     45    private const string MaximizationParameterName = "Maximization";
    4446
    4547    public abstract string ChildName { get; }
     48
     49    public IFixedValueParameter<BoolValue> MaximizationParameter {
     50      get { return (IFixedValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
     51    }
     52    IParameter IConditionActionProblem.MaximizationParameter {
     53      get { return MaximizationParameter; }
     54    }
    4655
    4756    IXCSEvaluator IConditionActionProblem.Evaluator {
     
    149158    public ConditionActionClassificationProblem(V problemData, XCSEvaluator evaluator, T solutionCreator, ICoveringSolutionCreator coveringSolutionCreator)
    150159      : base(evaluator, solutionCreator) {
     160      Parameters.Add(new FixedValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized.", new BoolValue((true))));
    151161      Parameters.Add(new ValueParameter<V>("ProblemData", "", problemData));
    152162      Parameters.Add(new FixedValueParameter<DoubleValue>("PositiveReward", "", new DoubleValue(1000)));
     
    207217      Operators.Add(new BestTrainingXCSSolutionAnalyzer());
    208218      Operators.Add(new CurrentXCSSolutionAnalyzer());
     219      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISingleObjectiveSelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
    209220    }
    210221
  • branches/LearningClassifierSystems/HeuristicLab.Problems.VariableVectorClassification/3.3/VariableVectorClassificationProblem.cs

    r9411 r9467  
    9595
    9696      SolutionCreator.VariableVectorParameter.ActualName = ChildName;
     97      SolutionCreator.ChangeSymbolProbabilityParameter.ActualName = ChangeSymbolProbabilityInCoveringParameter.Name;
    9798
    9899      SetProblemDataSettings();
Note: See TracChangeset for help on using the changeset viewer.