3

I've been trying to get Unity's MLAgents installed on my system. After going through the detailed guide "https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Installation-Windows.md" I managed to get the demo projects like the "3D Ball" to work and train successfully.

My problem is that when I create a new project I get an error highlighted when I include "Using MlAgents" which states "The type of namespace name 'mlagents' could not be found".

I don't have much experience with Unity, so I'm expecting this to be a silly thing I've missed, for instance you might have to import the package, but I have no clue how?

All the tutorials I've found are really outdated so this is my last resort. Any help or advice is appreciated.

I don't understand how the demo project has no errors with "Using mlagents" but new projects do.

Mike Wise
  • 22,131
  • 8
  • 81
  • 104
Kimberly
  • 45
  • 4
  • because MLagents is not by default available for VS, you to add it in your project. – MUK Jan 17 '20 at 11:23

1 Answers1

2

You must include the ML-Agents folder from the UnitySDK in your new project.

Follow the steps from the Environment Setup to install ML Agents on your computer. Then navigate to ml-agents/UnitySDK/Assets/ and copy the ML-Agents folder. Place this folder in your new project's Assets folder.

You should now be able to import MLAgents in your scripts.

Spencer Stream
  • 616
  • 2
  • 6
  • 22