Skip to main content

Unity Machine Learning Agents Interface

Project description

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_envs uses 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 of UnityEnvironment.
  • Communication between Unity and the Python UnityEnvironment is not secure.
  • On Linux, ports are not released immediately after the communication closes. As such, you cannot reuse ports right after closing a UnityEnvironment.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlagents_envs_aai-1.0.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlagents_envs_aai-1.0.0-py3-none-any.whl (80.3 kB view details)

Uploaded Python 3

File details

Details for the file mlagents_envs_aai-1.0.0.tar.gz.

File metadata

  • Download URL: mlagents_envs_aai-1.0.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mlagents_envs_aai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 22b3643a611406b320fc42f53d2e1d708e63da36ed635af1b0121235f66c6169
MD5 7b12ab215cdb79cef1ad45094c359cbb
BLAKE2b-256 7ebe8d2c39544f2ed644ed6da036ec20f3a786ba0bf1f8c89464ec30694aa78c

See more details on using hashes here.

File details

Details for the file mlagents_envs_aai-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mlagents_envs_aai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1cb19f0c8400e09608099dd71434f2d0c7d8d55538271c70817e576c4390c2a
MD5 ec96b652c7eea84734aef2441d342dae
BLAKE2b-256 71d06a109cc28473d563c734eb3db581d44669c4b4f490d448ee5c7310f82b66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page