One agent of a multi-agent environment that learns its own Q-table with Q-learning, as if the others were part of the environment.
More...
#include <q_learning_agent.h>
|
| struct | Greedy |
| | An actor that acts greedily with this table. More...
|
One agent of a multi-agent environment that learns its own Q-table with Q-learning, as if the others were part of the environment.
It reads its own observation, reward and done flag from the multi-agent time steps, and explores with an epsilon-greedy policy whose generator is seeded with bitsim::utils::concurrency::task_seed(config.seed, agent). IndependentQLearning is a team of them; on its own, the agent can learn in a process of its own, see bitrl::envs::multi_agent::DistributedAgentEnv, and learns there exactly what it learns in the team.
◆ action_type
◆ QLearningAgent()
◆ act()
template<typename TimeStepType>
| uint_t bitrl::rl::multi_agent::QLearningAgent::act |
( |
const TimeStepType & | step | ) |
|
An exploring action; 0 if the agent is done.
◆ act_greedy()
template<typename TimeStepType>
| uint_t bitrl::rl::multi_agent::QLearningAgent::act_greedy |
( |
const TimeStepType & | step | ) |
const |
The greedy action; 0 if the agent is done.
◆ agent()
| uint_t bitrl::rl::multi_agent::QLearningAgent::agent |
( |
| ) |
const |
|
inlinenoexcept |
The index of the agent in the time steps.
◆ epsilon()
| real_t bitrl::rl::multi_agent::QLearningAgent::epsilon |
( |
| ) |
const |
|
inlinenoexcept |
◆ greedy()
| Greedy bitrl::rl::multi_agent::QLearningAgent::greedy |
( |
| ) |
const |
|
inline |
◆ on_episode_begin()
| void bitrl::rl::multi_agent::QLearningAgent::on_episode_begin |
( |
uint_t | | ) |
|
|
inline |
◆ on_episode_end()
| void bitrl::rl::multi_agent::QLearningAgent::on_episode_end |
( |
uint_t | episode | ) |
|
|
inline |
◆ q_table()
| const DynMat< real_t > & bitrl::rl::multi_agent::QLearningAgent::q_table |
( |
| ) |
const |
|
inlinenoexcept |
◆ update()
template<typename TimeStepType>
| void bitrl::rl::multi_agent::QLearningAgent::update |
( |
const TimeStepType & | step, |
|
|
uint_t | action, |
|
|
const TimeStepType & | next ) |
Learn from the transition step –action--> next; nothing once the agent is done.
The documentation for this class was generated from the following file: