|
| PrioritizedReplay () |
| Default constructor.
|
|
| PrioritizedReplay (const size_t batchSize, const size_t capacity, const double alpha, const size_t nSteps=1, const size_t dimension=StateType::dimension) |
| Construct an instance of prioritized experience replay class. More...
|
|
void | Store (StateType state, ActionType action, double reward, StateType nextState, bool isEnd, const double &discount) |
| Store the given experience and set the priorities for the given experience. More...
|
|
void | GetNStepInfo (double &reward, StateType &nextState, bool &isEnd, const double &discount) |
| Get the reward, next state and terminal boolean for nth step. More...
|
|
arma::ucolvec | SampleProportional () |
| Sample some experience according to their priorities. More...
|
|
void | Sample (arma::mat &sampledStates, std::vector< ActionType > &sampledActions, arma::rowvec &sampledRewards, arma::mat &sampledNextStates, arma::irowvec &isTerminal) |
| Sample some experience according to their priorities. More...
|
|
void | UpdatePriorities (arma::ucolvec &indices, arma::colvec &priorities) |
| Update priorities of sampled transitions. More...
|
|
const size_t & | Size () |
| Get the number of transitions in the memory. More...
|
|
void | BetaAnneal () |
| Annealing the beta.
|
|
void | Update (arma::mat target, std::vector< ActionType > sampledActions, arma::mat nextActionValues, arma::mat &gradients) |
| Update the priorities of transitions and Update the gradients. More...
|
|
const size_t & | NSteps () const |
| Get the number of steps for n-step agent.
|
|
template<typename EnvironmentType>
class mlpack::rl::PrioritizedReplay< EnvironmentType >
Implementation of prioritized experience replay.
Prioritized experience replay can replay important transitions more frequently by prioritizing transitions, and make agent learn more efficiently.
@article{schaul2015prioritized,
title = {Prioritized experience replay},
author = {Schaul, Tom and Quan, John and Antonoglou,
Ioannis and Silver, David},
journal = {arXiv preprint arXiv:1511.05952},
year = {2015}
}
- Template Parameters
-
EnvironmentType | Desired task. |