mlpack
Classes | Public Member Functions | List of all members
mlpack::rl::DiscreteActionEnv Class Reference

To use the dummy environment, one may start by specifying the state and action dimensions. More...

#include <env_type.hpp>

Classes

class  Action
 Implementation of discrete action. More...
 
class  State
 Implementation of state of the dummy environment. More...
 

Public Member Functions

double Sample (const State &, const Action &, State &)
 Dummy function to mimic sampling in an environment. More...
 
State InitialSample ()
 Dummy function to mimic initial sampling in an environment. More...
 
bool IsTerminal (const State &) const
 Dummy function to find terminal state. More...
 

Detailed Description

To use the dummy environment, one may start by specifying the state and action dimensions.

Eg:

DiscreteActionEnv::Action::size = 2;

Now the DiscreteActionEnv class can be used as an EnvironmentType in RL methods just as any other mlpack's implementation of gym environments.

Member Function Documentation

◆ InitialSample()

State mlpack::rl::DiscreteActionEnv::InitialSample ( )
inline

Dummy function to mimic initial sampling in an environment.

Returns
the dummy state.

◆ IsTerminal()

bool mlpack::rl::DiscreteActionEnv::IsTerminal ( const State ) const
inline

Dummy function to find terminal state.

Parameters
*(state) The current state.
Returns
It's of no use but so lets keep it false.

◆ Sample()

double mlpack::rl::DiscreteActionEnv::Sample ( const State ,
const Action ,
State  
)
inline

Dummy function to mimic sampling in an environment.

Parameters
*(state) The current state.
*(action) The current action.
*(nextState) The next state.
Returns
It's of no use so lets keep it 0.

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