Changeset 9194 for branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering
- Timestamp:
- 01/28/13 17:54:46 (12 years ago)
- 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 35 35 36 36 #region Parameter Properties 37 public ILookupParameter<IItemSet<I Classifier>> ActionsInMatchSetParameter {38 get { return (ILookupParameter<IItemSet<I Classifier>>)Parameters["ActionsInMatchSet"]; }37 public ILookupParameter<IItemSet<IAction>> ActionsInMatchSetParameter { 38 get { return (ILookupParameter<IItemSet<IAction>>)Parameters["ActionsInMatchSet"]; } 39 39 } 40 public ILookupParameter<IItemSet<I Classifier>> PossibleActionsParameter {41 get { return (ILookupParameter<IItemSet<I Classifier>>)Parameters["PossibleActions"]; }40 public ILookupParameter<IItemSet<IAction>> PossibleActionsParameter { 41 get { return (ILookupParameter<IItemSet<IAction>>)Parameters["PossibleActions"]; } 42 42 } 43 43 public ILookupParameter<IntValue> MinimalNumberOfUniqueActionsParameter { … … 77 77 public CoveringOperator() 78 78 : 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")); 82 81 Parameters.Add(new LookupParameter<IntValue>("MinimalNumberOfUniqueActions")); 83 82 Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator")); … … 95 94 bool parallel = ParallelParameter.ActualValue.Value; 96 95 97 IItemSet<I Classifier> clone = (IItemSet<IClassifier>)PossibleActionsParameter.ActualValue.Clone();96 IItemSet<IAction> clone = (IItemSet<IAction>)PossibleActionsParameter.ActualValue.Clone(); 98 97 clone.ExceptWith(ActionsInMatchSetParameter.ActualValue); 99 98 … … 116 115 VariableCreator variableCreator = new VariableCreator(); 117 116 int pos = RandomParameter.ActualValue.Next(clone.Count); 118 I Classifieraction = clone.ElementAt(pos);117 IAction action = clone.ElementAt(pos); 119 118 clone.Remove(action); 120 variableCreator.CollectedValues.Add(new ValueParameter<I Classifier>("Action", action));119 variableCreator.CollectedValues.Add(new ValueParameter<IAction>("Action", action)); 121 120 variableCreation.Add(ExecutionContext.CreateOperation(variableCreator, CurrentScope.SubScopes[current + i])); 122 121 creation.Add(ExecutionContext.CreateOperation(creator, CurrentScope.SubScopes[current + i])); -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/DoDeletionBeforeCovering.cs
r9110 r9194 55 55 get { return (IValueLookupParameter<IntValue>)Parameters["NumberToDelete"]; } 56 56 } 57 public ILookupParameter<IClassifierComparer> ClassifierComparerParameter { 58 get { return (ILookupParameter<IClassifierComparer>)Parameters["ClassifierComparer"]; } 59 } 57 60 #endregion 58 61 … … 71 74 Parameters.Add(new ValueLookupParameter<BoolValue>("DoDeletion")); 72 75 Parameters.Add(new ValueLookupParameter<IntValue>("NumberToDelete")); 76 Parameters.Add(new LookupParameter<IClassifierComparer>("ClassifierComparer")); 73 77 } 74 78 public override IDeepCloneable Clone(Cloner cloner) { … … 77 81 78 82 public override IOperation Apply() { 79 IItemSet<I Classifier> uniqueActions = new ItemSet<IClassifier>();83 IItemSet<IAction> uniqueActions = new ItemSet<IAction>(ClassifierComparerParameter.ActualValue); 80 84 var classifiers = ClassifiersParameter.ActualValue; 81 85 var matchcondition = MatchConditionParameter.ActualValue; -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/ICovering.cs
r9105 r9194 26 26 namespace HeuristicLab.Encodings.ConditionActionEncoding { 27 27 public interface ICovering : IStochasticOperator { 28 ILookupParameter<IItemSet<I Classifier>> ActionsInMatchSetParameter { get; }29 ILookupParameter<IItemSet<I Classifier>> PossibleActionsParameter { get; }28 ILookupParameter<IItemSet<IAction>> ActionsInMatchSetParameter { get; } 29 ILookupParameter<IItemSet<IAction>> PossibleActionsParameter { get; } 30 30 31 31 ILookupParameter<IntValue> MinimalNumberOfUniqueActionsParameter { get; } -
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/Covering/ICoveringSolutionCreator.cs
r9090 r9194 28 28 namespace HeuristicLab.Encodings.ConditionActionEncoding { 29 29 public interface ICoveringSolutionCreator : IOperator, IParameterizedNamedItem, INamedItem, IParameterizedItem, IItem, IContent, IDeepCloneable, ICloneable, IStochasticOperator { 30 ILookupParameter<I Classifier> CoverClassifierParameter { get; }31 ILookupParameter<I Classifier> ActionParameter { get; }30 ILookupParameter<IInput> CoverInputParameter { get; } 31 ILookupParameter<IAction> ActionParameter { get; } 32 32 33 33 IValueLookupParameter<IClassifier> CreatedClassifierParameter { get; }
Note: See TracChangeset
for help on using the changeset viewer.