GenerativeAdversarialImitationLearning allows an agent to learn from experts’ trajectories.
The ReinforcementLearning and Discriminator models must be created separately. Then use setReinforcementLearningModel() and setDiscriminatorModel() to put it inside the GenerativeAdversarialImitationLearning model.
ReinforcementLearning and Discriminator models must be a part of NeuralNetwork model. If you decide to use linear regression or logistic regression, then it must be constructed using NeuralNetwork model.
Ensure the output layer of the Discriminator model has only one neuron and its activation function set to “Sigmoid”. It is the default setting for all Discriminator models in research papers.
The number of neurons at the ReinforcementLearning’s output layer must be equal to the number of neurons at the Discriminator’s input layer.
It is recommended that the learning rate for the ReinforcementLearning is higher than the Discriminator.
Create new model object. If any of the arguments are nil, default argument values for that argument will be used.
GenerativeAdversarialImitationLearning.new(numberOfStepsPerEpisode: number): ModelObject
Set model’s parameters. When any of the arguments are nil, previous argument values for that argument will be used.
GenerativeAdversarialImitationLearning:setParameters(numberOfStepsPerEpisode: number)
Sets the ReinforcementLearning into the model.
GenerativeAdversarialImitationLearning:setReinforcementLearningModel(ReinforcementLearningModel: Model)
Sets the Discriminator into the model.
GenerativeAdversarialImitationLearning:setDiscriminatorModel(DiscriminatorModel: Model)
Gets the ReinforcementLearning from the model.
GenerativeAdversarialImitationLearning:getReinforcementLearningModel(): Model
Gets the Discriminator from the model.
GenerativeAdversarialImitationLearning:getDiscriminatorModel(): Model
OneVsAll:setClassesList(ClassesList: [])
OneVsAll:getClassesList(): []
Categorically trains the model.
GenerativeAdversarialImitationLearning:categoricalTrain(previousFeatureMatrix: matrix, expertActionMatrix: matrix, currentFeatureMatrix: matrix)
previousFeatureMatrix: The matrix containing the feature environment values.
expertActionMatrix: The matrix containing the action values generated by an expert.
currentFeatureMatrix: The matrix containing the feature environment values after an action has been taken by the expert.
Diagonally Gaussian trains the model.
GenerativeAdversarialImitationLearning:diagonalGaussianTrain(previousFeatureMatrix: matrix, expertActionMeanMatrix: matrix, expertStandardDeviationMatrix: matrix,currentFeatureMatrix: matrix)
previousFeatureMatrix: The matrix containing the feature environment values.
expertActionMeanMatrix: The matrix containing the action mean values generated by an expert.
expertStandardDeviationMatrix: The matrix containing the action standard deviation values generated by an expert.
currentFeatureMatrix: The matrix containing the feature environment values after an action has been taken by the expert.
Generates the output from Discriminator.
GenerativeAdversarialImitationLearning:evaluate(featureMatrix: matrix): matrix
Generates the output from Generator.
GenerativeAdversarialImitationLearning:generate(featureMatrix: matrix, returnOriginalOutput: boolean): matrix
-OR-