GitHub - Unity-Technologies/ml-agents: Unity Machine Learning Agents Toolkit
Train:
在anaconda prompt中(需要pytorch环境)
cd D:\ml-agents-release_16
mlagents-learn .\config\ppo\3DBall.yaml --run-id=ball
如果是上次训练中断了,
mlagents-learn config/ppo/3DBall.yaml --run-id=first3DBallRun --resume
或者删除D:\ml-agents-release_16文件夹下的result 文件夹。
Your trained model will be at results/<run-identifier>/<behavior_name>.onnx
where <behavior_name>
is the name of the Behavior Name
of the agents corresponding to the model. This file corresponds to your model's latest checkpoint. You can now embed this trained model into your Agents by following the steps below,
- Move your model file into
Project/Assets/ML-Agents/Examples/3DBall/TFModels/
. - Open the Unity Editor, and select the 3DBall scene as described above.
- Select the 3DBall prefab Agent object.
- Drag the
<behavior_name>.onnx
file from the Project window of the Editor to the Model placeholder in the Ball3DAgent inspector window. - Press the Play button at the top of the Editor.