GestureLearner Class |
Namespace: RavingBots.MagicGestures.AI
public class GestureLearner : MonoSingleton<GestureLearner>
The GestureLearner type exposes the following members.
Name | Description | |
---|---|---|
GestureLearner | Initializes a new instance of the GestureLearner class |
Name | Description | |
---|---|---|
MLP |
The neural network used for recognizing the gestures.
| |
Status |
The current status of the training.
|
Name | Description | |
---|---|---|
Awake |
Configure the component.
(Overrides MonoSingletonTAwake.) | |
CreateGesturePreprocessor |
Create a preprocessor instance using the stored configuration.
| |
CreateSamples |
Convert a list of spells to a list of training samples.
| |
GetBPSettings |
Create backpropagation settings using the stored configuration.
| |
OnDisable |
Cancel the training when this component is disabled.
| |
OnDrawGizmos |
Draw the debug grid based on most recently attempted gesture.
| |
Recognize |
Try to recognize a gesture.
| |
StartTraining |
Start the training process.
| |
StopTraining |
Request the training in progress to be cancelled.
|
Name | Description | |
---|---|---|
_backpropagation |
The training algorithm used.
| |
_gesturePreprocessor |
The preprocessor instance used.
| |
_gizmoGesture |
The most recently input gesture, used to draw the debug grid.
| |
_mlp |
The neural network used for recognizing the gestures.
| |
_trainedMLP |
The neural network in training.
| |
GridResolutionX |
The width of the grid onto which the gesture is projected during the preprocessing phase.
| |
GridResolutionY |
The height of the grid onto which the gesture is projected during the preprocessing phase.
| |
GridResolutionZ |
The depth of the grid onto which the gesture is projected during the preprocessing phase.
| |
HiddenLayers |
The number of hidden layers in the neural network.
| |
LearningRate |
The learning rate is used by the backpropagation training algorithm. The parameter determines the speed
of the training.
| |
MaxIterations |
The training is continued for the specified number of iterations unless the target error is reached
earlier.
| |
Momentum |
The momentum parameter is used by the backpropagation training algorithm. The parameter accelerates
the training process.
| |
RecognitionThreshold |
The threshold that must be crossed by one of the outputs of the neural network to identify a valid gesture.
| |
SamplesPerGesture |
The number of gesture repeats used for training a single spell. Each repeated gesture is
added to the training set. The neural network recognises spells by generalising patterns provided
in the training set.
| |
TargetError |
The training process is stopped when the training error reaches the specified value.
|
This component keeps the neural network and the gesture preprocessor instance (both of which are configured through the public fields) and exposes them so they can be used by the rest of the project.
Most of the actual work is done in the linked classes (a notable exception is the work done by Recognize(GestureData, Single) method, which finds a gesture based on the input and the detection threshold set in RecognitionThreshold).