MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.gym.IXMyCaffeGym Interface Reference

The IXMyCaffeGym interface is used to interact with each Gym. More...

Inheritance diagram for MyCaffe.gym.IXMyCaffeGym:
MyCaffe.gym.AtariGym MyCaffe.gym.CartPoleGym MyCaffe.gym.CurveGym MyCaffe.gym.IXMyCaffeGymData MyCaffe.gym.IXMyCaffeGymRange MyCaffe.gym.DataGeneralGym MyCaffe.gym.ModelGym

Public Member Functions

void Initialize (Log log, PropertySet properties)
 Initialize the gym using the properties in the PropertySet. More...
 
void Close ()
 Close a previously initialized gym. More...
 
IXMyCaffeGym Clone (PropertySet properties=null)
 Copy a gym creating a new one. More...
 
Tuple< State, double, bool > Reset (bool bGetLabel=false, PropertySet props=null)
 Resets the state of they gym. More...
 
Tuple< State, double, bool > Step (int nAction, bool bGetLabel=false, PropertySet extraProp=null)
 Run an action on the gym. More...
 
Tuple< Bitmap, SimpleDatumRender (bool bShowUi, int nWidth, int nHeight, bool bGetAction)
 Render the gym on a bitmap. More...
 
Tuple< Bitmap, SimpleDatumRender (bool bShowUi, int nWidth, int nHeight, double[] rgData, bool bGetAction)
 Render the gym on a bitmap. More...
 
Dictionary< string, int > GetActionSpace ()
 Returns a dictionary containing the action space where each entry contains the action name and action value. More...
 
DatasetDescriptor GetDataset (DATA_TYPE dt, Log log=null)
 Returns the dataset of the gym. More...
 

Properties

string Name [get]
 Returns the name of the gym. More...
 
int UiDelay [get]
 Returns the user-interface delay to use (if any). More...
 
DATA_TYPE SelectedDataType [get]
 Returns the selected data-type. More...
 
DATA_TYPE[] SupportedDataType [get]
 Returns an array of data types supported by the gym. More...
 
bool RequiresDisplayImage [get]
 Returns whether or not the gym requires the display image. More...
 
double TestingPercent [get]
 Returns the percentage of the data to use for testing, or -1 which then uses the default of 0.2. More...
 

Detailed Description

The IXMyCaffeGym interface is used to interact with each Gym.

Definition at line 98 of file Interfaces.cs.

Member Function Documentation

◆ Clone()

IXMyCaffeGym MyCaffe.gym.IXMyCaffeGym.Clone ( PropertySet  properties = null)

Copy a gym creating a new one.

Parameters
propertiesOptionally, specifies the properties used to initialize the gym (default = null which skips calling Initialize).
Returns
The new gym copy is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Close()

void MyCaffe.gym.IXMyCaffeGym.Close ( )

◆ GetActionSpace()

Dictionary< string, int > MyCaffe.gym.IXMyCaffeGym.GetActionSpace ( )

Returns a dictionary containing the action space where each entry contains the action name and action value.

Returns
The action space dictionary is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ GetDataset()

DatasetDescriptor MyCaffe.gym.IXMyCaffeGym.GetDataset ( DATA_TYPE  dt,
Log  log = null 
)

Returns the dataset of the gym.

Parameters
dtSpecifies the datatype to use.
logOptionally, specifies a Log override to use (default = null).
Returns
The dataset descriptor is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Initialize()

void MyCaffe.gym.IXMyCaffeGym.Initialize ( Log  log,
PropertySet  properties 
)

Initialize the gym using the properties in the PropertySet.

Parameters
logSpecifies the output Log for the gym to use.
propertiesSpecifies the properties used to initialize the gym.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Render() [1/2]

Tuple< Bitmap, SimpleDatum > MyCaffe.gym.IXMyCaffeGym.Render ( bool  bShowUi,
int  nWidth,
int  nHeight,
bool  bGetAction 
)

Render the gym on a bitmap.

Parameters
bShowUiSpecifies whether or not the gym rendering is intended for the user interface.
nWidthSpecifies the width of the user interface.
nHeightSpecifies the height of the user interface.
bGetActionSpecifies to get the action data.
Returns
A tuple containing image showing the gym and the action data is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Render() [2/2]

Tuple< Bitmap, SimpleDatum > MyCaffe.gym.IXMyCaffeGym.Render ( bool  bShowUi,
int  nWidth,
int  nHeight,
double[]  rgData,
bool  bGetAction 
)

Render the gym on a bitmap.

Parameters
bShowUiSpecifies whether or not the gym rendering is intended for the user interface.
nWidthSpecifies the width of the user interface.
nHeightSpecifies the height of the user interface.
rgDataSpecifies the state information of the gym.
bGetActionSpecifies to collect the action data.
Returns
A tuple containing image showing the gym and the action data is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Reset()

Tuple< State, double, bool > MyCaffe.gym.IXMyCaffeGym.Reset ( bool  bGetLabel = false,
PropertySet  props = null 
)

Resets the state of they gym.

Parameters
bGetLabelOptionally, specifies to query the label (default = false).
propsOptionally, specifies the properties used when resetting.
Returns
A tuple containing state information and gym data, the reward and whether or not the gym is done is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

◆ Step()

Tuple< State, double, bool > MyCaffe.gym.IXMyCaffeGym.Step ( int  nAction,
bool  bGetLabel = false,
PropertySet  extraProp = null 
)

Run an action on the gym.

Parameters
nActionSpecifies the action to run, which is an index into the action space.
bGetLabelOptionally, specifies to query the label (default = false).
extraPropOptionally, specifies extra properties.
Returns
A tuple containing state information and gym data, the reward and whether or not the gym is done is returned.

Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.

Property Documentation

◆ Name

string MyCaffe.gym.IXMyCaffeGym.Name
get

Returns the name of the gym.

Definition at line 119 of file Interfaces.cs.

◆ RequiresDisplayImage

bool MyCaffe.gym.IXMyCaffeGym.RequiresDisplayImage
get

Returns whether or not the gym requires the display image.

Definition at line 181 of file Interfaces.cs.

◆ SelectedDataType

DATA_TYPE MyCaffe.gym.IXMyCaffeGym.SelectedDataType
get

Returns the selected data-type.

Definition at line 173 of file Interfaces.cs.

◆ SupportedDataType

DATA_TYPE [] MyCaffe.gym.IXMyCaffeGym.SupportedDataType
get

Returns an array of data types supported by the gym.

Definition at line 177 of file Interfaces.cs.

◆ TestingPercent

double MyCaffe.gym.IXMyCaffeGym.TestingPercent
get

Returns the percentage of the data to use for testing, or -1 which then uses the default of 0.2.

Definition at line 185 of file Interfaces.cs.

◆ UiDelay

int MyCaffe.gym.IXMyCaffeGym.UiDelay
get

Returns the user-interface delay to use (if any).

Definition at line 169 of file Interfaces.cs.


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