Package: minigrid
The Minigrid library contains a collection of discrete grid-world environments to conduct research on Reinforcement Learning. The environments follow theGymnasiumstandard API and they are designed to be lightweight, fast, and easily customizable.The documentation website is atminigrid.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/bnJ6kubTg6Note 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 thelist of publications, please create an issue in theGitHub repository.See theProject Roadmapfor details regarding the long-term plans.InstallationTo install the Minigrid library usepip install minigrid.We support Python 3.7, 3.8, 3.9 and 3.10 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.EnvironmentsThe included environments can be divided in two groups. The originalMinigridenvironments and theBabyAIenvironments.MinigridThe list of the environments that were included in the originalMinigridlibrary can be found in thedocumentation. 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 amissionstring 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.BabyAIThese environments have been imported from theBabyAIproject library and the list of environments can also be found in thedocumentation. The purpose of this collection of environments is to perform research on grounded language learning. The environments are derived from theMinigridgrid-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 AgentTherl-starter-filesis a repository with examples on how to trainMinigridenvironments 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.CitationThe originalgym-minigridenvironments were created as part of work done atMila. The Dynamic obstacles environment were added as part of work done atIAS in TU Darmstadtand the University of Genoa for mobile robot navigation with dynamic obstacles.To cite this project please use:@article{MinigridMiniworld23,author={Maxime Chevalier-Boisvert and Bolun Dai and Mark Towers and Rodrigo de Lazcano 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},journal={CoRR},volume={abs/2306.13831},year={2023},}If using theBabyAIenvironments 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}}