CFeatureStateRewardModel Class Reference
#include <crewardmodel.h>
Inheritance diagram for CFeatureStateRewardModel:
List of all
members.
|
Public Member Functions
|
|
|
CFeatureStateRewardModel
(CRewardFunction
*function, CStateModifier *discretizer)
|
| |
Creates a reward model, which uses an
estimated model for the calculation of the transition visits.
|
|
virtual
|
~CFeatureStateRewardModel
()
|
| |
Creates a reward model, which has to use an
own visit table for the visits.
|
|
virtual double
|
getReward
(CState *oldState,
CAction *action,
CState
*newState)
|
| |
Calls getReward(int
oldState, CAction *action, int newState) with the features from
the state as argument.
|
|
virtual double
|
getReward (int
oldState, CAction
*action, int newState)
|
| |
Returns the reward for a specific discrete
state transition.
|
|
virtual double
|
getReward (int
newState)
|
|
virtual void
|
nextStep
(CStateCollection *oldState,
CAction *action, double
reward, CStateCollection
*newState)
|
| |
virtual function, to be implemented by
subclass
|
|
virtual void
|
saveData (FILE
*stream)
|
| |
Saves the reward model.
|
|
virtual void
|
loadData (FILE
*stream)
|
|
virtual void
|
resetData
()
|
Protected Attributes
|
|
double *
|
rewards |
|
double *
|
visits |
|
double
|
rewardMean |
|
int
|
numRewards |
Constructor & Destructor Documentation
| |
Creates a reward model, which uses an estimated model for the
calculation of the transition visits.
It is very important that the estimated model contains the same
transitions as the reward table, because otherwise a division by
zero would occur. So the estimated model has to be added before the
reward model to the listener.
|
| virtual
CFeatureStateRewardModel::~CFeatureStateRewardModel
|
( |
|
) |
[virtual] |
|
| |
Creates a reward model, which has to use an own visit table for
the visits.
|
Member Function Documentation
| virtual double
CFeatureStateRewardModel::getReward
|
( |
int |
newState |
) |
[virtual] |
|
| virtual double
CFeatureStateRewardModel::getReward
|
( |
int |
oldState,
|
|
|
CAction *
|
action,
|
|
|
int |
newState |
|
) |
[virtual] |
|
| |
Returns the reward for a specific discrete state transition.
Calculates the mean reward from that transition, i.e. sum
rewards/sum visits
Implements CFeatureRewardFunction.
|
| virtual double
CFeatureStateRewardModel::getReward
|
( |
CState *
|
oldState,
|
|
|
CAction *
|
action,
|
|
|
CState *
|
newState |
|
) |
[virtual] |
|
| virtual void
CFeatureStateRewardModel::loadData
|
( |
FILE * |
stream |
) |
[virtual] |
|
| |
Loads the reward Table and the visit table if no estimated model
was assigned to the constructor
Implements CLearnDataObject.
|
| virtual void
CFeatureStateRewardModel::resetData
|
( |
|
) |
[virtual] |
|
| virtual void
CFeatureStateRewardModel::saveData
|
( |
FILE * |
stream |
) |
[virtual] |
|
| |
Saves the reward model.
Saves the reward Table and the visit table if it is used
Implements CLearnDataObject.
|
Member Data Documentation
The documentation for this class was generated from the following
file:
|