How to Export a Policy - PathmindAI/nativerl GitHub Wiki

Step 1

Inspect the ExperimentCompletionReport.txt generated in your PPO folder. This will tell you where the best policy is located.

export_policy

Step 2

Navigate to the folder specified in the ExperimentCompletionReport.txt and locate the model folder.

export_policy

Zip up all the files in the model folder.

export_policy

Step 3

Finally, load this zip file back in AnyLogic as explained here.

Optional

If your training is interrupted or if you wish to test policies during training, you can still obtain a copy of your RL policy. In your PPO folder, you will notice a folder called checkpoint_model.

export_policy

NativeRL will generate an RL policy at each checkpoint interval which you can set before starting training (see here). Simply zip these files up and load them in AnyLogic to test the policy.

export_policy