bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitrl::rl::policies::RandomTabularPolicy Class Reference

class RandomTabularPolicy More...

#include <random_tabular_policy.h>

Public Types

typedef uint_t output_type
 The type returned when calling this->operator().

Public Member Functions

 RandomTabularPolicy ()
 Constructor.
 RandomTabularPolicy (uint_t seed)
 Constructor Initialize with a seed.
template<typename MatType>
output_type operator() (const MatType &q_map, uint_t state_idx) const
 operator(). Given a
output_type operator() (const torch_tensor_t &vec) const
template<typename VecTp>
output_type operator() (const VecTp &vec) const
 operator(). Given a vector always returns the position of the maximum occuring element. If the given vector is empty returns CubeAIConsts::invalid_size_type
template<typename MatType>
output_type get_action (const MatType &q_map, uint_t state_idx)
 get_action. Given a
template<typename VecTp>
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
void on_episode (uint_t) noexcept
 any actions the policy should perform on the given episode index
void reset () noexcept
 Reset the policy.

Detailed Description

Member Typedef Documentation

◆ output_type

The type returned when calling this->operator().

Constructor & Destructor Documentation

◆ RandomTabularPolicy() [1/2]

bitrl::rl::policies::RandomTabularPolicy::RandomTabularPolicy ( )

Constructor.

◆ RandomTabularPolicy() [2/2]

bitrl::rl::policies::RandomTabularPolicy::RandomTabularPolicy ( uint_t seed)
explicit

Constructor Initialize with a seed.

Member Function Documentation

◆ get_action() [1/2]

template<typename MatType>
output_type bitrl::rl::policies::RandomTabularPolicy::get_action ( const MatType & q_map,
uint_t state_idx )

get_action. Given a

◆ get_action() [2/2]

template<typename VecTp>
RandomTabularPolicy::output_type bitrl::rl::policies::RandomTabularPolicy::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

◆ on_episode()

void bitrl::rl::policies::RandomTabularPolicy::on_episode ( uint_t )
inlinenoexcept

any actions the policy should perform on the given episode index

◆ operator()() [1/3]

template<typename MatType>
output_type bitrl::rl::policies::RandomTabularPolicy::operator() ( const MatType & q_map,
uint_t state_idx ) const

operator(). Given a

◆ operator()() [2/3]

RandomTabularPolicy::output_type bitrl::rl::policies::RandomTabularPolicy::operator() ( const torch_tensor_t & vec) const
inline

◆ operator()() [3/3]

template<typename VecTp>
RandomTabularPolicy::output_type bitrl::rl::policies::RandomTabularPolicy::operator() ( const VecTp & vec) const

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

◆ reset()

void bitrl::rl::policies::RandomTabularPolicy::reset ( )
inlinenoexcept

Reset the policy.


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