bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::TimeStep< StateTp > Class Template Reference

Forward declaration. More...

#include <time_step.h>

Public Types

typedef StateTp state_type
 state_ Type of the state
 

Public Member Functions

 TimeStep ()
 TimeStep.
 
 TimeStep (TimeStepTp type, real_t reward, const state_type &obs)
 TimeStep. Constructor.
 
 TimeStep (TimeStepTp type, real_t reward, const state_type &obs, real_t discount_factor)
 TimeStep. Constructor.
 
 TimeStep (TimeStepTp type, real_t reward, const state_type &obs, real_t discount_factor, std::unordered_map< std::string, std::any > &&extra)
 TimeStep. Constructor.
 
 TimeStep (const TimeStep &other)
 TimeStep.
 
TimeStepoperator= (const TimeStep &other)
 Assignment operator.
 
 TimeStep (TimeStep &&other) noexcept
 TimeStep.
 
TimeStepoperator= (TimeStep &&other) noexcept
 operator =
 
bool first () const noexcept
 first
 
bool mid () const noexcept
 mid
 
bool last () const noexcept
 last
 
TimeStepTp type () const noexcept
 type
 
state_type observation () const
 observation
 
real_t reward () const noexcept
 reward
 
real_t discount () const noexcept
 discount. Returns the discount factor
 
bool done () const noexcept
 done
 
void clear () noexcept
 clear
 
template<typename T >
const T & get_extra (std::string name) const
 get_extra
 
const std::unordered_map< std::string, std::any > & info () const noexcept
 info
 
std::unordered_map< std::string, std::any > & info () noexcept
 info
 

Detailed Description

template<typename StateTp>
class bitrl::TimeStep< StateTp >

Forward declaration.

The TimeStep class.

Member Typedef Documentation

◆ state_type

template<typename StateTp >
typedef StateTp bitrl::TimeStep< StateTp >::state_type

state_ Type of the state

Constructor & Destructor Documentation

◆ TimeStep() [1/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( )

◆ TimeStep() [2/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( TimeStepTp  type,
real_t  reward,
const state_type obs 
)

TimeStep. Constructor.

◆ TimeStep() [3/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( TimeStepTp  type,
real_t  reward,
const state_type obs,
real_t  discount_factor 
)

TimeStep. Constructor.

◆ TimeStep() [4/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( TimeStepTp  type,
real_t  reward,
const state_type obs,
real_t  discount_factor,
std::unordered_map< std::string, std::any > &&  extra 
)

TimeStep. Constructor.

◆ TimeStep() [5/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( const TimeStep< StateTp > &  other)

TimeStep.

Parameters
other

◆ TimeStep() [6/6]

template<typename StateTp >
bitrl::TimeStep< StateTp >::TimeStep ( TimeStep< StateTp > &&  other)
noexcept

TimeStep.

Parameters
other

Member Function Documentation

◆ clear()

template<typename StateTp >
void bitrl::TimeStep< StateTp >::clear ( )
noexcept

clear

◆ discount()

template<typename StateTp >
real_t bitrl::TimeStep< StateTp >::discount ( ) const
inlinenoexcept

discount. Returns the discount factor

◆ done()

template<typename StateTp >
bool bitrl::TimeStep< StateTp >::done ( ) const
inlinenoexcept

done

Returns

◆ first()

template<typename StateTp >
bool bitrl::TimeStep< StateTp >::first ( ) const
inlinenoexcept

first

Returns

◆ get_extra()

template<typename StateTp >
template<typename T >
const T & bitrl::TimeStep< StateTp >::get_extra ( std::string  name) const

get_extra

◆ info() [1/2]

template<typename StateTp >
const std::unordered_map< std::string, std::any > & bitrl::TimeStep< StateTp >::info ( ) const
inlinenoexcept

info

Returns

◆ info() [2/2]

template<typename StateTp >
std::unordered_map< std::string, std::any > & bitrl::TimeStep< StateTp >::info ( )
inlinenoexcept

info

Returns

◆ last()

template<typename StateTp >
bool bitrl::TimeStep< StateTp >::last ( ) const
inlinenoexcept

last

Returns

◆ mid()

template<typename StateTp >
bool bitrl::TimeStep< StateTp >::mid ( ) const
inlinenoexcept

mid

Returns

◆ observation()

template<typename StateTp >
state_type bitrl::TimeStep< StateTp >::observation ( ) const
inline

observation

Returns

◆ operator=() [1/2]

template<typename StateTp >
TimeStep< StateTp > & bitrl::TimeStep< StateTp >::operator= ( const TimeStep< StateTp > &  other)

Assignment operator.

◆ operator=() [2/2]

template<typename StateTp >
TimeStep< StateTp > & bitrl::TimeStep< StateTp >::operator= ( TimeStep< StateTp > &&  other)
noexcept

operator =

Parameters
other
Returns

◆ reward()

template<typename StateTp >
real_t bitrl::TimeStep< StateTp >::reward ( ) const
inlinenoexcept

reward

Returns

◆ type()

template<typename StateTp >
TimeStepTp bitrl::TimeStep< StateTp >::type ( ) const
inlinenoexcept

type

Returns

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