Wrapper of various asynchronous learning algorithms, e.g. More...
Public Member Functions | |
AsyncLearning (TrainingConfig config, NetworkType network, PolicyType policy, UpdaterType updater=UpdaterType(), EnvironmentType environment=EnvironmentType()) | |
Construct an instance of the given async learning algorithm. More... | |
TrainingConfig & | Config () |
Get training config. More... | |
const TrainingConfig & | Config () const |
Modify training config. More... | |
EnvironmentType & | Environment () |
Get the environment. More... | |
const EnvironmentType & | Environment () const |
Modify the environment. More... | |
NetworkType & | Network () |
Get learning network. More... | |
const NetworkType & | Network () const |
Modify learning network. More... | |
PolicyType & | Policy () |
Get behavior policy. More... | |
const PolicyType & | Policy () const |
Modify behavior policy. More... | |
template < typename Measure > | |
void | Train (Measure &measure) |
Starting async training. More... | |
UpdaterType & | Updater () |
Get optimizer. More... | |
const UpdaterType & | Updater () const |
Modify optimizer. More... | |
Wrapper of various asynchronous learning algorithms, e.g.
async one-step Q-learning, async one-step Sarsa, async n-step Q-learning and async advantage actor-critic.
For more details, see the following:
WorkerType | The type of the worker. |
EnvironmentType | The type of reinforcement learning task. |
NetworkType | The type of the network model. |
UpdaterType | The type of the optimizer. |
PolicyType | The type of the behavior policy. |
Definition at line 57 of file async_learning.hpp.
AsyncLearning | ( | TrainingConfig | config, |
NetworkType | network, | ||
PolicyType | policy, | ||
UpdaterType | updater = UpdaterType() , |
||
EnvironmentType | environment = EnvironmentType() |
||
) |
Construct an instance of the given async learning algorithm.
config | Hyper-parameters for training. |
network | The network model. |
policy | The behavior policy. |
updater | The optimizer. |
environment | The reinforcement learning task. |
|
inline |
Get training config.
Definition at line 92 of file async_learning.hpp.
|
inline |
Modify training config.
Definition at line 94 of file async_learning.hpp.
|
inline |
Get the environment.
Definition at line 112 of file async_learning.hpp.
|
inline |
Modify the environment.
Definition at line 114 of file async_learning.hpp.
|
inline |
Get learning network.
Definition at line 97 of file async_learning.hpp.
|
inline |
Modify learning network.
Definition at line 99 of file async_learning.hpp.
|
inline |
Get behavior policy.
Definition at line 102 of file async_learning.hpp.
|
inline |
Modify behavior policy.
Definition at line 104 of file async_learning.hpp.
void Train | ( | Measure & | measure | ) |
Starting async training.
Measure | The type of the measurement. It should be a callable object like bool foo(double reward); |
measure | The measurement instance. |
|
inline |
Get optimizer.
Definition at line 107 of file async_learning.hpp.
|
inline |
Modify optimizer.
Definition at line 109 of file async_learning.hpp.