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.0.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 ofUnityEnvironment
.- 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
Release history Release notifications | RSS feed
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-1.0.0.tar.gz
(69.5 kB
view hashes)
Built Distribution
Close
Hashes for mlagents_envs-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 494d9780bbed36ffdfc6f65c4f5fa7a76b0b62ddd09c9bd2ff66b02ae84fdb46 |
|
MD5 | 800e28af1f8e00162ede8b59a38d5487 |
|
BLAKE2b-256 | 37b98e0a187c614326226f146efc88d72c342c3f881ba6f81353cbc9ddc7e901 |