CoGrid is a library for creating grid-based multi-agent environments for multi-agent reinforcement learning research. It is built on top of Minigrid, a minimalistic gridworld library developed originally by Chevalier-Boisvert et al. (2023) (https://arxiv.org/abs/2306.13831). CoGrid has several core differentiating factors from Minigrid:
- Multi-agent support. CoGrid supports multiple agents in the same environment, each with their own
observation space and action space. Whereas Minigrid's environment logic is centered around a single
agent interacting with a
Grid
ofWorldObj
objects, CoGrid's environment logic also tracksAgent
objects as unique objects, allowing an arbitrary number to exist in the environment. Reward
modularization. CoGrid allows for the creation of customReward
objects that can be added to the environment. EachReward
is used to calculate the reward for each agent at each step, and can be used to create complex reward functions that depend on the state of the environment, the actions of other agents, etc.Feature
modularization. Similar to rewards, CoGrid allows for the creation of customFeature
objects that can be added to the environment. TheseFeature
classes are used to construct each agent's observation space, such as the location of other agents, an image of the environment, etc.
CoGrid utilizes the parallel PettingZoo API to standardize the multi-agent environment interface.
Install from the PyPi distribution:
pip install cogrid
If you use CoGrid in your research, please cite the following paper:
@article{mcdonald2024cogrid, author = {McDonald, Chase and Gonzalez, Cleotilde}, title = {CoGrid and Interactive Gym: A Framework for Multi-Agent Experimentation}, year = {forthcoming}, }