Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/13 17:54:46 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added necessary interface ICondition, IAction, IInput
  • removed not used class MatchSelector and interface IMatchSelector
  • added constructors to ItemDictionary
  • added new encoding
Location:
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/CoveringOperator.cs

    r9110 r9194  
    3535
    3636    #region Parameter Properties
    37     public ILookupParameter<IItemSet<IClassifier>> ActionsInMatchSetParameter {
    38       get { return (ILookupParameter<IItemSet<IClassifier>>)Parameters["ActionsInMatchSet"]; }
     37    public ILookupParameter<IItemSet<IAction>> ActionsInMatchSetParameter {
     38      get { return (ILookupParameter<IItemSet<IAction>>)Parameters["ActionsInMatchSet"]; }
    3939    }
    40     public ILookupParameter<IItemSet<IClassifier>> PossibleActionsParameter {
    41       get { return (ILookupParameter<IItemSet<IClassifier>>)Parameters["PossibleActions"]; }
     40    public ILookupParameter<IItemSet<IAction>> PossibleActionsParameter {
     41      get { return (ILookupParameter<IItemSet<IAction>>)Parameters["PossibleActions"]; }
    4242    }
    4343    public ILookupParameter<IntValue> MinimalNumberOfUniqueActionsParameter {
     
    7777    public CoveringOperator()
    7878      : base() {
    79       Parameters.Add(new LookupParameter<IClassifier>("CoverClassifier"));
    80       Parameters.Add(new LookupParameter<IItemSet<IClassifier>>("ActionsInMatchSet"));
    81       Parameters.Add(new LookupParameter<IItemSet<IClassifier>>("PossibleActions"));
     79      Parameters.Add(new LookupParameter<IItemSet<IAction>>("ActionsInMatchSet"));
     80      Parameters.Add(new LookupParameter<IItemSet<IAction>>("PossibleActions"));
    8281      Parameters.Add(new LookupParameter<IntValue>("MinimalNumberOfUniqueActions"));
    8382      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator"));
     
    9594      bool parallel = ParallelParameter.ActualValue.Value;
    9695
    97       IItemSet<IClassifier> clone = (IItemSet<IClassifier>)PossibleActionsParameter.ActualValue.Clone();
     96      IItemSet<IAction> clone = (IItemSet<IAction>)PossibleActionsParameter.ActualValue.Clone();
    9897      clone.ExceptWith(ActionsInMatchSetParameter.ActualValue);
    9998
     
    116115          VariableCreator variableCreator = new VariableCreator();
    117116          int pos = RandomParameter.ActualValue.Next(clone.Count);
    118           IClassifier action = clone.ElementAt(pos);
     117          IAction action = clone.ElementAt(pos);
    119118          clone.Remove(action);
    120           variableCreator.CollectedValues.Add(new ValueParameter<IClassifier>("Action", action));
     119          variableCreator.CollectedValues.Add(new ValueParameter<IAction>("Action", action));
    121120          variableCreation.Add(ExecutionContext.CreateOperation(variableCreator, CurrentScope.SubScopes[current + i]));
    122121          creation.Add(ExecutionContext.CreateOperation(creator, CurrentScope.SubScopes[current + i]));
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/DoDeletionBeforeCovering.cs

    r9110 r9194  
    5555      get { return (IValueLookupParameter<IntValue>)Parameters["NumberToDelete"]; }
    5656    }
     57    public ILookupParameter<IClassifierComparer> ClassifierComparerParameter {
     58      get { return (ILookupParameter<IClassifierComparer>)Parameters["ClassifierComparer"]; }
     59    }
    5760    #endregion
    5861
     
    7174      Parameters.Add(new ValueLookupParameter<BoolValue>("DoDeletion"));
    7275      Parameters.Add(new ValueLookupParameter<IntValue>("NumberToDelete"));
     76      Parameters.Add(new LookupParameter<IClassifierComparer>("ClassifierComparer"));
    7377    }
    7478    public override IDeepCloneable Clone(Cloner cloner) {
     
    7781
    7882    public override IOperation Apply() {
    79       IItemSet<IClassifier> uniqueActions = new ItemSet<IClassifier>();
     83      IItemSet<IAction> uniqueActions = new ItemSet<IAction>(ClassifierComparerParameter.ActualValue);
    8084      var classifiers = ClassifiersParameter.ActualValue;
    8185      var matchcondition = MatchConditionParameter.ActualValue;
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/ICovering.cs

    r9105 r9194  
    2626namespace HeuristicLab.Encodings.ConditionActionEncoding {
    2727  public interface ICovering : IStochasticOperator {
    28     ILookupParameter<IItemSet<IClassifier>> ActionsInMatchSetParameter { get; }
    29     ILookupParameter<IItemSet<IClassifier>> PossibleActionsParameter { get; }
     28    ILookupParameter<IItemSet<IAction>> ActionsInMatchSetParameter { get; }
     29    ILookupParameter<IItemSet<IAction>> PossibleActionsParameter { get; }
    3030
    3131    ILookupParameter<IntValue> MinimalNumberOfUniqueActionsParameter { get; }
  • branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/ICoveringSolutionCreator.cs

    r9090 r9194  
    2828namespace HeuristicLab.Encodings.ConditionActionEncoding {
    2929  public interface ICoveringSolutionCreator : IOperator, IParameterizedNamedItem, INamedItem, IParameterizedItem, IItem, IContent, IDeepCloneable, ICloneable, IStochasticOperator {
    30     ILookupParameter<IClassifier> CoverClassifierParameter { get; }
    31     ILookupParameter<IClassifier> ActionParameter { get; }
     30    ILookupParameter<IInput> CoverInputParameter { get; }
     31    ILookupParameter<IAction> ActionParameter { get; }
    3232
    3333    IValueLookupParameter<IClassifier> CreatedClassifierParameter { get; }
Note: See TracChangeset for help on using the changeset viewer.