# Unity ML-Agent 安裝 1.安裝 Unity Hub (方便更改版本) https://unity.com/cn/download ![](https://i.imgur.com/95NeSDw.png) 2.安裝 Anaconda 用於建立訓練環境 https://www.anaconda.com/download/ ![](https://i.imgur.com/NZ74C8r.png) 3.安裝 ML-Agent https://github.com/Unity-Technologies/ml-agents/releases 安裝新版本 4.在 Anaconda 建立一個環境 ![](https://i.imgur.com/YYYQmu1.png) ![](https://i.imgur.com/RbQbLRC.png) 環境建立好後開啟並安裝 PyTorch (需要注意 Python 的版本是否和 PyTorch 相容,並查看自己 Cuda 的版本) https://pytorch.org/ 5.在環境下安裝 mlagent pip install mlagents 6.Unity 安裝 ML Agent 開啟前面 ml-agents 的專案 ![](https://i.imgur.com/ZggtiMw.png) 進到 Windows -> Package Manager 找到 ML Agents安裝 ![](https://i.imgur.com/YK9AuQV.png) ![](https://i.imgur.com/zScXW94.png) 接安裝完後就可利用 ml-agents 專案的範例遊玩並觀看 諾是visual studio沒有連到MLAgents 到Edit -> Preferences ![](https://hackmd.io/_uploads/BkG58y66n.png) 確保你的External Tool 選到你要的visual studio