00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VERVE_PREDICTIVE_MODEL_H
00025 #define VERVE_PREDICTIVE_MODEL_H
00026
00027 #include "Globals.h"
00028 #include "Observation.h"
00029 #include "RBFInputData.h"
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 namespace verve
00040 {
00041 class Population;
00042 class RBFPopulation;
00043
00049 class PredictiveModel
00050 {
00051 public:
00055 VERVE_DECL PredictiveModel(const Observation& obs,
00056 bool isDynamicRBFEnabled, unsigned int numActions);
00057
00058 VERVE_DECL virtual ~PredictiveModel();
00059
00061 VERVE_DECL virtual void VERVE_CALL resetShortTermMemory();
00062
00069 VERVE_DECL virtual void VERVE_CALL predictAndTrain(
00070 const Observation& actualPrevObs,
00071 unsigned int prevAction, const Observation& actualCurrentObs,
00072 const real actualCurrentReward, Observation& predCurrentObs,
00073 real& predCurrentReward, real& predUncertainty);
00074
00078 VERVE_DECL virtual void VERVE_CALL predict(
00079 const Observation& actualCurrentObs,
00080 unsigned int currentAction, Observation& predNextObs,
00081 real& predNextReward, real& predUncertainty,
00082 bool allowDynamicRBFCreation);
00083
00085 VERVE_DECL virtual void VERVE_CALL changeStepSize(real newValue);
00086
00094 VERVE_DECL virtual void VERVE_CALL setDeltaLearningRate(
00095 real timeConstant, real stepSize);
00096
00099 VERVE_DECL virtual real VERVE_CALL getPredictionMSE();
00100
00101 protected:
00104 RBFInputData mStateActionInputData;
00105
00110 real* mDiscObsTrainingData;
00111
00113 RBFPopulation* mStateActionRepresentation;
00114
00116 Population* mDiscObsPredPopulation;
00117
00119 Population* mContObsPredPopulation;
00120
00122 Population* mRewardPredPopulation;
00123
00125 Population* mUncertaintyPredPopulation;
00126
00128 std::vector<Population*> mAllPopulations;
00129
00131 real mLatestPredMSE;
00132
00134 real mDeltaLearningTimeConstant;
00135
00137 real mDeltaLearningFactor;
00138 };
00139 }
00140
00141 #endif