bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitrl::rl::multi_agent::AgentTrainer< EnvType, LearnerType > Class Template Reference

Train one agent of a multi-agent environment, an episode at a time. More...

#include <agent_trainer.h>

Public Member Functions

 AgentTrainer (const MultiAgentTrainerConfig &config, LearnerType &learner)
MultiAgentTrainingResult train (EnvType &env)
 Run config.n_episodes episodes of training.

Detailed Description

template<typename EnvType, typename LearnerType>
requires agent_env<EnvType> && agent_learner<LearnerType, EnvType>
class bitrl::rl::multi_agent::AgentTrainer< EnvType, LearnerType >

Train one agent of a multi-agent environment, an episode at a time.

The same loop as MultiAgentTrainer, for a learner of one agent whose environment, such as a bitrl::envs::multi_agent::DistributedAgentEnv, gets the actions of the other agents elsewhere. Every participant of a distributed training runs one, with the same number of episodes.

Constructor & Destructor Documentation

◆ AgentTrainer()

template<typename EnvType, typename LearnerType>
bitrl::rl::multi_agent::AgentTrainer< EnvType, LearnerType >::AgentTrainer ( const MultiAgentTrainerConfig & config,
LearnerType & learner )
inline

Member Function Documentation

◆ train()

template<typename EnvType, typename LearnerType>
MultiAgentTrainingResult bitrl::rl::multi_agent::AgentTrainer< EnvType, LearnerType >::train ( EnvType & env)
inline

Run config.n_episodes episodes of training.


The documentation for this class was generated from the following file: