bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
cuberl::rl::policies::MaxTabularPolicy Class Reference

class MaxTabularPolicy More...

#include <max_tabular_policy.h>

Public Types

typedef uint_t output_type
 The output type of operator()
 
typedef uint_t state_type
 
typedef uint_t action_type
 

Public Member Functions

 MaxTabularPolicy ()=default
 Constructor.
 
void on_episode (uint_t) noexcept
 any actions the policy should perform on the given episode index
 
void reset () noexcept
 Reset the policy.
 
action_type on_state (state_type s) const
 Get the action from the given state.
 
void save (const std::string &filename) const
 Save the state -> action map in a CSV file;.
 
template<typename VecTp >
MaxTabularPolicy::action_type get_action (const VecTp &vec)
 

Static Public Member Functions

template<typename MatType >
static output_type get_action (const MatType &q_map, uint_t state_idx)
 get_action. Given a
 
template<typename VecTp >
static output_type get_action (const VecTp &q_map)
 get_action. Given a vector always returns the position of the maximum occuring element. If the given vector is empty returns CubeAIConsts::invalid_size_type
 

Friends

struct MaxTabularPolicyBuilder
 Make friends so the builder access private members.
 

Detailed Description

Member Typedef Documentation

◆ action_type

◆ output_type

The output type of operator()

◆ state_type

Constructor & Destructor Documentation

◆ MaxTabularPolicy()

cuberl::rl::policies::MaxTabularPolicy::MaxTabularPolicy ( )
default

Constructor.

Member Function Documentation

◆ get_action() [1/3]

template<typename MatType >
static output_type cuberl::rl::policies::MaxTabularPolicy::get_action ( const MatType &  q_map,
uint_t  state_idx 
)
static

get_action. Given a

◆ get_action() [2/3]

template<typename VecTp >
static output_type cuberl::rl::policies::MaxTabularPolicy::get_action ( const VecTp &  q_map)
static

get_action. Given a vector always returns the position of the maximum occuring element. If the given vector is empty returns CubeAIConsts::invalid_size_type

◆ get_action() [3/3]

template<typename VecTp >
MaxTabularPolicy::action_type cuberl::rl::policies::MaxTabularPolicy::get_action ( const VecTp &  vec)

◆ on_episode()

void cuberl::rl::policies::MaxTabularPolicy::on_episode ( uint_t  )
inlinenoexcept

any actions the policy should perform on the given episode index

◆ on_state()

action_type cuberl::rl::policies::MaxTabularPolicy::on_state ( state_type  s) const
inline

Get the action from the given state.

◆ reset()

void cuberl::rl::policies::MaxTabularPolicy::reset ( )
inlinenoexcept

Reset the policy.

◆ save()

void cuberl::rl::policies::MaxTabularPolicy::save ( const std::string &  filename) const

Save the state -> action map in a CSV file;.

Friends And Related Symbol Documentation

◆ MaxTabularPolicyBuilder

friend struct MaxTabularPolicyBuilder
friend

Make friends so the builder access private members.


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