2.6 KiB
Limitations and Common Issues
Unity SDK
Headless Mode
If you enable Headless mode, you will not be able to collect visual observations from your agents.
Rendering Speed and Synchronization
Currently the speed of the game physics can only be increased to 100x real-time. The Academy also moves in time with FixedUpdate() rather than Update(), so game behavior tied to frame updates may be out of sync.
Python API
Python version
As of version 0.3, we no longer support Python 2.
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 here.
Environment Connection Timeout
If you are able to launch the environment from UnityEnvironment
but
then receive a timeout error, there may be a number of possible causes.
- Cause: There may be no Brains in your environment which are set
to
External
. In this case, the environment will not attempt to communicate with python. Solution: Set the Brains(s) you wish to externally control through the Python API toExternal
from the Unity Editor, and rebuild the environment. - 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 here.
- 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.
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 either
the Academy or 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.