bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitrl::rl::algos::dp::ValueIteration< EnvType > Class Template Reference

ValueIteration class. More...

#include <value_iteration.h>

Inheritance diagram for bitrl::rl::algos::dp::ValueIteration< EnvType >:
Collaboration diagram for bitrl::rl::algos::dp::ValueIteration< EnvType >:

Public Types

typedef DPSolverBase< EnvType >::env_type env_type
 env_t
Public Types inherited from bitrl::rl::algos::dp::DPSolverBase< EnvType >
typedef RLSolverBase< EnvType >::env_type env_type
 The environment type the solver is using.
Public Types inherited from bitrl::rl::algos::RLSolverBase< EnvType >
typedef EnvType env_type

Public Member Functions

 ValueIteration (const ValueIterationConfig config)
 ValueIteration.
virtual void actions_before_training_begins (env_type &env) override
 actions_before_training_begins. Execute any actions the algorithm needs before starting the iterations
virtual void actions_after_training_ends (env_type &) override
 actions_after_training_ends. Actions to execute after the training iterations have finisehd
virtual void actions_before_episode_begins (env_type &, uint_t) override
 actions_before_training_episode
virtual void actions_after_episode_ends (env_type &, uint_t, const EpisodeInfo &) override
 actions_after_training_episode
virtual EpisodeInfo on_training_episode (env_type &env, uint_t episode_idx) override
 on_episode Do one on_episode of the algorithm
void save (const std::string &filename) const
DynVec< real_t > value_function () const
 The value of every state, as the solver has it now.
bitrl::rl::policies::MaxTabularPolicy build_policy (const env_type &env) const
Public Member Functions inherited from bitrl::rl::algos::dp::DPSolverBase< EnvType >
virtual ~DPSolverBase ()=default
 Destructor.
Public Member Functions inherited from bitrl::rl::algos::RLSolverBase< EnvType >
virtual ~RLSolverBase ()=default
 Destructor.

Additional Inherited Members

Protected Member Functions inherited from bitrl::rl::algos::dp::DPSolverBase< EnvType >
 DPSolverBase ()=default
 DPAlgoBase.
Protected Member Functions inherited from bitrl::rl::algos::RLSolverBase< EnvType >
 RLSolverBase ()=default
 Constructor.

Detailed Description

template<typename EnvType>
class bitrl::rl::algos::dp::ValueIteration< EnvType >

ValueIteration class.

Member Typedef Documentation

◆ env_type

template<typename EnvType>
typedef DPSolverBase<EnvType>::env_type bitrl::rl::algos::dp::ValueIteration< EnvType >::env_type

env_t

Constructor & Destructor Documentation

◆ ValueIteration()

template<typename EnvType>
bitrl::rl::algos::dp::ValueIteration< EnvType >::ValueIteration ( const ValueIterationConfig config)

Member Function Documentation

◆ actions_after_episode_ends()

template<typename EnvType>
virtual void bitrl::rl::algos::dp::ValueIteration< EnvType >::actions_after_episode_ends ( env_type & ,
uint_t ,
const EpisodeInfo &  )
inlineoverridevirtual

actions_after_training_episode

Reimplemented from bitrl::rl::algos::RLSolverBase< EnvType >.

◆ actions_after_training_ends()

template<typename EnvType>
void bitrl::rl::algos::dp::ValueIteration< EnvType >::actions_after_training_ends ( env_type & )
overridevirtual

actions_after_training_ends. Actions to execute after the training iterations have finisehd

Implements bitrl::rl::algos::RLSolverBase< EnvType >.

◆ actions_before_episode_begins()

template<typename EnvType>
virtual void bitrl::rl::algos::dp::ValueIteration< EnvType >::actions_before_episode_begins ( env_type & ,
uint_t  )
inlineoverridevirtual

actions_before_training_episode

Reimplemented from bitrl::rl::algos::RLSolverBase< EnvType >.

◆ actions_before_training_begins()

template<typename EnvType>
void bitrl::rl::algos::dp::ValueIteration< EnvType >::actions_before_training_begins ( env_type & env)
overridevirtual

actions_before_training_begins. Execute any actions the algorithm needs before starting the iterations

Implements bitrl::rl::algos::RLSolverBase< EnvType >.

◆ build_policy()

template<typename EnvType>
bitrl::rl::policies::MaxTabularPolicy bitrl::rl::algos::dp::ValueIteration< EnvType >::build_policy ( const env_type & env) const

◆ on_training_episode()

template<typename EnvType>
EpisodeInfo bitrl::rl::algos::dp::ValueIteration< EnvType >::on_training_episode ( env_type & env,
uint_t episode_idx )
overridevirtual

on_episode Do one on_episode of the algorithm

Implements bitrl::rl::algos::RLSolverBase< EnvType >.

◆ save()

template<typename EnvType>
void bitrl::rl::algos::dp::ValueIteration< EnvType >::save ( const std::string & filename) const

◆ value_function()

template<typename EnvType>
DynVec< real_t > bitrl::rl::algos::dp::ValueIteration< EnvType >::value_function ( ) const
inline

The value of every state, as the solver has it now.


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