Skip to content

NevarokML: Testing and Deployment

After training a reinforcement learning model using NevarokML, you can test and deploy the trained model within Unreal Engine. This process involves creating an instance of UNevarokMLNNEModel and using it to predict actions based on observations. In this section, we'll walk through the steps to perform testing and deployment using NevarokML.

Testing and Deployment Workflow

  1. Create an instance of UNevarokMLNNEModel: To start, create an instance of the UNevarokMLNNEModel class. This class represents the trained model and provides functionality for prediction.

  2. Provide Action and Observation Samples: You'll need to provide instances of UNevarokMLSample that match the actual model's action space and observation space structure and types. These samples will store the observation and action data that the model will use for prediction.

  3. Set UNNEModelData Asset Reference: Provide a reference to the saved model asset (of type UNNEModelData) to the UNevarokMLNNEModel instance.

  4. Update Observation Sample: Before calling the Predict() function, update the observation sample with the latest observation data.

  5. Call Predict() Function: Call the Predict() function of the UNevarokMLNNEModel instance to update the action sample based on the observation.

  6. Use Predicted Actions: You can now use the predicted actions from the action sample wherever you need to perform actions based on your model's decisions.


Testing and deploying the trained reinforcement learning model within Unreal Engine using NevarokML involves creating an instance of UNevarokMLNNEModel, providing action and observation samples, setting the model data asset reference, updating the observation sample, and calling the Predict() function. This enables you to use the trained model to make predictions and perform actions based on its decisions.