13 #ifndef MLPACK_METHODS_RL_Q_LEARNING_HPP 14 #define MLPACK_METHODS_RL_Q_LEARNING_HPP 51 typename EnvironmentType,
55 typename ReplayType = RandomReplay<EnvironmentType>
82 ReplayType replayMethod,
83 UpdaterType updater = UpdaterType(),
84 EnvironmentType environment = EnvironmentType());
109 const NetworkType&
Network()
const {
return learningNetwork; }
111 NetworkType&
Network() {
return learningNetwork; }
119 arma::Col<size_t> BestAction(
const arma::mat& actionValues);
125 NetworkType learningNetwork;
128 NetworkType targetNetwork;
137 ReplayType replayMethod;
140 EnvironmentType environment;
156 #include "q_learning_impl.hpp" NetworkType & Network()
Modify the learning network.
typename EnvironmentType::Action ActionType
Convenient typedef for action.
QLearning(TrainingConfig config, NetworkType network, PolicyType policy, ReplayType replayMethod, UpdaterType updater=UpdaterType(), EnvironmentType environment=EnvironmentType())
Create the QLearning object with given settings.
bool & Deterministic()
Modify the training mode / test mode indicator.
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Episode()
Execute an episode.
typename EnvironmentType::State StateType
Convenient typedef for state.
const NetworkType & Network() const
Return the learning network.
const bool & Deterministic() const
Get the indicator of training mode / test mode.
const size_t & TotalSteps() const
Implementation of various Q-Learning algorithms, such as DQN, double DQN.
double Step()
Execute a step in an episode.