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

CQFunctionAnalyzer Class Reference

Analyzer for Q-Functions. More...

#include <canalyzer.h>

List of all members.



Public Member Functions

  CQFunctionAnalyzer (CAbstractQFunction *qFunction, CStateProperties *modelState, std::list< CStateModifier * > *modifiers)
  Create a new Q-Function Analyzer.

virtual  ~CQFunctionAnalyzer ()
void  setQFunction (CAbstractQFunction *l_qFunction)
void  save1DValues (FILE *stream, CActionSet *action, CState *initstate, int dim1, int part1)
  Create a 1 dimensional Table of the Shape of the Q-Function.

void  save2DValues (FILE *stream, CActionSet *action, CState *initstate, int dim1, int part1, int dim2, int part2)
  Create a 2 dimensional Table of the Shape of the V-Function.

void  save2DValues (char *filename, CActionSet *action, CState *initstate, int dim1, int part1, int dim2, int part2)
void  saveStateValues (FILE *stream, CActionSet *action, CStateList *states)
  Creates a table of the values of the specified states, the tables are created for each action in the specified action set.



Protected Attributes

CAbstractQFunction qFunction
CStateProperties modelStateProperties
CStateCollectionImpl stateCollection

Detailed Description

Analyzer for Q-Functions.

With Q-Function Analyzers you can create different tables for showing the shape of your continuous Q-Functions for different actions. These tables can only be saved to a file. The analyzer supports:

  • 1 dimensional Tables
  • 2 dimensional Tables
  • calculate the Value for each State in a given list The tables are created for each action in the specified action set.

A 1-dimensional Table can be created with the function save1DValues. You can choose the dimension for which the table shall be created and the number of partitions for this dimension. Addtionally you can specify an init-state, this init-state is used for the state values for all other dimensions. This function can only be used for continuous state variables. A 2-dimensional Table can be created with the function save2DValues. You can choose both dimension, and the number of partitions for each dimension. The initstate is used in the same way as for 1-D Tables. This function can only be used for continuous state variables. The table for specific states is created saveStateValues, here you just have to specify the states in the state list object. This function can also be used for discrete states.


Constructor & Destructor Documentation

CQFunctionAnalyzer::CQFunctionAnalyzer CAbstractQFunction qFunction,
CStateProperties modelState,
std::list< CStateModifier * > *  modifiers
 

Create a new Q-Function Analyzer.

The analyzer needs the qFunction, the modelstate and all the modifiers the v-function needs. It is recommended to take the agent's state modifiers (agent->getStateModifiers();).

virtual CQFunctionAnalyzer::~CQFunctionAnalyzer  )  [virtual]
 

Member Function Documentation

void CQFunctionAnalyzer::save1DValues FILE *  stream,
CActionSet action,
CState initstate,
int  dim1,
int  part1
 

Create a 1 dimensional Table of the Shape of the Q-Function.

A 1-dimensional Table can be created with the function save1DValues. You can choose the dimension for which the table shall be created and the number of partitions for this dimension. Addtionally you can specify an init-state, this init-state is used for the state values for all other dimensions. The tables are created for each action in the specified action set. . This function can only be used for continuous state variables.

void CQFunctionAnalyzer::save2DValues char *  filename,
CActionSet action,
CState initstate,
int  dim1,
int  part1,
int  dim2,
int  part2
 
void CQFunctionAnalyzer::save2DValues FILE *  stream,
CActionSet action,
CState initstate,
int  dim1,
int  part1,
int  dim2,
int  part2
 

Create a 2 dimensional Table of the Shape of the V-Function.

A 2-dimensional Table can be created with the function save2DValues. You can choose both dimension, and the number of partitions for each dimension. The initstate is used in the same way as for 1-D Tables. This function can only be used for continuous state variables. The tables are created for each action in the specified action set.

void CQFunctionAnalyzer::saveStateValues FILE *  stream,
CActionSet action,
CStateList states
 

Creates a table of the values of the specified states, the tables are created for each action in the specified action set.

void CQFunctionAnalyzer::setQFunction CAbstractQFunction l_qFunction  ) 
 

Member Data Documentation

CStateProperties* CQFunctionAnalyzer::modelStateProperties [protected]
 
CAbstractQFunction* CQFunctionAnalyzer::qFunction [protected]
 
CStateCollectionImpl* CQFunctionAnalyzer::stateCollection [protected]
 

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