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

CGridFeatureCalculator Class Reference

Abstract Superclass for all feature calculator that partition the state space with a grid. More...

#include <clinearfafeaturecalculator.h>

Inheritance diagram for CGridFeatureCalculator:

CFeatureCalculator CStateModifier CStateProperties CLinearMultiFeatureCalculator CTilingFeatureCalculator CLinearInterpolationFeatureCalculator CRBFFeatureCalculator List of all members.


Public Member Functions

  CGridFeatureCalculator (unsigned int numDim, unsigned int dimensions[], unsigned int partitions[], double offsets[], unsigned int numActiveFeatures)
  ~CGridFeatureCalculator ()
void  setGridScale (int dimension, double scale)
int unsigned  getNumDimensions ()
  Returns the number of dimensions you use.

int unsigned  getFeatureIndex (int position[])
  returns the feature index of the given position array (active partitions of the single state variables)

virtual void  getFeaturePosition (unsigned int feature, ColumnVector *position)
  Stores the position of the specified feature in the position vector.

virtual unsigned int  getActiveFeature (CState *state)
  Returns the number of the nearest feature to the current state.

virtual void  getSingleActiveFeature (CState *state, unsigned int *activeFeature)
  retrievs the current partitions of all dimensions

virtual void  getModifiedState (CStateCollection *state, CState *featState)=0
  Interface method for subclasses.



Protected Attributes

unsigned int *  partitions
unsigned int *  dimensions
double *  offsets
unsigned int  numDim
unsigned int *  dimensionSize
double *  gridScale

Detailed Description

Abstract Superclass for all feature calculator that partition the state space with a grid.

This class lays a grid over a specified sub-space of the model space. How this grid is used (e.g. Tiling or RBF network) is specified by the sub-classes. You can specify which dimensions you want to use (dimensions array), how much partitions you need for each dimension and also an offset for each dimension which is added to the grid centers. The size of the feature space is the product of all numbers of partitions.

The class provides methods for retrieving the position of a feature (getFeaturePosition), retrieving the active feature (feature nearest to the current state) (getActiveFeature), and retrieving the current partitions of all dimensions (getSingleActiveFeature).
This class always works with the normalized continuous state variable values (scaled to the intervall [0, 1], so consider that when choosing your offsets.

Constructor & Destructor Documentation

CGridFeatureCalculator::CGridFeatureCalculator unsigned int  numDim,
unsigned int  dimensions[],
unsigned int  partitions[],
double  offsets[],
unsigned int  numActiveFeatures
 

This class lays a grid over a specified sub-space of the model space. How this grid is used (e.g. Tiling or RBF network) is specified by the sub-classes. You can specify which dimensions you want to use, how much partitions you need for each dimension and also an offset for each dimension which is added to the grid centers. The first parameter is the number of dimensions you want to use so its the size of your arrays. The size of the feature space is the product of all numbers of partitions.

CGridFeatureCalculator::~CGridFeatureCalculator  ) 
 

Member Function Documentation

virtual unsigned int CGridFeatureCalculator::getActiveFeature CState state  )  [virtual]
 

Returns the number of the nearest feature to the current state.

int unsigned CGridFeatureCalculator::getFeatureIndex int  position[]  ) 
 

returns the feature index of the given position array (active partitions of the single state variables)

virtual void CGridFeatureCalculator::getFeaturePosition unsigned int  feature,
ColumnVector *  position
[virtual]
 

Stores the position of the specified feature in the position vector.

virtual void CGridFeatureCalculator::getModifiedState CStateCollection state,
CState featState
[pure virtual]
 

Interface method for subclasses.

Implements CStateModifier.

Implemented in CTilingFeatureCalculator, and CLinearMultiFeatureCalculator.

int unsigned CGridFeatureCalculator::getNumDimensions  ) 
 

Returns the number of dimensions you use.

virtual void CGridFeatureCalculator::getSingleActiveFeature CState state,
unsigned int *  activeFeature
[virtual]
 

retrievs the current partitions of all dimensions

void CGridFeatureCalculator::setGridScale int  dimension,
double  scale
 

Member Data Documentation

unsigned int* CGridFeatureCalculator::dimensions [protected]
 
unsigned int* CGridFeatureCalculator::dimensionSize [protected]
 
double* CGridFeatureCalculator::gridScale [protected]
 
unsigned int CGridFeatureCalculator::numDim [protected]
 
double* CGridFeatureCalculator::offsets [protected]
 
unsigned int* CGridFeatureCalculator::partitions [protected]
 

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