OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions
OpenANN::Environment Class Referenceabstract

A reinforcement learning environment. More...

#include <Environment.h>

+ Inheritance diagram for OpenANN::Environment:

Public Member Functions

virtual ~Environment ()
 
virtual void restart ()=0
 Restart environment. More...
 
virtual const StategetState () const =0
 Get current state. More...
 
virtual const ActiongetAction () const =0
 Get current action. More...
 
virtual void stateTransition (const Action &action)=0
 Perform an action. More...
 
virtual double reward () const =0
 Get reward. More...
 
virtual bool terminalState () const =0
 Check for terminal state. More...
 
virtual bool successful () const =0
 Check if the agent was successful. More...
 
virtual int stepsInEpisode () const =0
 Number of steps during the episode. More...
 
virtual double deltaT () const
 Time between two simulation steps. More...
 
- Public Member Functions inherited from OpenANN::StateSpace
virtual ~StateSpace ()
 
virtual int stateSpaceDimension () const =0
 
virtual bool stateSpaceContinuous () const =0
 
virtual int stateSpaceElements () const =0
 
virtual const StatestateSpaceLowerBound () const =0
 
virtual const StatestateSpaceUpperBound () const =0
 
virtual const SgetDiscreteStateSpace () const =0
 
- Public Member Functions inherited from OpenANN::ActionSpace
virtual ~ActionSpace ()
 
virtual int actionSpaceDimension () const =0
 
virtual bool actionSpaceContinuous () const =0
 
virtual int actionSpaceElements () const =0
 
virtual const ActionactionSpaceLowerBound () const =0
 
virtual const ActionactionSpaceUpperBound () const =0
 
virtual const AgetDiscreteActionSpace () const =0
 

Additional Inherited Members

- Public Types inherited from OpenANN::StateSpace
typedef Eigen::VectorXd State
 
typedef std::vector< StateS
 
- Public Types inherited from OpenANN::ActionSpace
typedef Eigen::VectorXd Action
 
typedef std::vector< ActionA
 

Detailed Description

A reinforcement learning environment.

Constructor & Destructor Documentation

virtual OpenANN::Environment::~Environment ( )
inlinevirtual

Member Function Documentation

virtual double OpenANN::Environment::deltaT ( ) const
inlinevirtual

Time between two simulation steps.

Reimplemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual const Action& OpenANN::Environment::getAction ( ) const
pure virtual

Get current action.

Returns
action

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual const State& OpenANN::Environment::getState ( ) const
pure virtual

Get current state.

Returns
state

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual void OpenANN::Environment::restart ( )
pure virtual

Restart environment.

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual double OpenANN::Environment::reward ( ) const
pure virtual

Get reward.

Returns
reward for the last state transition

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual void OpenANN::Environment::stateTransition ( const Action action)
pure virtual

Perform an action.

Parameters
actionnext action

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual int OpenANN::Environment::stepsInEpisode ( ) const
pure virtual

Number of steps during the episode.

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual bool OpenANN::Environment::successful ( ) const
pure virtual

Check if the agent was successful.

Returns
was the agent successful?

Implemented in DoublePoleBalancing, and SinglePoleBalancing.

virtual bool OpenANN::Environment::terminalState ( ) const
pure virtual

Check for terminal state.

Returns
is the environment in a terminal state?

Implemented in DoublePoleBalancing, and SinglePoleBalancing.


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