ArnaudFickinger / gym-multigrid

Lightweight multi-agent gridworld Gym environment
Apache License 2.0
193 stars 40 forks source link
gridworld gridworld-environment gym gym-environment multi-agent multi-agent-reinforcement-learning multi-agent-systems multiagent-reinforcement-learning multiagent-systems multiplayer-game

Multi-Agent Gridworld Environment (MultiGrid)

Lightweight multi-agent gridworld Gym environment built on the MiniGrid environment.

Requirements:

Please use this bibtex if you want to cite this repository in your publications:

@misc{gym_multigrid,
  author = {Fickinger, Arnaud},
  title = {Multi-Agent Gridworld Environment for OpenAI Gym},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/ArnaudFickinger/gym-multigrid}},
}

Installation

git clone https://github.com/ArnaudFickinger/gym-multigrid
cd gym-multigrid
pip install -e .

Test

python test_env.py

Design

The environment can be either fully or partially observable. Each grid cell is encoded with a tuple containing:

Actions in the basic environment:

Included Environments

Two environments are included.

SoccerGame

Each agent get a positive reward whenever one agent drop the ball in their goal and a negative reward whenever one agent drop the ball in the opposite goal. Each agent can pass the ball to or take it from another agent. The number of teams, number of player in each team, number of goals and number of balls can be easily modified.

CollectGame

Each agent get a positive reward whenever one agent collect a ball of the same color and a negative reward whenever one agent collect a ball of a different color. The number of balls, colors and players can be easily modified.