Skip to main content

Unity Machine Learning Agents Interface

Project description

Unity ML-Agents Python Interface

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

mlgame3d_envs-0.2.0.tar.gz (74.9 kB view details)

Uploaded Source

Built Distribution

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

mlgame3d_envs-0.2.0-py3-none-any.whl (107.8 kB view details)

Uploaded Python 3

File details

Details for the file mlgame3d_envs-0.2.0.tar.gz.

File metadata

  • Download URL: mlgame3d_envs-0.2.0.tar.gz
  • Upload date:
  • Size: 74.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlgame3d_envs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f02a37a8fc8095ddae54bd4b08e11bc4c10efe30bc6866398dc6eaf32577633d
MD5 7edcc977c58ea9e83e73a375ad68b610
BLAKE2b-256 e7c7cb1f6c2a66ad458aa366626c259f0c0decd07712e0cccd403e70799e0c4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlgame3d_envs-0.2.0.tar.gz:

Publisher: publish_pypi.yaml on PAIA-Playful-AI-Arena/mlgame3d-envs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlgame3d_envs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mlgame3d_envs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 107.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlgame3d_envs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a11b01ee8d508e152ab575f5e2ea888e8d5e62e491772cbd1dc06408ab4275a
MD5 28d5f69416755e37e1a07660310fbe94
BLAKE2b-256 5dc53cd2037679567e87cca31853bdac5c3aabc00728b7952c8652e070e2050a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlgame3d_envs-0.2.0-py3-none-any.whl:

Publisher: publish_pypi.yaml on PAIA-Playful-AI-Arena/mlgame3d-envs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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