Scheduler
Public Member Functions | Static Public Attributes | List of all members
Mdp::QLearning Class Reference

#include <qLearning.h>

Inheritance diagram for Mdp::QLearning:
Mdp::RlBackupAlgorithm

Public Member Functions

 QLearning (std::shared_ptr< Context > context, TabularActionValues *actionValues)
 
void init () override
 
void updateActionValues (state_t previousState, state_t nextState, action_t previousAction, double reward) override
 
void end () override
 
- Public Member Functions inherited from Mdp::RlBackupAlgorithm
 RlBackupAlgorithm (std::shared_ptr< Context > c, ActionValuesFunction *av)
 
virtual ~RlBackupAlgorithm ()
 
virtual double getMaxQ (state_t state)
 
virtual std::pair< action_t, double > getBestActionAndQ (state_t state)
 
virtual action_t getBestAction (state_t state)
 
virtual void updateBestActionAndQ (state_t state)
 
virtual void notifyUpdateNeeded ()
 

Static Public Attributes

static constexpr const char * configKey = "QLearning"
 

Additional Inherited Members

- Protected Member Functions inherited from Mdp::RlBackupAlgorithm
virtual void initAlpha ()
 
virtual void updateAlpha ()
 
virtual void updateIfNeeded (state_t state)
 
- Protected Attributes inherited from Mdp::RlBackupAlgorithm
std::shared_ptr< Contextcontext {nullptr}
 
ActionValuesFunctionactionValues {nullptr}
 
double alpha {-1.0}
 
double alpha0 {0.1}
 
double alphaCounter {1.0}
 
double alphaDecaySpeed {1.0}
 
bool hyperbolic {false}
 
bool stepwise {false}
 
unsigned long long stepwiseCounter {0}
 
unsigned long long int stepLength {0}
 
std::vector< double > bestQ
 
std::vector< action_tbestAction
 
std::vector< bool > needsUpdate
 

Detailed Description

Definition at line 23 of file qLearning.h.

Constructor & Destructor Documentation

QLearning::QLearning ( std::shared_ptr< Context context,
TabularActionValues actionValues 
)

Definition at line 23 of file qLearning.cpp.

Member Function Documentation

void QLearning::end ( )
overridevirtual

Implements Mdp::RlBackupAlgorithm.

Definition at line 40 of file qLearning.cpp.

void QLearning::init ( )
overridevirtual

Implements Mdp::RlBackupAlgorithm.

Definition at line 29 of file qLearning.cpp.

void QLearning::updateActionValues ( state_t  previousState,
state_t  nextState,
action_t  previousAction,
double  reward 
)
overridevirtual

Implements Mdp::RlBackupAlgorithm.

Definition at line 46 of file qLearning.cpp.

Member Data Documentation

constexpr const char* Mdp::QLearning::configKey = "QLearning"
static

Definition at line 26 of file qLearning.h.


The documentation for this class was generated from the following files: