Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

A modular re-implementation of GeoFriends2, a Gym-compliant multi-agent environment, ideal for reinforcement learning.

Notifications You must be signed in to change notification settings

david-simoes-93/GeoFriends2-v2

Repository files navigation

GeoFriends2 v2

An OpenAI Gym environment with complex puzzle maps, highly adequate for single- or multi-agent reinforcement learning approaches, based on Geometry Friends and GeoFriends2. Check out the original paper in IJCNN18, titled "Guided Deep Reinforcement Learning in the GeoFriends2 Environment".

Demo

To ready the environment, we recommend using VirtualEnv. You will need the PyGame and Gym environments.

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install pygame gym
python TestEnv-GUI.py

If you don't want a GUI, for example for Machine Learning approaches, then you can run this for a continuous local observation for each agent:

python TestEnv.py

Or this for a graphical global state observation (pixels):

python TestEnv-GraphicalState.py

Description

The major classes are the Agent, MapGenerator, and GeoFriends2.

The Gym simulator is GeoFriends2, which you initialize with a list of Agents and a list of MapGenerators. To add new Agents, you need to re-implement the Agent class (there already are a Circle and a Rectangle agents). For new Maps, you re-implement the MapGenerator. There are a bunch of maps already implemented and associated images.

About

A modular re-implementation of GeoFriends2, a Gym-compliant multi-agent environment, ideal for reinforcement learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages