10 #ifndef RL_BACKUP_ALGORITHM_H 11 #define RL_BACKUP_ALGORITHM_H 24 class RandomGenerator;
36 virtual void init() = 0;
37 virtual void updateActionValues(
state_t previousState,
46 virtual double getMaxQ(
state_t state);
47 virtual std::pair<action_t, double> getBestActionAndQ(
state_t state);
49 virtual void updateBestActionAndQ(
state_t state);
50 virtual void notifyUpdateNeeded();
52 std::shared_ptr<Context> context{
nullptr};
56 double alphaCounter{1.0};
57 double alphaDecaySpeed{1.0};
58 bool hyperbolic{
false};
60 unsigned long long stepwiseCounter{0};
61 unsigned long long int stepLength{0};
62 virtual void initAlpha();
63 virtual void updateAlpha();
67 virtual void updateIfNeeded(
state_t state);
std::vector< double > bestQ
std::vector< action_t > bestAction
std::vector< bool > needsUpdate
virtual ~RlBackupAlgorithm()