MultiGrid
The MultiGrid library provides contains a collection of fast multi-agent discrete gridworld environments for reinforcement learning in Gymnasium. This is a multi-agent extension of the minigrid library, and the interface is designed to be as similar as possible.
The environments are designed to be fast and easily customizable. Compared to minigrid, the underlying gridworld logic is significantly optimized, with environment simulation 10x to 20x faster by our benchmarks.
Documentation for this library can be found at ini.io/docs/multigrid.
Installation
git clone https://github.com/ini/multigrid
cd multigrid
pip install -e .
This package requires Python 3.9 or later.
Environments
The multigrid.envs package provides implementations of several multi-agent environments. You can find the full list here.
API
MultiGrid follows the same pattern as RLlib's MultiAgentEnv API and PettingZoo's ParallelEnv API.
import gymnasium as gym
import multigrid.envs
env = gym.make('MultiGrid-Empty-8x8-v0', agents=2, render_mode='human')
observations, infos = env.reset()
while not env.is_done():
# this is where you would insert your policy / policies
actions = {agent.index: agent.action_space.sample() for agent in env.agents}
observations, rewards, terminations, truncations, infos = env.step(actions)
env.close()
More information about using MultiGrid directly with other APIs:
Training Agents
See the scripts folder for an example training with RLlib.
Documentation
Documentation for this package can be found at ini.io/docs/multigrid.
Citation
To cite this project please use:
@software{multigrid,
author = {Oguntola, Ini},
title = {Fast Multi-Agent Gridworld Environments for Gymnasium},
url = {https://github.com/ini/multigrid},
year = {2023},
}
Metadata
Release files for multigrid 0.1.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 | Actions |
|---|---|---|---|---|
| multigrid-0.1.0.tar.gz | 44.7 kB | Without provenance | Details for multigrid-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multigrid-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for multigrid-0.1.0-py3-none-any.whl |
Total release size: 100.7 kB
Release files / multigrid-0.1.0.tar.gz
| Download URL | multigrid-0.1.0.tar.gz |
|---|---|
| Size | 44.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48e13c0cb21e623eb8cdb1c4cf860a0db4c470aa6ee0787a3cfec257f758f80c
|
|
BLAKE2b-256 checksum How to use checksums |
8852cc45337f5b3cd4e39d1f9fa2a811c63b32ad48c2f4a6d4ab902340d28495
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / multigrid-0.1.0-py3-none-any.whl
| Download URL | multigrid-0.1.0-py3-none-any.whl |
|---|---|
| Size | 56.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea7f05395d6568ae89acfd91bd05f0a9da7796c79bc943a2ba4f75923e97ad7a
|
|
BLAKE2b-256 checksum How to use checksums |
df70d136c8173bdcf3cd0a3d14ca0e8b2c2f315d7224585e6a3e910c31a63419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for multigrid 0.1.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.