-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPredictionModule.h
More file actions
60 lines (53 loc) · 1.38 KB
/
PredictionModule.h
File metadata and controls
60 lines (53 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* PredictionModule.h
*
* Created on: Mar 20, 2014
* Author: sam
*/
#ifndef PREDICTIONMODULE_H_
#define PREDICTIONMODULE_H_
#include "Template.h"
//#include "ISL29023Representation.h"
#include "PredictionRepresentation.h"
#include "SupervisedAlgorithm.h"
#include "ControlAlgorithm.h"
#include "RL.h"
#include "Projector.h"
MODULE(PredictionModule)
PROVIDES(PredictionRepresentation) //
END_MODULE
class PredictionModule: public PredictionModuleBase
{
private:
// Supervised Learning
int nbTrainingSample;
int nbMaxTrainingSamples;
float gridResolution;
int nbTilings;
//
RLLib::Random<float>* random;
RLLib::Vector<float>* x;
RLLib::SemiLinearIDBD<float>* predictor;
// Reinforcement Learning
float epsilon;
RLLib::RLProblem<float>* problem;
RLLib::Hashing<float>* hashing;
RLLib::Projector<float>* projector;
RLLib::StateToStateAction<float>* toStateAction;
RLLib::Trace<float>* e;
float alpha;
float gamma;
float lambda;
RLLib::Sarsa<float>* sarsa;
RLLib::Policy<float>* acting;
RLLib::OnPolicyControlLearner<float>* control;
RLLib::RLAgent<float>* agent;
RLLib::Simulator<float>* sim;
public:
PredictionModule();
~PredictionModule();
void init();
void execute();
void update(PredictionRepresentation& thePredictionRepresentation);
};
#endif /* PREDICTIONMODULE_H_ */