Reinforcement Learning Toolbox 2.0
last updated:
General
Documentation
Manual
Tutorial
Class Reference
Master Thesis
Examples
Related Papers
Downloads
Links
News
mailto:webmaster
Main Page     Class Hierarchy   Compound List   File List   Compound Members   File Members

CFeatureOperatorOr Class Reference

Combines 2 or more feature states with an "Or" operatation. More...

#include <clinearfafeaturecalculator.h>

Inheritance diagram for CFeatureOperatorOr:

CStateMultiModifier CFeatureCalculator CStateModifier CStateProperties List of all members.


Public Member Functions

  CFeatureOperatorOr ()
  Creates empty operator.

virtual  ~CFeatureOperatorOr ()
virtual void  getModifiedState (CStateCollection *state, CState *modifiedState)
  Calculates the feature state.

virtual void  addStateModifier (CStateModifier *featCalc, double factor=1.0)
  Adds a feature state to the modifier.

virtual void  initFeatureOperator ()
  Inits the feature operator.

CStateModifier getStateModifier (int feature)
  returns the feature calculator for a given feature index



Protected Attributes

std::map< CStateModifier *,

double > * 
featureFactors

Detailed Description

Combines 2 or more feature states with an "Or" operatation.

The "or" operator gives you the possibility to use different feature states simultanously that are independent. You can add several feature calculators, all calculated features from the different modifiers can now be active simultanously in the same feature state. It is understood that you have to distuingish between the different features from the different feature states, so, to get a unique feature index again, the sum off all feature state sizes from the previously added feature states is added to the feature index of a particular feature state. So our feature state size is the sum off all feature state sizes, and the number of active features is naturally the sum of all number of active features.

The feature operator or is used to combine 2 or more (more or less) indepedent states, for example tilings or RBF networks with different offsets/resolutions.
You always have to init the feature operator with the function initFeatureOperator after ALL feature states have been added and before you add the feature operator to the agent's modifier list.

Constructor & Destructor Documentation

CFeatureOperatorOr::CFeatureOperatorOr  ) 
 

Creates empty operator.

virtual CFeatureOperatorOr::~CFeatureOperatorOr  )  [virtual]
 

Member Function Documentation

virtual void CFeatureOperatorOr::addStateModifier CStateModifier featCalc,
double  factor = 1.0
[virtual]
 

Adds a feature state to the modifier.

The state modifier HAS to be a feature calculator or a discretizer. After the operator has been initialized, no feature calculators can be added any more.

virtual void CFeatureOperatorOr::getModifiedState CStateCollection state,
CState modifiedState
[virtual]
 

Calculates the feature state.

The "or" operator gives you the possibility to use different feature states simultanously. You can add several feature calculators, all calculated features from the different modifiers can now be active simultanously in the same feature state. It is understood that you have to distuingish between the different features from the different feature states, so, to get a unique feature index again, the sum off all feature state sizes from the previously added feature states is added to the feature index of a particular feature state. So our feature state size is the sum off all feature state sizes, and the number of active features is naturally the sum of all number of active features.

Implements CStateModifier.

CStateModifier* CFeatureOperatorOr::getStateModifier int  feature  ) 
 

returns the feature calculator for a given feature index

virtual void CFeatureOperatorOr::initFeatureOperator  )  [virtual]
 

Inits the feature operator.

You always have to init the feature operator after ALL feature states have been added and before you use the feature operator (e.g. add the feature operator to the agent's modifier list).


Member Data Documentation

std::map<CStateModifier *, double>* CFeatureOperatorOr::featureFactors [protected]
 

The documentation for this class was generated from the following file: