GitHub
93760bc4
Adds SubprocessUnityEnvironment for parallel envs (#1751)
This commit adds support for running Unity environments in parallel. An abstract base class was created for UnityEnvironment which a new SubprocessUnityEnvironment inherits from. SubprocessUnityEnvironment communicates through a pipe in order to send commands which will be run in parallel to its workers. A few significant changes needed to be made as a side-effect: * UnityEnvironments are created via a factory method (a closure) rather than being directly created by the main process. * In mlagents-learn "worker-id" has been replaced by "base-port" and "num-envs", and worker_ids are automatically assigned across runs. * BrainInfo objects now convert all fields to numpy arrays or lists to avoid serialization issues. |
6 年前 | |
---|---|---|
.. | ||
mlagents/trainers | Adds SubprocessUnityEnvironment for parallel envs (#1751) | 6 年前 |
tests | Adds SubprocessUnityEnvironment for parallel envs (#1751) | 6 年前 |
README.md | Fixing tables in documentation and other markdown errors. (#1199) | 7 年前 |
setup.py | Split `mlagents` into two packages (#1812) | 6 年前 |
README.md
Unity ML-Agents Python Interface and Trainers
The mlagents
Python package is part of the
ML-Agents Toolkit.
mlagents
provides a Python API that allows direct interaction with the Unity
game engine as well as a collection of trainers and algorithms to train agents
in Unity environments.
The mlagents
Python package contains two sub packages:
-
mlagents.envs
: A low level API which allows you to interact directly with a Unity Environment. See here for more information on using this package. -
mlagents.trainers
: A set of Reinforcement Learning algorithms designed to be used with Unity environments. Access them using the:mlagents-learn
access point. See here for more information on using this package.
Installation
Install the mlagents
package with:
pip install mlagents
Usage & More Information
For more detailed documentation, check out the ML-Agents Toolkit documentation.