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

CStoredEpisodeModel Class Reference

Serves as environment model for an agent, simulating the episodes from an agent logger. More...

#include <cepisodehistory.h>

Inheritance diagram for CStoredEpisodeModel:

CEnvironmentModel CAgentController CStateObject CActionObject CParameterObject CParameters List of all members.


Public Member Functions

  CStoredEpisodeModel (CEpisodeHistory *history)
  Creates a simulated environment model, simulating the given history.

  ~CStoredEpisodeModel ()
virtual CEpisodeHistory getEpisodeHistory ()
virtual void  setEpisodeHistory (CEpisodeHistory *hist)
virtual void  getState (CState *state)
  Gets the state with the given states properties from the history.

virtual void  getState (CStateCollectionImpl *stateCollection)
virtual CAction getNextAction (CStateCollection *state)
  Implementation of the agent controller interface, gets the action executed in the current step.



Protected Member Functions

virtual void  doNextState (CPrimitiveAction *action)
  Sets the state to the next step.

virtual void  doResetModel ()


Protected Attributes

CEpisodeHistory history
  Pointer to the history.

CEpisode currentEpisode
  Pointer to the current episode.

int  numEpisode
int  numStep

Detailed Description

Serves as environment model for an agent, simulating the episodes from an agent logger.

The simulated environment model reproduces logged episodes for the agent, it can be used as it were a normal environment model, so the listeners of the agent can learn from the logged data as if it is new created data. The environment takes an episode history and simulates the episodes in sequence. Therefore it handels pointer tto the currentEpisode and the number of steps already simulated in that episode.

The class also serves as agent controller, giving back the actions from the steps. The environment episode must be used as agent controller because obviously only the actions from the episode history can be "executed".
When fetching a state collection via getState(CStateCollection *), the environment model registers all states in the statecollection, which are in the episode history and member of the state collection. These states are marked as already calculated, so only the states which are not stored in the history have to be recalculated.
See also:
CEpisodeHistory

Constructor & Destructor Documentation

CStoredEpisodeModel::CStoredEpisodeModel CEpisodeHistory history  ) 
 

Creates a simulated environment model, simulating the given history.

CStoredEpisodeModel::~CStoredEpisodeModel  ) 
 

Member Function Documentation

virtual void CStoredEpisodeModel::doNextState CPrimitiveAction action  )  [protected, virtual]
 

Sets the state to the next step.

Increases the numSteps field ans sets the reset flag if the episode has ended.

Implements CEnvironmentModel.

virtual void CStoredEpisodeModel::doResetModel  )  [protected, virtual]
 

Sets the currentEpisode to the next Episode in history.

Reimplemented from CEnvironmentModel.

virtual CEpisodeHistory* CStoredEpisodeModel::getEpisodeHistory  )  [virtual]
 
virtual CAction* CStoredEpisodeModel::getNextAction CStateCollection state  )  [virtual]
 

Implementation of the agent controller interface, gets the action executed in the current step.

virtual void CStoredEpisodeModel::getState CStateCollectionImpl stateCollection  )  [virtual]
 

Registers all states in the statecollection, which are in the episode history and member of the state collection. These states are marked as already calculated, so only the states which are not stored in the history have to be recalculated.

Reimplemented from CEnvironmentModel.

virtual void CStoredEpisodeModel::getState CState state  )  [virtual]
 

Gets the state with the given states properties from the history.

Reimplemented from CEnvironmentModel.

virtual void CStoredEpisodeModel::setEpisodeHistory CEpisodeHistory hist  )  [virtual]
 

Member Data Documentation

CEpisode* CStoredEpisodeModel::currentEpisode [protected]
 

Pointer to the current episode.

CEpisodeHistory* CStoredEpisodeModel::history [protected]
 

Pointer to the history.

int CStoredEpisodeModel::numEpisode [protected]
 
int CStoredEpisodeModel::numStep [protected]
 

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