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

CRewardEpisode Class Reference

Logs the reward during an Episode. More...

#include <crewardmodel.h>

Inheritance diagram for CRewardEpisode:

CSemiMDPRewardListener CSemiMDPListener CParameterObject CParameters CSemiMDPLastNRewardFunction List of all members.


Public Member Functions

  CRewardEpisode (CRewardFunction *rewardFunction)
virtual  ~CRewardEpisode ()
virtual void  nextStep (CStateCollection *oldState, CAction *action, double reward, CStateCollection *newState)
  Stores the current reward at the and of the rewards vector.

virtual void  newEpisode ()
  clears the reward vector

int  getNumRewards ()
double  getReward (int index)
  returns the requested reward from the rewards vector.

double  getMeanReward ()
double  getLastStepsMeanReward (int Steps)
virtual void  saveBIN (FILE *stream)
virtual void  saveData (FILE *stream)
virtual void  loadBIN (FILE *stream)
virtual void  loadData (FILE *stream)


Protected Attributes

std::vector< double > *  rewards
  array for the rewards


Detailed Description

Logs the reward during an Episode.

Maintains a double array for logging the reward of each step. Can be used in combination with a normal episode to log the whole State-Action-Reward-State Tuples.


Constructor & Destructor Documentation

CRewardEpisode::CRewardEpisode CRewardFunction rewardFunction  ) 
 
virtual CRewardEpisode::~CRewardEpisode  )  [virtual]
 

Member Function Documentation

double CRewardEpisode::getLastStepsMeanReward int  Steps  ) 
 
double CRewardEpisode::getMeanReward  ) 
 
int CRewardEpisode::getNumRewards  ) 
 
double CRewardEpisode::getReward int  index  ) 
 

returns the requested reward from the rewards vector.

virtual void CRewardEpisode::loadBIN FILE *  stream  )  [virtual]
 
virtual void CRewardEpisode::loadData FILE *  stream  )  [virtual]
 
virtual void CRewardEpisode::newEpisode  )  [virtual]
 

clears the reward vector

Reimplemented from CSemiMDPListener.

virtual void CRewardEpisode::nextStep CStateCollection oldState,
CAction action,
double  reward,
CStateCollection newState
[virtual]
 

Stores the current reward at the and of the rewards vector.

Reimplemented from CSemiMDPRewardListener.

virtual void CRewardEpisode::saveBIN FILE *  stream  )  [virtual]
 
virtual void CRewardEpisode::saveData FILE *  stream  )  [virtual]
 

Member Data Documentation

std::vector<double>* CRewardEpisode::rewards [protected]
 

array for the rewards


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