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

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

#include <DoublePoleBalancing.h>

+ Inheritance diagram for DoublePoleBalancing:

Public Member Functions

 DoublePoleBalancing (bool fullyObservable=true)
 
virtual bool actionSpaceContinuous () const
 
virtual int actionSpaceDimension () const
 
virtual int actionSpaceElements () const
 
virtual double deltaT () const
 Time between two simulation steps. More...
 
virtual const ActionactionSpaceLowerBound () const
 
virtual const ActionactionSpaceUpperBound () const
 
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 two poles mounted at the top of the cart do not pass a defined angle threshold.

A simpler version of this benchmark is SinglePoleBalancing.

polebalancing.png

Constructor & Destructor Documentation

DoublePoleBalancing::DoublePoleBalancing ( bool  fullyObservable = true)

Member Function Documentation

bool DoublePoleBalancing::actionSpaceContinuous ( ) const
virtual

Implements OpenANN::ActionSpace.

int DoublePoleBalancing::actionSpaceDimension ( ) const
virtual

Implements OpenANN::ActionSpace.

int DoublePoleBalancing::actionSpaceElements ( ) const
virtual

Implements OpenANN::ActionSpace.

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

Implements OpenANN::ActionSpace.

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

Implements OpenANN::ActionSpace.

double DoublePoleBalancing::deltaT ( ) const
virtual

Time between two simulation steps.

Reimplemented from OpenANN::Environment.

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

Get current action.

Returns
action

Implements OpenANN::Environment.

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

Implements OpenANN::ActionSpace.

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

Implements OpenANN::StateSpace.

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

Get current state.

Returns
state

Implements OpenANN::Environment.

void DoublePoleBalancing::restart ( )
virtual

Restart environment.

Implements OpenANN::Environment.

double DoublePoleBalancing::reward ( ) const
virtual

Get reward.

Returns
reward for the last state transition

Implements OpenANN::Environment.

bool DoublePoleBalancing::stateSpaceContinuous ( ) const
virtual

Implements OpenANN::StateSpace.

int DoublePoleBalancing::stateSpaceDimension ( ) const
virtual

Implements OpenANN::StateSpace.

int DoublePoleBalancing::stateSpaceElements ( ) const
virtual

Implements OpenANN::StateSpace.

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

Implements OpenANN::StateSpace.

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

Implements OpenANN::StateSpace.

void DoublePoleBalancing::stateTransition ( const Action action)
virtual

Perform an action.

Parameters
actionnext action

Implements OpenANN::Environment.

int DoublePoleBalancing::stepsInEpisode ( ) const
virtual

Number of steps during the episode.

Implements OpenANN::Environment.

bool DoublePoleBalancing::successful ( ) const
virtual

Check if the agent was successful.

Returns
was the agent successful?

Implements OpenANN::Environment.

bool DoublePoleBalancing::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: