Unity ML-Agents Python Interface - Animal AI Fork
This is a fork of the ML-Agents Python package maintained by the Kinds of Intelligence team at Leverhulme Centre for the Future of Intelligence to support the Animal-AI environment.
The mlagents_envs Python package is part of the
ML-Agents Toolkit.
mlagents_envs provides three Python APIs that allows direct interaction with the
Unity game engine:
- A single agent API (Gym API)
- A gym-like multi-agent API (PettingZoo API)
- A low-level API (LLAPI)
The LLAPI is used by the trainer implementation in mlagents.
mlagents_envs can be used independently of mlagents for Python
communication.
Installation
Install the mlagents_envs package with:
python -m pip install mlagents_envs==1.1.0
Usage & More Information
See
for more information on how to use the API to interact with a Unity environment.
For more information on the ML-Agents Toolkit and how to instrument a Unity scene with the ML-Agents SDK, check out the main ML-Agents Toolkit documentation.
Limitations
mlagents_envsuses localhost ports to exchange data between Unity and Python. As such, multiple instances can have their ports collide, leading to errors. Make sure to use a different port if you are using multiple instances ofUnityEnvironment.- Communication between Unity and the Python
UnityEnvironmentis not secure. - On Linux, ports are not released immediately after the communication closes.
As such, you cannot reuse ports right after closing a
UnityEnvironment.
Metadata
Release files for mlagents-envs-aai 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mlagents_envs_aai-1.0.0.tar.gz | 53.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlagents_envs_aai-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.9 kB
Release files / mlagents_envs_aai-1.0.0.tar.gz
| Download URL | mlagents_envs_aai-1.0.0.tar.gz |
|---|---|
| Size | 53.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22b3643a611406b320fc42f53d2e1d708e63da36ed635af1b0121235f66c6169
|
|
BLAKE2b-256 checksum How to use checksums |
7ebe8d2c39544f2ed644ed6da036ec20f3a786ba0bf1f8c89464ec30694aa78c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / mlagents_envs_aai-1.0.0-py3-none-any.whl
| Download URL | mlagents_envs_aai-1.0.0-py3-none-any.whl |
|---|---|
| Size | 80.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1cb19f0c8400e09608099dd71434f2d0c7d8d55538271c70817e576c4390c2a
|
|
BLAKE2b-256 checksum How to use checksums |
71d06a109cc28473d563c734eb3db581d44669c4b4f490d448ee5c7310f82b66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for mlagents-envs-aai 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.