CSemiMDPLastNRewardFunction Class Reference
Reward
Function for Behaviours. More...
#include <crewardmodel.h>
Inheritance diagram for CSemiMDPLastNRewardFunction:
List of all
members.
Detailed Description
Reward Function for Behaviours.
Very often the reward of a behaviour consists of the summud up
rewards from the primitiv actions which were executed during the
behaviour was activ. The class CSemiMDPLastNRewardFunction does
this reward calculation. It is a subclass of CRewardEpisode, so it mantains
a reward array containing all rewards from the past. The function
getReward(CStateCollection
*oldState, CAction *action, CStateCollection *newState). For an
action of duration d, the function calculates the reward of the
transition by sum_{i=0}^{d-1} gamma^i * r(N-i). The discount factor
is needed since the reward from the past has to be weakened by this
factor.
Since the object has to have access to the past "primitiv"
rewards, it has to be added to the listener list of the agent.
Constructor & Destructor Documentation
|
CSemiMDPLastNRewardFunction::CSemiMDPLastNRewardFunction
|
( |
CRewardFunction *
|
rewardFunction,
|
|
|
double |
gamma |
|
) |
|
|
| |
Creates the reward function with the discount factor
gamma.
|
| virtual
CSemiMDPLastNRewardFunction::~CSemiMDPLastNRewardFunction
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| |
Calculates the reward for extended actions.
For an action of duration d, the function the reward is
calculated by sum_{i=0}^{d-1} gamma^i * r(N-i). The discount factor
is needed since the reward from the past has to be weakened by this
factor.
Implements CRewardFunction.
|
Member Data Documentation
The documentation for this class was generated from the following
file:
|