This repo contains for the moment a first environment:
git clone https://github.com/MehdiZouitine/gym_ma_toy
cd gym_ma_toy
pip install -e .
import gym_ma_toy
import gym
env = env = gym.make('team_catcher-v0')
obs = env.reset()
done = False
while not done:
env.render()
action = env.action_space.sample()
obs, reward, done, info = env.step(action)
env.close()
This is a map where targets are randomly placed. The objective of the agents is that there are at least two agents on an adjacent cell of a target to catch it. When the target is caught the environment returns a reward point. The episode ends when there is no more target on the map.
The number of agent and target can be arbitrarily large.
# Running 8 environment in parallel
import gym
import gym_ma_toy
env = gym.vector.make('team_catcher-v0',num_envs=8, asynchronous=True)
pytest test/
Cite the environment as:
@misc{amarl2020
Author = {Mehdi Zouitine, Adil Zouitine},
Title = {Toy environment set for multi-agent reinforcement learning and more},
Year = {2020},
}
This project is free and open-source software licensed under the MIT license.