|
Qualia
0.2
|
#include <QFunction.h>


Public Member Functions | |
| QFunction (GradientFunction *function, unsigned int observationDim, ActionProperties *actionProperties) | |
| virtual | ~QFunction () |
| virtual void | init () |
| Initializes the function. More... | |
| virtual unsigned int | nInputs () const |
| Returns the number of inputs. More... | |
| virtual unsigned int | nOutputs () const |
| Returns the number of outputs. More... | |
| virtual unsigned int | nParams () const |
| Returns the number of parameters. More... | |
| virtual void | setInput (int i, real x) |
| Sets input i to value x. More... | |
| virtual real | getOutput (int i) const |
| Get output i. More... | |
| virtual void | propagate () |
| Propagates inputs to outputs. More... | |
| virtual void | backpropagate (real *outputError) |
| Backpropagates the error, updating the derivatives. More... | |
| virtual void | update () |
| Updates the weights according to the derivatives. More... | |
| virtual void | save (XFile *file) |
| Saves the model to a file. More... | |
| virtual void | load (XFile *file) |
| Loads the model from a file. More... | |
| real | getValue (const Observation *observation, const Action *action) |
| void | getMaxAction (Action *dst, const Observation *observation, real *maxQ=0) |
Public Member Functions inherited from GradientFunction | |
| GradientFunction () | |
| virtual | ~GradientFunction () |
| virtual void | clearDelta () |
| Clears the derivatives. More... | |
Public Member Functions inherited from Function | |
| Function () | |
| virtual | ~Function () |
| virtual void | setInputs (const real *input) |
| Sets the value of the inputs. More... | |
| virtual void | getOutputs (real *output) const |
| Get the value of the outputs. More... | |
Public Attributes | |
| GradientFunction * | function |
| real * | input |
| unsigned int | observationDim |
| ActionProperties * | actionProperties |
Public Attributes inherited from GradientFunction | |
| real * | weights |
| The weights (parameters) of the gradient function. More... | |
| real * | dWeights |
| The derivatives of the weights. More... | |
| QFunction::QFunction | ( | GradientFunction * | function, |
| unsigned int | observationDim, | ||
| ActionProperties * | actionProperties | ||
| ) |
|
virtual |
|
inlinevirtual |
Backpropagates the error, updating the derivatives.
Implements GradientFunction.
| void QFunction::getMaxAction | ( | Action * | dst, |
| const Observation * | observation, | ||
| real * | maxQ = 0 |
||
| ) |
| real QFunction::getValue | ( | const Observation * | observation, |
| const Action * | action | ||
| ) |
|
inlinevirtual |
Initializes the function.
Reimplemented from Function.
|
inlinevirtual |
Loads the model from a file.
Reimplemented from GradientFunction.
|
inlinevirtual |
Returns the number of inputs.
Implements Function.
|
inlinevirtual |
Returns the number of outputs.
Implements Function.
|
inlinevirtual |
Returns the number of parameters.
Implements GradientFunction.
|
inlinevirtual |
Propagates inputs to outputs.
Implements Function.
|
inlinevirtual |
Saves the model to a file.
Reimplemented from GradientFunction.
|
inlinevirtual |
Sets input i to value x.
Implements Function.
|
inlinevirtual |
Updates the weights according to the derivatives.
Implements GradientFunction.
| ActionProperties* QFunction::actionProperties |
| GradientFunction* QFunction::function |
| real* QFunction::input |
| unsigned int QFunction::observationDim |
1.8.3.1