bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rl_example_2 Namespace Reference

Classes

struct  SamplingResult
class  MultiArmedBandits
class  EpsilonGreedyPolicy
 The EpsilonGreedyPolicy class. More...
class  BernoulliDist
 class BernoulliDist. Wrapper to std::bernoulli_distribution More...
class  BetaDist
 The beta distribution is a real-valued distribution which produces values in the range [0, 1]. It has two parameters, alpha and beta. More...

Typedefs

template<typename T>
using DynMat
 Dynamically sized matrix to use around the library.
template<typename T>
using DynVec
 Dynamically sized row vector.
using int_t
 integer type
using real_t
 real_t
using uint_t
 uint_t

Functions

void write_pulls (const std::string &filename, const std::vector< real_t > &p, const std::vector< std::pair< std::string, SamplingResult > > &results)
SamplingResult run_epsilon_greedy (MultiArmedBandits &env, real_t eps)
SamplingResult run_thompson_sampling (MultiArmedBandits &env)

Variables

uint_t N_EPISODES = 1000
real_t EPS = 0.2

Typedef Documentation

◆ DynMat

template<typename T>
using bitsim::DynMat

Dynamically sized matrix to use around the library.

◆ DynVec

template<typename T>
using bitsim::DynVec

Dynamically sized row vector.

◆ int_t

integer type

◆ real_t

◆ uint_t

Function Documentation

◆ run_epsilon_greedy()

SamplingResult rl_example_2::run_epsilon_greedy ( MultiArmedBandits & env,
real_t eps )

◆ run_thompson_sampling()

SamplingResult rl_example_2::run_thompson_sampling ( MultiArmedBandits & env)

◆ write_pulls()

void rl_example_2::write_pulls ( const std::string & filename,
const std::vector< real_t > & p,
const std::vector< std::pair< std::string, SamplingResult > > & results )

Variable Documentation

◆ EPS

real_t rl_example_2::EPS = 0.2

◆ N_EPISODES

uint_t rl_example_2::N_EPISODES = 1000