MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The IXMyCaffeGym interface is used to interact with each Gym. More...
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, SimpleDatum > | Render (bool bShowUi, int nWidth, int nHeight, bool bGetAction) |
Render the gym on a bitmap. More... | |
Tuple< Bitmap, SimpleDatum > | Render (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... | |
The IXMyCaffeGym interface is used to interact with each Gym.
Definition at line 98 of file Interfaces.cs.
IXMyCaffeGym MyCaffe.gym.IXMyCaffeGym.Clone | ( | PropertySet | properties = null | ) |
Copy a gym creating a new one.
properties | Optionally, specifies the properties used to initialize the gym (default = null which skips calling Initialize). |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
void MyCaffe.gym.IXMyCaffeGym.Close | ( | ) |
Close a previously initialized gym.
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
Dictionary< string, int > MyCaffe.gym.IXMyCaffeGym.GetActionSpace | ( | ) |
Returns a dictionary containing the action space where each entry contains the action name and action value.
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
DatasetDescriptor MyCaffe.gym.IXMyCaffeGym.GetDataset | ( | DATA_TYPE | dt, |
Log | log = null |
||
) |
Returns the dataset of the gym.
dt | Specifies the datatype to use. |
log | Optionally, specifies a Log override to use (default = null). |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
void MyCaffe.gym.IXMyCaffeGym.Initialize | ( | Log | log, |
PropertySet | properties | ||
) |
Initialize the gym using the properties in the PropertySet.
log | Specifies the output Log for the gym to use. |
properties | Specifies 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.
Tuple< Bitmap, SimpleDatum > MyCaffe.gym.IXMyCaffeGym.Render | ( | bool | bShowUi, |
int | nWidth, | ||
int | nHeight, | ||
bool | bGetAction | ||
) |
Render the gym on a bitmap.
bShowUi | Specifies whether or not the gym rendering is intended for the user interface. |
nWidth | Specifies the width of the user interface. |
nHeight | Specifies the height of the user interface. |
bGetAction | Specifies to get the action data. |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
Tuple< Bitmap, SimpleDatum > MyCaffe.gym.IXMyCaffeGym.Render | ( | bool | bShowUi, |
int | nWidth, | ||
int | nHeight, | ||
double[] | rgData, | ||
bool | bGetAction | ||
) |
Render the gym on a bitmap.
bShowUi | Specifies whether or not the gym rendering is intended for the user interface. |
nWidth | Specifies the width of the user interface. |
nHeight | Specifies the height of the user interface. |
rgData | Specifies the state information of the gym. |
bGetAction | Specifies to collect the action data. |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
Tuple< State, double, bool > MyCaffe.gym.IXMyCaffeGym.Reset | ( | bool | bGetLabel = false , |
PropertySet | props = null |
||
) |
Resets the state of they gym.
bGetLabel | Optionally, specifies to query the label (default = false). |
props | Optionally, specifies the properties used when resetting. |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
Tuple< State, double, bool > MyCaffe.gym.IXMyCaffeGym.Step | ( | int | nAction, |
bool | bGetLabel = false , |
||
PropertySet | extraProp = null |
||
) |
Run an action on the gym.
nAction | Specifies the action to run, which is an index into the action space. |
bGetLabel | Optionally, specifies to query the label (default = false). |
extraProp | Optionally, specifies extra properties. |
Implemented in MyCaffe.gym.AtariGym, MyCaffe.gym.CartPoleGym, MyCaffe.gym.CurveGym, MyCaffe.gym.DataGeneralGym, and MyCaffe.gym.ModelGym.
|
get |
Returns the name of the gym.
Definition at line 119 of file Interfaces.cs.
|
get |
Returns whether or not the gym requires the display image.
Definition at line 181 of file Interfaces.cs.
|
get |
Returns the selected data-type.
Definition at line 173 of file Interfaces.cs.
|
get |
Returns an array of data types supported by the gym.
Definition at line 177 of file Interfaces.cs.
|
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.
|
get |
Returns the user-interface delay to use (if any).
Definition at line 169 of file Interfaces.cs.