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

CGradientVFunction Class Reference

Interface for all classes that can use gradients for updating. More...

#include <cvfunction.h>

Inheritance diagram for CGradientVFunction:

CAbstractVFunction CGradientUpdateFunction CStateObject CLearnDataObject CParameterObject CLearnDataObject CParameterObject CParameters CParameterObject CParameters CParameters CFeatureVFunction CVFunctionFromGradientFunction CFeatureVRegressionTreeFunction CVTable List of all members.


Public Member Functions

  CGradientVFunction (CStateProperties *properties)
  constructor, the properties are needed to fetch the state from the state collection.

virtual  ~CGradientVFunction ()
virtual void  updateValue (CStateCollection *state, double td)
  Calls updateValue(CState *state, double td) with the state assigned to the value function.

virtual void  updateValue (CState *state, double td)
  sets the value of the state to the current value + td

virtual void  getGradient (CStateCollection *state, CFeatureList *gradientFeatures)=0
virtual void  resetData ()=0
  Interface for resetting the weights.

virtual void  loadData (FILE *stream)
  Load weights and set them with setWeights.

virtual void  saveData (FILE *stream)
  Save weights coming from getWeights.

virtual CAbstractVETraces getStandardETraces ()
  Returns a standard VETraces object.

virtual void  copy (CLearnDataObject *vFunction)

Detailed Description

Interface for all classes that can use gradients for updating.

Gradient V-Functions are able to calculate the gradient of the V-Function with respect to the weights in the current state and can be also updated by a gradient object (represented as a CFeatureList object). In the toolbox all gradients are represented as feature lists, where the feature index is the weight index and the feature factor represents the gradient value of that weights. All weights that are not listed in the feature list have a zero gradient.

For the gradient calculation all subclasses have to implement the function getGradient(CStateCollection *state, CFeatureList *gradientFeatures), where the gradient in the current state is calculated and written in the given feature list. The feature list is supposed to be empty.
All gradient-VFunctions implement the interface CGradientUpdateFunction as the interface for updating a gradient function, so additionally the subclasses have to implement the functions:

Constructor & Destructor Documentation

CGradientVFunction::CGradientVFunction CStateProperties properties  ) 
 

constructor, the properties are needed to fetch the state from the state collection.

virtual CGradientVFunction::~CGradientVFunction  )  [virtual]
 

Member Function Documentation

virtual void CGradientVFunction::copy CLearnDataObject vFunction  )  [inline, virtual]
 

Reimplemented from CGradientUpdateFunction.

Reimplemented in CFeatureVRegressionTreeFunction.

virtual void CGradientVFunction::getGradient CStateCollection state,
CFeatureList gradientFeatures
[pure virtual]
 

Implemented in CVFunctionFromGradientFunction, and CFeatureVFunction.

virtual CAbstractVETraces* CGradientVFunction::getStandardETraces  )  [virtual]
 

Returns a standard VETraces object.

The function has to return a new instantiated CAbstractVETraces object, which is used to compose the CQETtraces object. The function returns CStateVETraces as standard.

Reimplemented from CAbstractVFunction.

Reimplemented in CVFunctionFromGradientFunction, and CFeatureVFunction.

virtual void CGradientVFunction::loadData FILE *  stream  )  [inline, virtual]
 

Load weights and set them with setWeights.

Reimplemented from CGradientUpdateFunction.

Reimplemented in CFeatureVFunction.

virtual void CGradientVFunction::resetData  )  [pure virtual]
 

Interface for resetting the weights.

Implements CGradientUpdateFunction.

Implemented in CVFunctionFromGradientFunction, and CFeatureVFunction.

virtual void CGradientVFunction::saveData FILE *  stream  )  [inline, virtual]
 

Save weights coming from getWeights.

Reimplemented from CGradientUpdateFunction.

Reimplemented in CFeatureVFunction.

virtual void CGradientVFunction::updateValue CState state,
double  td
[virtual]
 

sets the value of the state to the current value + td

Reimplemented from CAbstractVFunction.

Reimplemented in CFeatureVFunction.

virtual void CGradientVFunction::updateValue CStateCollection state,
double  td
[virtual]
 

Calls updateValue(CState *state, double td) with the state assigned to the value function.

Reimplemented from CAbstractVFunction.


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