Reinforcement Learning Toolbox 2.0
last updated:
General
Documentation
Manual
Tutorial
Class Reference
Master Thesis
Examples
Related Papers
Downloads
Links
News
mailto:webmaster
Main Page     Class Hierarchy   Compound List   File List   Compound Members   File Members

CMultiStepAction Class Reference

#include <caction.h>

Inheritance diagram for CMultiStepAction:

CAction CExtendedAction CExtendedPrimitiveAction CHierarchicalSemiMarkovDecisionProcess CPrimitiveActionStateChange CSubGoalBehaviour CTaxiHierarchicalBehaviour List of all members.


Public Member Functions

  CMultiStepAction ()
virtual  ~CMultiStepAction ()
virtual bool  isFinished (CStateCollection *oldState, CStateCollection *newState)=0
virtual CActionData getNewActionData ()
  Returns an new CActionData object of the specific sub-class.

virtual CMultiStepActionData getMultiStepActionData ()
virtual int  getDuration ()
  returns the duration of the action (member: duration)



Protected Member Functions

  CMultiStepAction (CMultiStepActionData *multiStepData)


Protected Attributes

CMultiStepActionData multiStepData

Detailed Description

An action with a duration different than one has to be treated with SemiMarkov-Learning rules in all the learning algorithms, since otherwise the result can be far from optimal. Many Learning-Algorithm in the this package support Semi-Markov Learning updates. This action class maintains its own action data object, a CMultiStepActionData object. This data object stores the duration it has needed by now and the finished flag. The duration and the finished flag get normally set by an HierarchicalController, but it is also possible to set the duration for example in the environment model, if you have a primitive action which takes longer than other primitive actions. In that case your model-specific action has to be derivated from CPrimitiveAction and CMultiStepAction.
The class also contains the method isFinished(CStateCollection *state). This method is used (normally by a hierarchical controller) to determine wether the action has finished or not. The controller sets the finished flag according to isFinished, so other Listeners only have to look at this flag. This method must be implemented by all (non-abstract) sub-classes.

Constructor & Destructor Documentation

CMultiStepAction::CMultiStepAction CMultiStepActionData multiStepData  )  [protected]
 
CMultiStepAction::CMultiStepAction  ) 
 
virtual CMultiStepAction::~CMultiStepAction  )  [inline, virtual]
 

Member Function Documentation

virtual int CMultiStepAction::getDuration  )  [inline, virtual]
 

returns the duration of the action (member: duration)

Reimplemented from CAction.

virtual CMultiStepActionData* CMultiStepAction::getMultiStepActionData  )  [inline, virtual]
 
virtual CActionData* CMultiStepAction::getNewActionData  )  [virtual]
 

Returns an new CActionData object of the specific sub-class.

The CActionData Object is created with new and must be deleted by the programmer!

Reimplemented from CAction.

virtual bool CMultiStepAction::isFinished CStateCollection oldState,
CStateCollection newState
[pure virtual]
 

This method is normally used by a hierarchical controller to determine wether the action has finished or not. The finsished method may depend only on the current state transition, so you get the old state and the new state as parameters. The controller sets the finished flag according to isFinished, so other Listeners only have to look at this flag. This method must be implemented by all (non-abstract) sub-classes.

Implemented in CHierarchicalSemiMarkovDecisionProcess, CSubGoalBehaviour, CExtendedPrimitiveAction, CPrimitiveActionStateChange, and CTaxiHierarchicalBehaviour.


Member Data Documentation

CMultiStepActionData* CMultiStepAction::multiStepData [protected]
 

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