Forward declaration of OneStepSarsaWorker.
More...
#include <async_learning.hpp>
|
using | StateType = typename EnvironmentType::State |
|
using | ActionType = typename EnvironmentType::Action |
|
using | TransitionType = std::tuple< StateType, ActionType, double, StateType, ActionType > |
|
template<typename EnvironmentType, typename NetworkType, typename UpdaterType, typename PolicyType>
class mlpack::rl::OneStepSarsaWorker< EnvironmentType, NetworkType, UpdaterType, PolicyType >
Forward declaration of OneStepSarsaWorker.
One step Sarsa worker.
- Template Parameters
-
EnvironmentType | The type of the reinforcement learning task. |
NetworkType | The type of the network model. |
UpdaterType | The type of the optimizer. |
PolicyType | The type of the behavior policy. |
◆ OneStepSarsaWorker() [1/3]
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
Construct one step sarsa worker with the given parameters and environment.
- Parameters
-
updater | The optimizer. |
environment | The reinforcement learning task. |
config | Hyper-parameters. |
deterministic | Whether it should be deterministic. |
◆ OneStepSarsaWorker() [2/3]
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
◆ OneStepSarsaWorker() [3/3]
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
◆ Initialize()
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
Initialize the worker.
- Parameters
-
learningNetwork | The shared network. |
◆ operator=() [1/2]
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
◆ operator=() [2/2]
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
◆ Step()
template<typename EnvironmentType , typename NetworkType , typename UpdaterType , typename PolicyType >
bool mlpack::rl::OneStepSarsaWorker< EnvironmentType, NetworkType, UpdaterType, PolicyType >::Step |
( |
NetworkType & |
learningNetwork, |
|
|
NetworkType & |
targetNetwork, |
|
|
size_t & |
totalSteps, |
|
|
PolicyType & |
policy, |
|
|
double & |
totalReward |
|
) |
| |
|
inline |
The agent will execute one step.
- Parameters
-
learningNetwork | The shared learning network. |
targetNetwork | The shared target network. |
totalSteps | The shared counter for total steps. |
policy | The shared behavior policy. |
totalReward | This will be the episode return if the episode ends after this step. Otherwise this is invalid. |
- Returns
- Indicate whether current episode ends after this step.
The documentation for this class was generated from the following files: