CQFunctionFromStochasticModel Class Reference
Converts
a VFunction and a Model to a Q-Function.
More...
#include <cqfunction.h>
Inheritance diagram for CQFunctionFromStochasticModel:
List of
all members.
|
Public Member Functions
|
|
|
CQFunctionFromStochasticModel
(CFeatureVFunction
*vfunction,
CAbstractFeatureStochasticModel
*model,
CFeatureRewardFunction
*rewardfunction)
|
| |
Creates a new QFunction from VFunction
object for the given V-Function and the given model, the
discretizer is take nfrom the V-Function.
|
|
virtual
|
~CQFunctionFromStochasticModel
()
|
|
virtual void
|
updateValue
(CStateCollection *,
CAction *, double,
CActionData
*=NULL)
|
| |
Does nothing.
|
|
virtual void
|
setValue
(CStateCollection *,
CAction *, double,
CActionData
*=NULL)
|
| |
Does nothing.
|
|
virtual double
|
getValue
(CStateCollection *state,
CAction *action,
CActionData
*data=NULL)
|
| |
getValue function for state collections
|
|
virtual double
|
getValue
(CState *featState,
CAction *action,
CActionData
*data=NULL)
|
| |
getValue functoin for states
|
|
virtual double
|
getValue (int
feature, CAction
*action, CActionData
*data=NULL)
|
| |
calculates the Action-Value for a specific
discrete state number
|
|
virtual CAbstractQETraces
*
|
getStandardETraces
()
|
Protected Attributes
|
|
CFeatureVFunction
*
|
vfunction |
| |
The given V-Function.
|
|
CAbstractFeatureStochasticModel
*
|
model |
| |
The model.
|
|
CStateProperties *
|
discretizer |
| |
Discretizer used by the V-Function.
|
|
CFeatureRewardFunction
*
|
rewardfunction |
| |
feature Reward Function for the learning
problem.
|
|
CState *
|
discState |
| |
state buffer
|
Detailed Description
Converts a VFunction and a Model to a Q-Function.
The class calculates the Q-Value by combining the information
from a model and a feature V-Function. So the class obviuosly only
provides the functions for getting a Q-Value. The Q-Value of an
action is calculated the following way: Q(s,a)=sum_{s'}
P(s'|s,a)*(R(s,a,s') + gamma * V(s')).
This class is used for the policies if you only have a
V-Function (e.g. model based learning), since policies can only
handle Q-Functions.
Constructor & Destructor Documentation
| |
Creates a new QFunction from VFunction object for the given
V-Function and the given model, the discretizer is take nfrom the
V-Function.
|
| virtual
CQFunctionFromStochasticModel::~CQFunctionFromStochasticModel
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual CAbstractQETraces*
CQFunctionFromStochasticModel::getStandardETraces
|
( |
|
) |
[inline,
virtual] |
|
| virtual double
CQFunctionFromStochasticModel::getValue
|
( |
int |
feature,
|
|
|
CAction *
|
action,
|
|
|
CActionData *
|
data =
NULL |
|
) |
[virtual] |
|
| |
calculates the Action-Value for a specific discrete state
number
The Q-Value of an action is calculated the following way:
Q(s,a)= sum_{s'} P(s'|s,a)*(R(s,a,s') + gamma *
V(s')).
|
| virtual double
CQFunctionFromStochasticModel::getValue
|
( |
CState *
|
featState,
|
|
|
CAction *
|
action,
|
|
|
CActionData *
|
data =
NULL |
|
) |
[virtual] |
|
| |
getValue functoin for states
Decomposes the feature state in its discrete state variables and
calls the getValue(int, CAction *) function. The results are
wheighted by the feature factors and summed up. For discrete states
obviously just the getValue(int, CAction *) with the discrete state
number is called.
|
| |
getValue function for state collections
Calls the getValue function for the specific state (retrieved
from the collection by the discretizer)
Implements CAbstractQFunction.
|
Member Data Documentation
| |
Discretizer used by the V-Function.
|
| |
feature Reward Function for the learning
problem.
|
The documentation for this class was generated from the following
file:
|