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

CSingleStateFeatureCalculator Class Reference

Superclass for calculating features from a single continuous state variable. More...

#include <clinearfafeaturecalculator.h>

Inheritance diagram for CSingleStateFeatureCalculator:

CFeatureCalculator CStateModifier CStateProperties CSingleStateLinearInterpolationFeatureCalculator CSingleStateRBFFeatureCalculator List of all members.


Public Member Functions

  CSingleStateFeatureCalculator (int dimension, int numPartitions, double *partitions, int numActiveFeatures)
  Creates the feature calculator.

virtual  ~CSingleStateFeatureCalculator ()
virtual void  getModifiedState (CStateCollection *state, CState *featState)
  Calculates the feature state from one continupus state variable.



Protected Member Functions

virtual double  getFeatureFactor (int partition, double contState, double difference)=0
  Interface function for calculating the feature activation factor.



Protected Attributes

int  dimension
int  numPartitions
double *  partitions

Detailed Description

Superclass for calculating features from a single continuous state variable.

This class allows you, similiar to CSingleStateDiscretizer to calculate your features from a single continuous state variable. Therefore a 1-dimensional grid is layed over the specified continous state variable. How the grid is used is specified by the subclasses (e.g. RBF-Centers). For the current partition of the grid and the neighbors (as much as numActiveFeatures set in the constructor) the feature factor is calculated by the interface function getFeatureFactor. For the current feature and the neighbors calculation periodic state variables get also considered.

At the end the features get normalized (factor sum = 1).

Use CFeatureOperatorOr to combine the feature states comming from different continuous state variables.

Constructor & Destructor Documentation

CSingleStateFeatureCalculator::CSingleStateFeatureCalculator int  dimension,
int  numPartitions,
double *  partitions,
int  numActiveFeatures
 

Creates the feature calculator.

You have to set the dimension of the modelstate you want to calculate your features from, the size of your grid, the grid itself as a double array and how much features should be active. If you set numActiveFeatures for example to 3, the current feature (feature nearest to the current state) and its left and right neighbor are active.

virtual CSingleStateFeatureCalculator::~CSingleStateFeatureCalculator  )  [virtual]
 

Member Function Documentation

virtual double CSingleStateFeatureCalculator::getFeatureFactor int  partition,
double  contState,
double  difference
[protected, pure virtual]
 

Interface function for calculating the feature activation factor.

Gets the number of the partition (= featureindex), the value of the continuous state variable and the distance to the feature center to the current state varaible value as input. In this distance periodic states are already considered.

Implemented in CSingleStateRBFFeatureCalculator, and CSingleStateLinearInterpolationFeatureCalculator.

virtual void CSingleStateFeatureCalculator::getModifiedState CStateCollection state,
CState featState
[virtual]
 

Calculates the feature state from one continupus state variable.

For the current partition of the grid and the neighbors (as much as numActiveFeatures set in the constructor) the feature factor is calculated by the interface function getFeatureFactor. At the end the features get normalized (factor sum = 1).

Implements CStateModifier.


Member Data Documentation

int CSingleStateFeatureCalculator::dimension [protected]
 
int CSingleStateFeatureCalculator::numPartitions [protected]
 
double* CSingleStateFeatureCalculator::partitions [protected]
 

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