Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/27/12 19:14:51 (11 years ago)
Author:
sforsten
Message:

#1980:

  • added ConditionActionClassificationProblem
  • added ConditionActionEncoding
  • added Manipulators, Crossovers and an LCSAdaptedGeneticAlgorithm
  • changed LearningClassifierSystemMainLoop
Location:
branches/LearningClassifierSystems
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems

    • Property svn:ignore set to
      *.suo
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3

    • Property svn:ignore set to
      *.user
      Plugin.cs
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/CombinedIntegerVectorCreator.cs

    r8941 r9089  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Data;
    25 using HeuristicLab.Encodings.IntegerVectorEncoding;
     25using HeuristicLab.Operators;
     26using HeuristicLab.Optimization;
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334  [Item("CombinedIntegerVectorCreator", "A base class for operators creating combined int-valued vectors.")]
    3435  [StorableClass]
    35   public abstract class CombinedIntegerVectorCreator : IntegerVectorCreator, ICombinedIntegerVectorCreator {
     36  public abstract class CombinedIntegerVectorCreator : SingleSuccessorOperator, IStochasticOperator, ICombinedIntegerVectorCreator {
     37    public override bool CanChangeName {
     38      get { return false; }
     39    }
     40    public ILookupParameter<IRandom> RandomParameter {
     41      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
     42    }
     43    public IValueLookupParameter<IntValue> LengthParameter {
     44      get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; }
     45    }
     46    public IValueLookupParameter<IntMatrix> BoundsParameter {
     47      get { return (IValueLookupParameter<IntMatrix>)Parameters["Bounds"]; }
     48    }
     49
    3650    public IValueLookupParameter<IntValue> ActionPartLengthParameter {
    3751      get { return (IValueLookupParameter<IntValue>)Parameters["ActionPartLength"]; }
     
    4458    [StorableConstructor]
    4559    protected CombinedIntegerVectorCreator(bool deserializing) : base(deserializing) { }
    46     protected CombinedIntegerVectorCreator(IntegerVectorCreator original, Cloner cloner) : base(original, cloner) { }
     60    protected CombinedIntegerVectorCreator(CombinedIntegerVectorCreator original, Cloner cloner) : base(original, cloner) { }
    4761    protected CombinedIntegerVectorCreator()
    4862      : base() {
     63      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
     64      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
     65      Parameters.Add(new ValueLookupParameter<IntMatrix>("Bounds", "The bounds matrix can contain one row for each dimension with three columns specifying minimum (inclusive), maximum (exclusive), and step size. If less rows are given the matrix is cycled."));
    4966      Parameters.Add(new LookupParameter<CombinedIntegerVector>("CombinedIntegerVector", "The vector which should be manipulated."));
    5067      Parameters.Add(new ValueLookupParameter<IntValue>("ActionPartLength", "The length of the vector."));
    5168    }
    5269
    53     protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) {
    54       CombinedIntegerVectorParameter.ActualValue = Create(random, length, bounds, ActionPartLengthParameter.ActualValue);
    55       return CombinedIntegerVectorParameter.ActualValue;
     70    public sealed override IOperation Apply() {
     71      CombinedIntegerVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, BoundsParameter.ActualValue, ActionPartLengthParameter.ActualValue);
     72      return base.Apply();
    5673    }
    5774
Note: See TracChangeset for help on using the changeset viewer.