Unity 机器学习代理工具包 (ML-Agents) 是一个开源项目,它使游戏和模拟能够作为训练智能代理的环境。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

3.0 KiB

Frequently Asked Questions

Installation problems

Environment Permission Error

If you directly import your Unity environment without building it in the editor, you might need to give it additional permissions to execute it.

If you receive such a permission error on macOS, run:

chmod -R 755 *.app

or on Linux:

chmod -R 755 *.x86_64

On Windows, you can find instructions.

Environment Connection Timeout

If you are able to launch the environment from UnityEnvironment but then receive a timeout error like this:

UnityAgentsException: The Communicator was unable to connect. Please make sure the External process is ready to accept communication with Unity.

There may be a number of possible causes:

  • Cause: There may be no agent in the scene
  • Cause: On OSX, the firewall may be preventing communication with the environment. Solution: Add the built environment binary to the list of exceptions on the firewall by following instructions.
  • Cause: An error happened in the Unity Environment preventing communication. Solution: Look into the log files generated by the Unity Environment to figure what error happened.
  • Cause: You have assigned HTTP_PROXY and HTTPS_PROXY values in your environment variables. Solution: Remove these values and try again.
  • Cause: You are running in a headless environment (e.g. remotely connected to a server). Solution: Pass --no-graphics to mlagents-learn, or no_graphics=True to RemoteRegistryEntry.make() or the UnityEnvironment initializer. If you need graphics for visual observations, you will need to set up xvfb (or equivalent).

Communication port {} still in use

If you receive an exception "Couldn't launch new environment because communication port {} is still in use. ", you can change the worker number in the Python script when calling

UnityEnvironment(file_name=filename, worker_id=X)

Mean reward : nan

If you receive a message Mean reward : nan when attempting to train a model using PPO, this is due to the episodes of the Learning Environment not terminating. In order to address this, set Max Steps for the Agents within the Scene Inspector to a value greater than 0. Alternatively, it is possible to manually set done conditions for episodes from within scripts for custom episode-terminating events.

"File name" cannot be opened because the developer cannot be verified.

If you have downloaded the repository using the github website on macOS 10.15 (Catalina) or later, you may see this error when attempting to play scenes in the Unity project. Workarounds include installing the package using the Unity Package Manager (this is the officially supported approach - see here), or following the instructions here to verify the relevant files on your machine on a file-by-file basis.