#include <Observation.h>
Public Member Functions | |
VERVE_DECL | Observation () |
virtual VERVE_DECL | ~Observation () |
virtual VERVE_DECL void VERVE_CALL | init (const Agent &a) |
virtual VERVE_DECL void VERVE_CALL | init (const Observation &obs) |
virtual VERVE_DECL void VERVE_CALL | zeroInputData () |
virtual VERVE_DECL void VERVE_CALL | copyInputData (const Observation &obs) |
virtual VERVE_DECL unsigned int VERVE_CALL | getNumDiscreteInputs () const |
virtual VERVE_DECL unsigned int VERVE_CALL | getNumContinuousInputs () const |
virtual VERVE_DECL void VERVE_CALL | setDiscreteValue (unsigned int index, unsigned int value) |
virtual VERVE_DECL unsigned int VERVE_CALL | getDiscreteValue (unsigned int index) const |
virtual VERVE_DECL const unsigned int *VERVE_CALL | getDiscreteInputData () const |
virtual VERVE_DECL const unsigned int *VERVE_CALL | getDiscreteNumOptionsData () const |
virtual VERVE_DECL void VERVE_CALL | setContinuousValue (unsigned int index, real value) |
virtual VERVE_DECL real VERVE_CALL | getContinuousValue (unsigned int index) const |
virtual VERVE_DECL const real *VERVE_CALL | getContinuousInputData () const |
virtual VERVE_DECL const bool *VERVE_CALL | getContinuousCircularData () const |
virtual VERVE_DECL unsigned int VERVE_CALL | getDiscreteInputNumOptions (unsigned int i) const |
virtual VERVE_DECL bool VERVE_CALL | getContinuousInputIsCircular (unsigned int i) const |
virtual VERVE_DECL unsigned int VERVE_CALL | getContinuousResolution () const |
Protected Attributes | |
unsigned int | mNumDiscreteDimensions |
unsigned int | mNumContinuousDimensions |
unsigned int * | mDiscreteInputData |
unsigned int * | mDiscreteNumOptionsData |
real * | mContinuousInputData |
bool * | mContinuousCircularData |
unsigned | mContinuousResolution |
An Observation is specific to a particular type of Agent (e.g. its number of inputs), so it must be initd to fit an Agent (or another Obsrevation) before use.
Definition at line 37 of file Observation.h.
|
Definition at line 29 of file Observation.cpp. References mContinuousCircularData, mContinuousInputData, mContinuousResolution, mDiscreteInputData, mDiscreteNumOptionsData, mNumContinuousDimensions, and mNumDiscreteDimensions. |
|
Definition at line 40 of file Observation.cpp. References mContinuousCircularData, mContinuousInputData, mDiscreteInputData, and mDiscreteNumOptionsData. |
|
Copies the given input data.
Definition at line 180 of file Observation.cpp. References mDiscreteInputData, and mNumDiscreteDimensions. Referenced by verve::Agent::planningSequence(). |
|
Returns a constant pointer to the array of data encoding which continuous dimensions are circular.
Definition at line 241 of file Observation.cpp. References mContinuousCircularData. |
|
Returns a constant pointer to the array of continuous input data.
Definition at line 236 of file Observation.cpp. References mContinuousInputData. Referenced by verve::RLModule::resetState(), verve::RLModule::update(), and verve::RLModule::updatePolicyOnly(). |
|
Returns whether the continuous input at the given index represents a circular data range.
Definition at line 251 of file Observation.cpp. References mContinuousCircularData. |
|
Returns the continuous sensor resolution.
Definition at line 256 of file Observation.cpp. References mContinuousResolution. |
|
Returns the value of the continuous data element at the given index.
Definition at line 231 of file Observation.cpp. References mContinuousInputData. |
|
Returns a constant pointer to the array of discrete input data.
Definition at line 215 of file Observation.cpp. References mDiscreteInputData. Referenced by verve::RLModule::resetState(), verve::RLModule::update(), and verve::RLModule::updatePolicyOnly(). |
|
Returns the number of options for the discrete input at the given index.
Definition at line 246 of file Observation.cpp. References mDiscreteNumOptionsData. Referenced by verve::RBFInputData::init(), verve::PredictiveModel::predictAndTrain(), and verve::PredictiveModel::PredictiveModel(). |
|
Returns a constant pointer to the array of data encoding the number of options for each discrete input.
Definition at line 220 of file Observation.cpp. References mDiscreteNumOptionsData. |
|
Returns the value of the discrete data element at the given index.
Definition at line 210 of file Observation.cpp. References mDiscreteInputData. Referenced by verve::RBFInputData::init(), verve::PredictiveModel::predict(), and verve::PredictiveModel::predictAndTrain(). |
|
Returns the number of continuous input dimensions.
Definition at line 198 of file Observation.cpp. References mNumContinuousDimensions. |
|
Returns the number of discrete input dimensions.
Definition at line 193 of file Observation.cpp. References mNumDiscreteDimensions. Referenced by verve::RBFInputData::init(), verve::PredictiveModel::predict(), verve::PredictiveModel::predictAndTrain(), and verve::PredictiveModel::PredictiveModel(). |
|
Initializes the Observation to match the given Observation. Also copies the actual input data. Definition at line 116 of file Observation.cpp. References mDiscreteInputData, mDiscreteNumOptionsData, mNumContinuousDimensions, and mNumDiscreteDimensions. |
|
Initializes the Observation to fit the given Agent.
Definition at line 63 of file Observation.cpp. References verve::Agent::getDescriptor(), verve::AgentDescriptor::getDiscreteSensorNumOptions(), verve::AgentDescriptor::getNumContinuousSensors(), verve::AgentDescriptor::getNumDiscreteSensors(), mDiscreteInputData, mDiscreteNumOptionsData, mNumContinuousDimensions, and mNumDiscreteDimensions. Referenced by verve::Agent::Agent(). |
|
Sets the value of the continuous data element at the given index. The value must be within [-1, 1]. Definition at line 225 of file Observation.cpp. References mContinuousInputData. |
|
Sets the value of the discrete data element at the given index. The value must be within [0, # of possible values - 1]. Definition at line 203 of file Observation.cpp. References mDiscreteInputData, and mDiscreteNumOptionsData. |
|
Zeroes all input data.
Definition at line 167 of file Observation.cpp. References mDiscreteInputData, and mNumDiscreteDimensions. Referenced by verve::Agent::resetShortTermMemory(). |
|
An array of data encoding which continuous dimensions are circular.
Definition at line 137 of file Observation.h. Referenced by getContinuousCircularData(), getContinuousInputIsCircular(), Observation(), and ~Observation(). |
|
An array of continuous input data.
Definition at line 133 of file Observation.h. Referenced by getContinuousInputData(), getContinuousValue(), Observation(), setContinuousValue(), and ~Observation(). |
|
The resolution used for each continuous input.
Definition at line 140 of file Observation.h. Referenced by getContinuousResolution(), and Observation(). |
|
An array of discrete input data.
Definition at line 126 of file Observation.h. Referenced by copyInputData(), getDiscreteInputData(), getDiscreteValue(), init(), Observation(), setDiscreteValue(), zeroInputData(), and ~Observation(). |
|
An array of data encoding the number of options for each discrete input.
Definition at line 130 of file Observation.h. Referenced by getDiscreteInputNumOptions(), getDiscreteNumOptionsData(), init(), Observation(), setDiscreteValue(), and ~Observation(). |
|
The number of continuous input dimensions.
Definition at line 123 of file Observation.h. Referenced by getNumContinuousInputs(), init(), and Observation(). |
|
The number of discrete input dimensions.
Definition at line 120 of file Observation.h. Referenced by copyInputData(), getNumDiscreteInputs(), init(), Observation(), and zeroInputData(). |