Implementation of various Q-Learning algorithms, such as DQN, double DQN. More...
Public Types | |
| using | ActionType = typename EnvironmentType::Action |
| Convenient typedef for action. More... | |
| using | StateType = typename EnvironmentType::State |
| Convenient typedef for state. More... | |
Public Member Functions | |
| QLearning (TrainingConfig config, NetworkType network, PolicyType policy, ReplayType replayMethod, UpdaterType updater=UpdaterType(), EnvironmentType environment=EnvironmentType()) | |
| Create the QLearning object with given settings. More... | |
| bool & | Deterministic () |
| Modify the training mode / test mode indicator. More... | |
| const bool & | Deterministic () const |
| Get the indicator of training mode / test mode. More... | |
| double | Episode () |
| Execute an episode. More... | |
| double | Step () |
| Execute a step in an episode. More... | |
| const size_t & | TotalSteps () const |
Implementation of various Q-Learning algorithms, such as DQN, double DQN.
For more details, see the following:
| EnvironmentType | The environment of the reinforcement learning task. |
| NetworkType | The network to compute action value. |
| UpdaterType | How to apply gradients when training. |
| PolicyType | Behavior policy of the agent. |
| ReplayType | Experience replay method. |
Definition at line 57 of file q_learning.hpp.
| using ActionType = typename EnvironmentType::Action |
Convenient typedef for action.
Definition at line 64 of file q_learning.hpp.
| using StateType = typename EnvironmentType::State |
Convenient typedef for state.
Definition at line 61 of file q_learning.hpp.
| QLearning | ( | TrainingConfig | config, |
| NetworkType | network, | ||
| PolicyType | policy, | ||
| ReplayType | replayMethod, | ||
| UpdaterType | updater = UpdaterType(), |
||
| EnvironmentType | environment = EnvironmentType() |
||
| ) |
Create the QLearning object with given settings.
If you want to pass in a parameter and discard the original parameter object, be sure to use std::move to avoid unnecessary copy.
| config | Hyper-parameters for training. |
| network | The network to compute action value. |
| policy | Behavior policy of the agent. |
| replayMethod | Experience replay method. |
| updater | How to apply gradients when training. |
| environment | Reinforcement learning task. |
|
inline |
Modify the training mode / test mode indicator.
Definition at line 104 of file q_learning.hpp.
|
inline |
Get the indicator of training mode / test mode.
Definition at line 106 of file q_learning.hpp.
| double Episode | ( | ) |
Execute an episode.
| double Step | ( | ) |
Execute a step in an episode.
|
inline |
Definition at line 101 of file q_learning.hpp.