Skip to main content

Minimalistic gridworld reinforcement learning environments.

Project description

PyPI version pre-commit Code style: black

Figure Door Key Curriculum

The Minigrid library contains a collection of discrete grid-world environments to conduct research on Reinforcement Learning. The environments follow the Gymnasium standard API and they are designed to be lightweight, fast, and easily customizable.

The documentation website is at minigrid.farama.org, and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6

Note that the library was previously known as gym-minigrid and it has been referenced in several publications. If your publication uses the Minigrid library and you wish for it to be included in the list of publications, please create an issue in the GitHub repository.

See the Project Roadmap for details regarding the long-term plans.

Installation

To install the Minigrid library use pip install minigrid.

We support Python 3.10+ on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.

Environments

The included environments can be divided in two groups. The original Minigrid environments and the BabyAI environments.

Minigrid

The list of the environments that were included in the original Minigrid library can be found in the documentation. These environments have in common a triangle-like agent with a discrete action space that has to navigate a 2D map with different obstacles (Walls, Lava, Dynamic obstacles) depending on the environment. The task to be accomplished is described by a mission string returned by the observation of the agent. These mission tasks include different goal-oriented and hierarchical missions such as picking up boxes, opening doors with keys or navigating a maze to reach a goal location. Each environment provides one or more configurations registered with Gymansium. Each environment is also programmatically tunable in terms of size/complexity, which is useful for curriculum learning or to fine-tune difficulty.

BabyAI

These environments have been imported from the BabyAI project library and the list of environments can also be found in the documentation. The purpose of this collection of environments is to perform research on grounded language learning. The environments are derived from the Minigrid grid-world environments and include an additional functionality that generates synthetic natural-looking instructions (e.g. “put the red ball next to the box on your left”) that command the the agent to navigate the world (including unlocking doors) and move objects to specified locations in order to accomplish the task.

Training an Agent

The rl-starter-files is a repository with examples on how to train Minigrid environments with RL algorithms. This code has been tested and is known to work with this environment. The default hyper-parameters are also known to converge.

Citation

The original gym-minigrid environments were created as part of work done at Mila. The Dynamic obstacles environment were added as part of work done at IAS in TU Darmstadt and the University of Genoa for mobile robot navigation with dynamic obstacles.

To cite this project please use:

@inproceedings{MinigridMiniworld23,
  author       = {Maxime Chevalier{-}Boisvert and Bolun Dai and Mark Towers and Rodrigo Perez{-}Vicente and Lucas Willems and Salem Lahlou and Suman Pal and Pablo Samuel Castro and Jordan Terry},
  title        = {Minigrid {\&} Miniworld: Modular {\&} Customizable Reinforcement Learning Environments for Goal-Oriented Tasks},
  booktitle    = {Advances in Neural Information Processing Systems 36, New Orleans, LA, USA},
  month        = {December},
  year         = {2023},
}

If using the BabyAI environments please also cite the following:

@article{chevalier2018babyai,
  title={Babyai: A platform to study the sample efficiency of grounded language learning},
  author={Chevalier-Boisvert, Maxime and Bahdanau, Dzmitry and Lahlou, Salem and Willems, Lucas and Saharia, Chitwan and Nguyen, Thien Huu and Bengio, Yoshua},
  journal={arXiv preprint arXiv:1810.08272},
  year={2018}
}

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

minigrid-3.1.0.tar.gz (106.8 kB view details)

Uploaded Source

Built Distribution

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

minigrid-3.1.0-py3-none-any.whl (140.1 kB view details)

Uploaded Python 3

File details

Details for the file minigrid-3.1.0.tar.gz.

File metadata

  • Download URL: minigrid-3.1.0.tar.gz
  • Upload date:
  • Size: 106.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for minigrid-3.1.0.tar.gz
Algorithm Hash digest
SHA256 6b3980015a7fa99d6a7d4597d54f18d943f78309bfb75056d79e80af3bc356ae
MD5 0319313c0eb88e9acbb7dcf06e78798f
BLAKE2b-256 411d4d44d1b30dbd33ce1de24846cc0153d78974d80cbcdfcf95e5230fa75d0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for minigrid-3.1.0.tar.gz:

Publisher: publish.yml on Farama-Foundation/Minigrid

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

File details

Details for the file minigrid-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: minigrid-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 140.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for minigrid-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8365f99d9369dd854bee08cef6352841b66ca16e2bf0eaa6218f02bcfb1c457
MD5 f08e0e70e60d76ce9fb822cd2cd6ad04
BLAKE2b-256 9e78c9c3ea97f2abc21d180d4b8443a7c2841b6de92036678ec995453ec76fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for minigrid-3.1.0-py3-none-any.whl:

Publisher: publish.yml on Farama-Foundation/Minigrid

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