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

CQETraces Class Reference

Q-ETraces consisting of V-Etraces (one for each action). More...

#include <cqetraces.h>

Inheritance diagram for CQETraces:

CAbstractQETraces CParameterObject CParameters CCALinearFAQETraces List of all members.


Public Member Functions

  CQETraces (CQFunction *qfunction)
  Creates a composed Q-ETraces Object.

virtual  ~CQETraces ()
virtual void  resetETraces ()
  Resets all V-ETraces.

virtual void  addETrace (CStateCollection *State, CAction *action, double factor=1.0, CActionData *data=NULL)
  Adds the state to the V-Etrace which is assigned to the specified action with the given factor.

virtual void  updateETraces (CAction *action, CActionData *data=NULL)
  Calls the updateETraces function from all V-ETraces.

virtual void  updateQFunction (double td)
  Calls the updateVFunction method from th CAbstractVETraces class.

void  setVETrace (CAbstractVETraces *vEtrace, int index, bool bDeleteOld=true)
  Sets an ETrace Object for a given index.

CAbstractVETraces getVETrace (int index)
  Returns the index th VETraces object.

virtual void  setReplacingETraces (bool bReplace)
  sets the internal replacing ETraces flag and the flag of the V-ETraces



Protected Attributes

std::list< CAbstractVETraces * > *  vETraces
  The list of V-ETraces.

CQFunction qExFunction
  the assigned composed Q-Function


Detailed Description

Q-ETraces consisting of V-Etraces (one for each action).

Q-ETraces have the same structure of their corresponding Q-Function. The class CQETraces maintains a list of V-ETraces, for each V-Function of the assigned Q-Function an own ETrace. The list gets initialized with the standard ETraces for the specific V-Function (see getStandardETraces), but they can also be set explicitly. When a ETrace is added, all V-ETraces get updated (the factors are multiplied by lambda * gamma(discountfactor) and the state collection is added to the VETrace object for the current action. When the resetEtraces and updateQFunction functions are called from the CQETraces class, the similar functions from all V-ETraces are called. CQETraces has following parameters: see CAbstractQETraces


Constructor & Destructor Documentation

CQETraces::CQETraces CQFunction qfunction  ) 
 

Creates a composed Q-ETraces Object.

The V-ETraces are comming from the getStandardVETraces function of the coresponding V-ETraces from the compounded Q-Function object.

virtual CQETraces::~CQETraces  )  [virtual]
 

Member Function Documentation

virtual void CQETraces::addETrace CStateCollection State,
CAction action,
double  factor = 1.0,
CActionData data = NULL
[virtual]
 

Adds the state to the V-Etrace which is assigned to the specified action with the given factor.

Implements CAbstractQETraces.

Reimplemented in CCALinearFAQETraces.

CAbstractVETraces* CQETraces::getVETrace int  index  ) 
 

Returns the index th VETraces object.

virtual void CQETraces::resetETraces  )  [virtual]
 

Resets all V-ETraces.

Implements CAbstractQETraces.

virtual void CQETraces::setReplacingETraces bool  bReplace  )  [virtual]
 

sets the internal replacing ETraces flag and the flag of the V-ETraces

Reimplemented from CAbstractQETraces.

void CQETraces::setVETrace CAbstractVETraces vEtrace,
int  index,
bool  bDeleteOld = true
 

Sets an ETrace Object for a given index.

it is recommended to use the standard ETraces. This function gives you the possibility to use oter ETraces objects for you V-Function with index "index".

If bDeleteOld is true, the old VETraces object gets deleted.

virtual void CQETraces::updateETraces CAction action,
CActionData data = NULL
[virtual]
 

Calls the updateETraces function from all V-ETraces.

So all ETraces factors get multplied by lambda * gamma. For an multistep action the update has to be lambda * gamma^N, so the action is given as parameter to determine the duration.

The function calls the updateETraces function of all V-ETraces with the duration of the action as parameter.

Implements CAbstractQETraces.

virtual void CQETraces::updateQFunction double  td  )  [virtual]
 

Calls the updateVFunction method from th CAbstractVETraces class.

So all state-action Pairs get updated by td * ETraceFaktor

Implements CAbstractQETraces.


Member Data Documentation

CQFunction* CQETraces::qExFunction [protected]
 

the assigned composed Q-Function

std::list<CAbstractVETraces *>* CQETraces::vETraces [protected]
 

The list of V-ETraces.


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