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
SinglePoleBalancing Class Reference

In this environment the agent has to control a cart such that the pole mounted at the top of the cart does not pass a defined angle threshold. More...

#include <SinglePoleBalancing.h>

+ Inheritance diagram for SinglePoleBalancing:

Public Member Functions

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

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

In this environment the agent has to control a cart such that the pole mounted at the top of the cart does not pass a defined angle threshold.

A more difficult version of this benchmark is DoublePoleBalancing.

Constructor & Destructor Documentation

SinglePoleBalancing::SinglePoleBalancing ( bool  fullyObservable = true)

Member Function Documentation

bool SinglePoleBalancing::actionSpaceContinuous ( ) const
virtual

Implements OpenANN::ActionSpace.

int SinglePoleBalancing::actionSpaceDimension ( ) const
virtual

Implements OpenANN::ActionSpace.

int SinglePoleBalancing::actionSpaceElements ( ) const
virtual

Implements OpenANN::ActionSpace.

const OpenANN::Environment::Action & SinglePoleBalancing::actionSpaceLowerBound ( ) const
virtual

Implements OpenANN::ActionSpace.

const OpenANN::Environment::Action & SinglePoleBalancing::actionSpaceUpperBound ( ) const
virtual

Implements OpenANN::ActionSpace.

double SinglePoleBalancing::deltaT ( ) const
virtual

Time between two simulation steps.

Reimplemented from OpenANN::Environment.

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

Get current action.

Returns
action

Implements OpenANN::Environment.

const OpenANN::ActionSpace::A & SinglePoleBalancing::getDiscreteActionSpace ( ) const
virtual

Implements OpenANN::ActionSpace.

const OpenANN::StateSpace::S & SinglePoleBalancing::getDiscreteStateSpace ( ) const
virtual

Implements OpenANN::StateSpace.

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

Get current state.

Returns
state

Implements OpenANN::Environment.

void SinglePoleBalancing::restart ( )
virtual

Restart environment.

Implements OpenANN::Environment.

double SinglePoleBalancing::reward ( ) const
virtual

Get reward.

Returns
reward for the last state transition

Implements OpenANN::Environment.

bool SinglePoleBalancing::stateSpaceContinuous ( ) const
virtual

Implements OpenANN::StateSpace.

int SinglePoleBalancing::stateSpaceDimension ( ) const
virtual

Implements OpenANN::StateSpace.

int SinglePoleBalancing::stateSpaceElements ( ) const
virtual

Implements OpenANN::StateSpace.

const OpenANN::Environment::State & SinglePoleBalancing::stateSpaceLowerBound ( ) const
virtual

Implements OpenANN::StateSpace.

const OpenANN::Environment::State & SinglePoleBalancing::stateSpaceUpperBound ( ) const
virtual

Implements OpenANN::StateSpace.

void SinglePoleBalancing::stateTransition ( const Action action)
virtual

Perform an action.

Parameters
actionnext action

Implements OpenANN::Environment.

int SinglePoleBalancing::stepsInEpisode ( ) const
virtual

Number of steps during the episode.

Implements OpenANN::Environment.

bool SinglePoleBalancing::successful ( ) const
virtual

Check if the agent was successful.

Returns
was the agent successful?

Implements OpenANN::Environment.

bool SinglePoleBalancing::terminalState ( ) const
virtual

Check for terminal state.

Returns
is the environment in a terminal state?

Implements OpenANN::Environment.


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